nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
parser: rename 'enum' to 'universal'
[nit.git]
/
src
/
parser
/
lexer.nit
diff --git
a/src/parser/lexer.nit
b/src/parser/lexer.nit
index
1f50959
..
7ac93d4
100644
(file)
--- a/
src/parser/lexer.nit
+++ b/
src/parser/lexer.nit
@@
-106,15
+106,15
@@
redef class TKwinterface
end
end
end
end
-redef class TKwuniversal
+redef class TKwenum
redef fun parser_index: Int
do
return 7
end
redef fun parser_index: Int
do
return 7
end
- init init_tk(loc: Location)
+ init init_tk(text: String, loc: Location)
do
do
- _text = once "universal"
+ _text = text
_location = loc
end
end
_location = loc
end
end
@@
-1388,7
+1388,8
@@
special TablesCapable
return new TKwinterface.init_tk(location)
end
if accept_token == 8 then
return new TKwinterface.init_tk(location)
end
if accept_token == 8 then
- return new TKwuniversal.init_tk(location)
+ var token_text = text.substring(0, accept_length)
+ return new TKwenum.init_tk(token_text, location)
end
if accept_token == 9 then
return new TKwspecial.init_tk(location)
end
if accept_token == 9 then
return new TKwspecial.init_tk(location)