coco 03a9ac0: made tab characters consistent.

This commit is contained in:
Jeremy Ashkenas
2010-11-09 08:25:48 -05:00
parent 611174b0af
commit bc0cc34420
2 changed files with 16 additions and 13 deletions

View File

@@ -543,9 +543,12 @@ IDENTIFIER = /// ^
( [^\n\S]* : (?!:) )? # Is this a property name?
///
NUMBER = /^0x[\da-f]+|^(?:\d+(\.\d+)?|\.\d+)(?:e[+-]?\d+)?/i
NUMBER = ///
^ 0x[\da-f]+ | # hex
^ (?: \d+(\.\d+)? | \.\d+ ) (?:e[+-]?\d+)? # decimal
///i
HEREDOC = /^("""|''')([\s\S]*?)(?:\n[ \t]*)?\1/
HEREDOC = /// ^ ("""|''') ([\s\S]*?) (?:\n[^\n\S]*)? \1 ///
OPERATOR = /// ^ (
?: [-=]> # function
@@ -557,13 +560,13 @@ OPERATOR = /// ^ (
| \.{3} # splat
) ///
WHITESPACE = /^[ \t]+/
WHITESPACE = /^[^\n\S]+/
COMMENT = /^###([^#][\s\S]*?)(?:###[ \t]*\n|(?:###)?$)|^(?:\s*#(?!##[^#]).*)+/
COMMENT = /^###([^#][\s\S]*?)(?:###[^\n\S]*\n|(?:###)?$)|^(?:\s*#(?!##[^#]).*)+/
CODE = /^[-=]>/
MULTI_DENT = /^(?:\n[ \t]*)+/
MULTI_DENT = /^(?:\n[^\n\S]*)+/
SIMPLESTR = /^'[^\\']*(?:\\.[^\\']*)*'/
@@ -591,9 +594,9 @@ HEREGEX_OMIT = /\s+(?:#.*)?/g
# Token cleaning regexes.
MULTILINER = /\n/g
HEREDOC_INDENT = /\n+([ \t]*)/g
HEREDOC_INDENT = /\n+([^\n\S]*)/g
ASSIGNED = /^\s*@?[$A-Za-z_][$\w]*[ \t]*?[:=][^:=>]/
ASSIGNED = /^\s*@?[$A-Za-z_][$\w]*[^\n\S]*?[:=][^:=>]/
LINE_CONTINUER = /// ^ \s* (?: , | \??\.(?!\.) | :: ) ///