fix comment parsing
This commit is contained in:
parent
bc8ed07125
commit
61dd498d27
1 changed files with 1 additions and 4 deletions
|
|
@ -162,14 +162,13 @@ func lex(input string) *Token {
|
||||||
|
|
||||||
// comment case
|
// comment case
|
||||||
case ';':
|
case ';':
|
||||||
|
i = matchLineEnd(i)
|
||||||
start_pos = i + 1
|
start_pos = i + 1
|
||||||
i = matchLineEnd(start_pos)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if needs_alloc {
|
if needs_alloc {
|
||||||
needs_alloc = false
|
needs_alloc = false
|
||||||
if (i < 0) {
|
if (i < 0) {
|
||||||
// TODO: Maybe not overload this.
|
|
||||||
start_pos = i
|
start_pos = i
|
||||||
goto error
|
goto error
|
||||||
}
|
}
|
||||||
|
|
@ -186,8 +185,6 @@ func lex(input string) *Token {
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
error:
|
error:
|
||||||
// TODO: Hook into error module
|
|
||||||
// TODO: Finalize and GC alloced tokens
|
|
||||||
if start_pos == -1 {
|
if start_pos == -1 {
|
||||||
log.Log(log.ERR,
|
log.Log(log.ERR,
|
||||||
"Unmatched string delimiter in input. discarding.",
|
"Unmatched string delimiter in input. discarding.",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue