nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
parser: Do not crash if last_loken is unset
[nit.git]
/
src
/
parser
/
xss
/
lexer.xss
diff --git
a/src/parser/xss/lexer.xss
b/src/parser/xss/lexer.xss
index
f3b3247
..
d962dce
100644
(file)
--- a/
src/parser/xss/lexer.xss
+++ b/
src/parser/xss/lexer.xss
@@
-34,7
+34,7
@@
class Lexer
attr _stream: IStream
# Pushback buffer to store unread character
attr _stream: IStream
# Pushback buffer to store unread character
- attr _stream_buf: String
+ attr _stream_buf: Buffer
# Number of character stored in the pushback buffer
attr _stream_pos: Int
# Number of character stored in the pushback buffer
attr _stream_pos: Int
@@
-52,7
+52,7
@@
class Lexer
attr _eof: Bool = false
# Current working text read from the input stream
attr _eof: Bool = false
# Current working text read from the input stream
- attr _text: String
+ attr _text: Buffer
$ foreach {lexer_data/state}
# Constante state values
$ foreach {lexer_data/state}
# Constante state values
@@
-63,10
+63,10
@@
$ end foreach
init(stream: IStream, fname: String)
do
_filename = fname
init(stream: IStream, fname: String)
do
_filename = fname
- _text = new String
+ _text = new Buffer
_stream = stream
_stream_pos = -1
_stream = stream
_stream_pos = -1
- _stream_buf = new String
+ _stream_buf = new Buffer
build_goto_table
build_accept_table
end
build_goto_table
build_accept_table
end