Move generation logic to new Generator class
This commit is contained in:
1 parent
b1d5cddab4
commit
ca6a93a4c5
3 files changed
+66
-58
No files matched your search
+4
-4
@@ -1,8 +1,8 @@
|
||||
<% if @modulename %>
|
||||
module <%= @modulename %>;
|
||||
<% if @grammar.modulename %>
|
||||
module <%= @grammar.modulename %>;
|
||||
|
||||
<% end %>
|
||||
class <%= classname %>
|
||||
class <%= @classname %>
|
||||
{
|
||||
enum
|
||||
{
|
||||
@@ -117,7 +117,7 @@ class <%= classname %>
|
||||
uint accepts;
|
||||
}
|
||||
|
||||
<% transition_table, state_table = lexer.build_tables %>
|
||||
<% transition_table, state_table = @lexer.build_tables %>
|
||||
private static const Transition transitions[] = [
|
||||
<% transition_table.each do |transition_table_entry| %>
|
||||
Transition(<%= transition_table_entry[:first] %>u, <%= transition_table_entry[:last] %>u, <%= transition_table_entry[:destination] %>u),
|
||||
|
||||
Reference in new issue
Block a user