bring back "parser: cache tokens (first step)"

This reverts commit 0fcdd7db35.
This commit is contained in:
Alexander Medvednikov 2019-09-27 04:00:48 +03:00
parent a1e45e3247
commit a45255337d
5 changed files with 88 additions and 34 deletions

View file

@ -20,7 +20,7 @@ fn (p mut Parser) comp_time() {
}
name := p.check_name()
p.fspace()
if name in SupportedPlatforms {
if name in supported_platforms {
ifdef_name := os_name_to_ifdef(name)
if not {
p.genln('#ifndef $ifdef_name')
@ -42,7 +42,7 @@ fn (p mut Parser) comp_time() {
}
else {
println('Supported platforms:')
println(SupportedPlatforms)
println(supported_platforms)
p.error('unknown platform `$name`')
}
if_returns := p.returns