Skip to content

Commit

Permalink
Extract Lrama::Lexer::Token::Type into another file
Browse files Browse the repository at this point in the history
  • Loading branch information
ydah committed Aug 9, 2023
1 parent e41d0ca commit 4f7e712
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/lrama/lexer/token.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Lrama
class Lexer
class Token < Struct.new(:type, :s_value, :alias, keyword_init: true)
Type = Struct.new(:id, :name, keyword_init: true)
require 'lrama/lexer/token/type'

attr_accessor :line, :column, :referred
# For User_code
Expand Down
8 changes: 8 additions & 0 deletions lib/lrama/lexer/token/type.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module Lrama
class Lexer
class Token
class Type < Struct.new(:id, :name, keyword_init: true)
end
end
end
end

0 comments on commit 4f7e712

Please sign in to comment.