Remove unused tokens
This commit is contained in:
+9
-28
@@ -425,20 +425,15 @@ type
|
||||
and,
|
||||
_or,
|
||||
_xor,
|
||||
pipe,
|
||||
not,
|
||||
_return,
|
||||
_module,
|
||||
_program,
|
||||
_import,
|
||||
_cast,
|
||||
trait,
|
||||
left_paren,
|
||||
right_paren,
|
||||
left_square,
|
||||
right_square,
|
||||
shift_left,
|
||||
shift_right,
|
||||
greater_equal,
|
||||
less_equal,
|
||||
greater_than,
|
||||
@@ -5591,18 +5586,12 @@ begin
|
||||
_write_s(2, "\"or\"")
|
||||
elsif kind = ElnaLexerKind._xor then
|
||||
_write_s(2, "\"xor\"")
|
||||
elsif kind = ElnaLexerKind.pipe then
|
||||
_write_s(2, "\"|\"")
|
||||
elsif kind = ElnaLexerKind.not then
|
||||
_write_s(2, "\"~\"")
|
||||
elsif kind = ElnaLexerKind._return then
|
||||
_write_s(2, "\"return\"")
|
||||
elsif kind = ElnaLexerKind._module then
|
||||
_write_s(2, "\"module\"")
|
||||
elsif kind = ElnaLexerKind._program then
|
||||
_write_s(2, "\"program\"")
|
||||
elsif kind = ElnaLexerKind._import then
|
||||
_write_s(2, "\"import\"")
|
||||
elsif kind = ElnaLexerKind._cast then
|
||||
_write_s(2, "\"cast\"")
|
||||
elsif kind = ElnaLexerKind.trait then
|
||||
@@ -5615,10 +5604,6 @@ begin
|
||||
_write_s(2, "\"[\"")
|
||||
elsif kind = ElnaLexerKind.right_square then
|
||||
_write_s(2, "\"]\"")
|
||||
elsif kind = ElnaLexerKind.shift_left then
|
||||
_write_s(2, "\"<<\"")
|
||||
elsif kind = ElnaLexerKind.shift_right then
|
||||
_write_s(2, "\">>\"")
|
||||
elsif kind = ElnaLexerKind.greater_equal then
|
||||
_write_s(2, "\">=\"")
|
||||
elsif kind = ElnaLexerKind.less_equal then
|
||||
@@ -5637,14 +5622,7 @@ begin
|
||||
_write_s(2, "\".\"")
|
||||
elsif kind = ElnaLexerKind.comma then
|
||||
_write_s(2, "\",\"")
|
||||
else
|
||||
elna_error_print_token2(kind)
|
||||
end
|
||||
end
|
||||
|
||||
proc elna_error_print_token2(kind: ElnaLexerKind)
|
||||
begin
|
||||
if kind = ElnaLexerKind.plus then
|
||||
elsif kind = ElnaLexerKind.plus then
|
||||
_write_s(2, "\"+\"")
|
||||
elsif kind = ElnaLexerKind.arrow then
|
||||
_write_s(2, "\"->\"")
|
||||
@@ -5668,7 +5646,14 @@ begin
|
||||
_write_s(2, "COMMENT")
|
||||
elsif kind = ElnaLexerKind.string then
|
||||
_write_s(2, "STRING")
|
||||
elsif kind = ElnaLexerKind.character then
|
||||
else
|
||||
elna_error_print_token2(kind)
|
||||
end
|
||||
end
|
||||
|
||||
proc elna_error_print_token2(kind: ElnaLexerKind)
|
||||
begin
|
||||
if kind = ElnaLexerKind.character then
|
||||
_write_s(2, "CHARACTER")
|
||||
elsif kind = ElnaLexerKind.integer then
|
||||
_write_s(2, "INTEGER")
|
||||
@@ -6328,8 +6313,6 @@ begin
|
||||
result^.kind := ElnaLexerKind._xor
|
||||
elsif string_compare(position_start, result^.length, "program".ptr, 7) then
|
||||
result^.kind := ElnaLexerKind._program
|
||||
elsif string_compare(position_start, result^.length, "module".ptr, 6) then
|
||||
result^.kind := ElnaLexerKind._module
|
||||
elsif string_compare(position_start, result^.length, "nil".ptr, 3) then
|
||||
result^.kind := ElnaLexerKind.null
|
||||
elsif string_compare(position_start, result^.length, "true".ptr, 4) then
|
||||
@@ -6403,8 +6386,6 @@ begin
|
||||
result := elna_lexer_token_create(ElnaLexerKind.left_square, position)
|
||||
elsif character = ']' then
|
||||
result := elna_lexer_token_create(ElnaLexerKind.right_square, position)
|
||||
elsif character = '|' then
|
||||
result := elna_lexer_token_create(ElnaLexerKind.pipe, position)
|
||||
end;
|
||||
return result
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user