fixing a comment/block-comment combination lexing regex issue. Ticket #478
This commit is contained in:
parent
64b5ccc524
commit
2f8a29b5a0
|
@ -580,7 +580,7 @@
|
||||||
INTERPOLATION = /^\$([a-zA-Z_@]\w*(\.\w+)*)/;
|
INTERPOLATION = /^\$([a-zA-Z_@]\w*(\.\w+)*)/;
|
||||||
OPERATOR = /^(-[\-=>]?|\+[+=]?|[*&|\/%=<>:!?]+)([ \t]*)/;
|
OPERATOR = /^(-[\-=>]?|\+[+=]?|[*&|\/%=<>:!?]+)([ \t]*)/;
|
||||||
WHITESPACE = /^([ \t]+)/;
|
WHITESPACE = /^([ \t]+)/;
|
||||||
COMMENT = /^(\s*#{3}(?!#)[ \t]*\n+([\s\S]*?)[ \t]*\n+[ \t]*#{3}|(\s*#[^\n]*)+)/;
|
COMMENT = /^(\s*#{3}(?!#)[ \t]*\n+([\s\S]*?)[ \t]*\n+[ \t]*#{3}|(\s*#(?!##[^#])[^\n]*)+)/;
|
||||||
CODE = /^((-|=)>)/;
|
CODE = /^((-|=)>)/;
|
||||||
MULTI_DENT = /^((\n([ \t]*))+)(\.)?/;
|
MULTI_DENT = /^((\n([ \t]*))+)(\.)?/;
|
||||||
LAST_DENTS = /\n([ \t]*)/g;
|
LAST_DENTS = /\n([ \t]*)/g;
|
||||||
|
|
|
@ -511,7 +511,7 @@ HEREDOC : /^("{6}|'{6}|"{3}\n?([\s\S]*?)\n?([ \t]*)"{3}|'{3}\n?([\s\S]*?)\
|
||||||
INTERPOLATION : /^\$([a-zA-Z_@]\w*(\.\w+)*)/
|
INTERPOLATION : /^\$([a-zA-Z_@]\w*(\.\w+)*)/
|
||||||
OPERATOR : /^(-[\-=>]?|\+[+=]?|[*&|\/%=<>:!?]+)([ \t]*)/
|
OPERATOR : /^(-[\-=>]?|\+[+=]?|[*&|\/%=<>:!?]+)([ \t]*)/
|
||||||
WHITESPACE : /^([ \t]+)/
|
WHITESPACE : /^([ \t]+)/
|
||||||
COMMENT : /^(\s*#{3}(?!#)[ \t]*\n+([\s\S]*?)[ \t]*\n+[ \t]*#{3}|(\s*#[^\n]*)+)/
|
COMMENT : /^(\s*#{3}(?!#)[ \t]*\n+([\s\S]*?)[ \t]*\n+[ \t]*#{3}|(\s*#(?!##[^#])[^\n]*)+)/
|
||||||
CODE : /^((-|=)>)/
|
CODE : /^((-|=)>)/
|
||||||
MULTI_DENT : /^((\n([ \t]*))+)(\.)?/
|
MULTI_DENT : /^((\n([ \t]*))+)(\.)?/
|
||||||
LAST_DENTS : /\n([ \t]*)/g
|
LAST_DENTS : /\n([ \t]*)/g
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
# comment before a ...
|
||||||
|
|
||||||
|
###
|
||||||
|
... block comment.
|
||||||
|
###
|
||||||
|
|
||||||
|
|
||||||
# comment
|
# comment
|
||||||
func: ->
|
func: ->
|
||||||
# comment
|
# comment
|
||||||
|
|
Loading…
Reference in New Issue