diff options
author | Evan Jones <ej@evanjones.ca> | 2012-01-05 02:12:27 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-01-05 02:56:00 (GMT) |
commit | 7311f3b583c739f862ae17c3925985ec3ea244f5 (patch) | |
tree | b7fec70bee5e5416131145c46a7871be6eb1b519 /src/lexer.in.cc | |
parent | ff3e266da5430489c00b3b9b9a4eec930e54f402 (diff) | |
download | Ninja-7311f3b583c739f862ae17c3925985ec3ea244f5.zip Ninja-7311f3b583c739f862ae17c3925985ec3ea244f5.tar.gz Ninja-7311f3b583c739f862ae17c3925985ec3ea244f5.tar.bz2 |
Lexer: include leading whitespace in the comment token.
Indented comments are ignored rather than causing errors.
Diffstat (limited to 'src/lexer.in.cc')
-rw-r--r-- | src/lexer.in.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lexer.in.cc b/src/lexer.in.cc index c0c197b..954c364 100644 --- a/src/lexer.in.cc +++ b/src/lexer.in.cc @@ -110,7 +110,7 @@ Lexer::Token Lexer::ReadToken() { simple_varname = [a-zA-Z0-9_-]+; varname = [a-zA-Z0-9_.-]+; - "#"[^\000\n]*"\n" { continue; } + [ ]*"#"[^\000\n]*"\n" { continue; } [\n] { token = NEWLINE; break; } [ ]+ { token = INDENT; break; } "build" { token = BUILD; break; } |