diff options
| author | John Clements <clements@racket-lang.org> | 2013-04-02 16:44:01 -0700 |
|---|---|---|
| committer | John Clements <clements@racket-lang.org> | 2013-04-28 09:51:16 -0700 |
| commit | 41af2792333fe739abb899c6815005b08674ff21 (patch) | |
| tree | 11747b5e61776b16fff33dcac286612a44b47dc8 /src/libsyntax/parse/lexer.rs | |
| parent | 2985f74ff345638af2391a74b60e8e949691e694 (diff) | |
| download | rust-41af2792333fe739abb899c6815005b08674ff21.tar.gz rust-41af2792333fe739abb899c6815005b08674ff21.zip | |
parser comments
Diffstat (limited to 'src/libsyntax/parse/lexer.rs')
| -rw-r--r-- | src/libsyntax/parse/lexer.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsyntax/parse/lexer.rs b/src/libsyntax/parse/lexer.rs index edddac7bc7d..60d6ce504fd 100644 --- a/src/libsyntax/parse/lexer.rs +++ b/src/libsyntax/parse/lexer.rs @@ -286,6 +286,8 @@ fn consume_any_line_comment(rdr: @mut StringReader) } } else if rdr.curr == '#' { if nextch(rdr) == '!' { + // I guess this is the only way to figure out if + // we're at the beginning of the file... let cmap = @CodeMap::new(); (*cmap).files.push(rdr.filemap); let loc = cmap.lookup_char_pos_adj(rdr.last_pos); |
