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