fixing the lexer for indented files

This commit is contained in:
Jeremy Ashkenas
2010-02-13 02:16:31 -05:00
parent b983b3fcdc
commit e6a53bd852
4 changed files with 774 additions and 3 deletions

View File

@@ -189,7 +189,7 @@ lex::outdent_token: (move_out) ->
last_indent: @indents.pop()
@token 'OUTDENT', last_indent
move_out -= last_indent
@token 'TERMINATOR', "\n"
@token 'TERMINATOR', "\n" unless @tag() is 'TERMINATOR'
true
# Matches and consumes non-meaningful whitespace.

View File

@@ -563,7 +563,7 @@
_.methods: _.functions
# /*------------------------ Setup the OOP Wrapper: --------------------------*/
# ------------------------ Setup the OOP Wrapper: --------------------------
# Helper function to continue chaining intermediate results.
result: (obj, chain) ->