Rename result_type to ptype, parser result to pvalue
This commit is contained in:
1 parent
bca0a14371
commit
8dc27686aa
5 files changed
+34
-34
No files matched your search
@@ -6,7 +6,7 @@ class Propane
|
||||
|
||||
module a.b;
|
||||
class Foobar;
|
||||
result_type XYZ * ;
|
||||
ptype XYZ * ;
|
||||
|
||||
token while;
|
||||
|
||||
@@ -32,7 +32,7 @@ EOF
|
||||
grammar = Grammar.new(input)
|
||||
expect(grammar.classname).to eq "Foobar"
|
||||
expect(grammar.modulename).to eq "a.b"
|
||||
expect(grammar.result_type).to eq "XYZ *"
|
||||
expect(grammar.ptype).to eq "XYZ *"
|
||||
|
||||
o = grammar.tokens.find {|token| token.name == "while"}
|
||||
expect(o).to_not be_nil
|
||||
|
||||
@@ -263,7 +263,7 @@ EOF
|
||||
|
||||
it "parses lists" do
|
||||
write_grammar <<EOF
|
||||
result_type uint;
|
||||
ptype uint;
|
||||
token a;
|
||||
Start -> As <<
|
||||
$$ = $1;
|
||||
@@ -320,7 +320,7 @@ EOF
|
||||
|
||||
it "allows storing a result value for the lexer" do
|
||||
write_grammar <<EOF
|
||||
result_type ulong;
|
||||
ptype ulong;
|
||||
token word /[a-z]+/ <<
|
||||
$$ = match.length;
|
||||
>>
|
||||
|
||||
Reference in new issue
Block a user