fix duplicate #define generation

pull/2760/head
BigBlack 2019-11-14 04:35:14 +08:00 committed by Alexander Medvednikov
parent 861f2d4bc0
commit 72249ce889
1 changed files with 3 additions and 1 deletions

View File

@ -230,7 +230,9 @@ fn (p mut Parser) chash() {
}
else if hash.contains('define') {
// Move defines on top
p.cgen.includes << '#$hash'
if p.first_pass() {
p.cgen.includes << '#$hash'
}
}
// Don't parse a non-JS V file (`#-js` flag)
else if hash == '-js' {