Class: Rattler::Compiler::ParserGenerator::AssertGenerator
- Inherits:
-
ExprGenerator
- Object
- ExprGenerator
- Rattler::Compiler::ParserGenerator::AssertGenerator
show all
- Defined in:
- lib/rattler/compiler/parser_generator/assert_generator.rb
Class Method Summary
collapse
Instance Method Summary
collapse
#gen_intermediate_disallow, #initialize
Class Method Details
.top_level(*args) ⇒ Object
Instance Method Details
#gen_assert(assert, scope = ParserScope.empty) ⇒ Object
12
13
14
|
# File 'lib/rattler/compiler/parser_generator/assert_generator.rb', line 12
def gen_assert(assert, scope = ParserScope.empty)
gen_basic assert, scope
end
|
#gen_basic(assert, scope = ParserScope.empty) ⇒ Object
8
9
10
|
# File 'lib/rattler/compiler/parser_generator/assert_generator.rb', line 8
def gen_basic(assert, scope = ParserScope.empty)
generate assert.child, :assert, scope
end
|
#gen_disallow(assert, scope = ParserScope.empty) ⇒ Object
16
17
18
|
# File 'lib/rattler/compiler/parser_generator/assert_generator.rb', line 16
def gen_disallow(assert, scope = ParserScope.empty)
@g << 'false'
end
|
28
29
30
|
# File 'lib/rattler/compiler/parser_generator/assert_generator.rb', line 28
def gen_intermediate(assert, scope = ParserScope.empty)
generate assert.child, :intermediate_assert, scope
end
|
32
33
34
|
# File 'lib/rattler/compiler/parser_generator/assert_generator.rb', line 32
def gen_intermediate_assert(assert, scope = ParserScope.empty)
gen_intermediate assert, scope
end
|
36
37
38
|
# File 'lib/rattler/compiler/parser_generator/assert_generator.rb', line 36
def gen_intermediate_skip(assert, scope = ParserScope.empty)
gen_intermediate assert, scope
end
|
#gen_skip(assert, scope = ParserScope.empty) ⇒ Object
20
21
22
|
# File 'lib/rattler/compiler/parser_generator/assert_generator.rb', line 20
def gen_skip(assert, scope = ParserScope.empty)
gen_basic assert, scope
end
|
#gen_token(assert, scope = ParserScope.empty) ⇒ Object
24
25
26
|
# File 'lib/rattler/compiler/parser_generator/assert_generator.rb', line 24
def gen_token(assert, scope = ParserScope.empty)
expr(:block) { gen_action assert, "''", scope }
end
|