Permalink
Browse files

A line comment can also be at the very end of the line

  • Loading branch information...
1 parent 432af94 commit e119fc296629d48b8e5864955b0ffed3ee301706 @netzpirat committed Jan 17, 2011
View
@@ -225,7 +225,7 @@
</component>
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
- <mapping directory="$PROJECT_DIR$/coffee-script" vcs="Git" />
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
<component name="ideadoc.IdeaDocConfigurationGUI">
<doccer class="nl.piraya.ideadoc.doccer.DoccerForOverridingMethod" enabled="true">
@@ -1,4 +1,12 @@
+#
# This is a line comment
+#
+
+##
+# This is a line comment
+##
+
+## This is a line comment
### Block comment ###
@@ -1,4 +1,12 @@
+[COMMENT #] [TERMINATOR \n]
[COMMENT # This is a line comment] [TERMINATOR \n]
+[COMMENT #] [TERMINATOR \n]
+[TERMINATOR \n]
+[COMMENT ##] [TERMINATOR \n]
+[COMMENT # This is a line comment] [TERMINATOR \n]
+[COMMENT ##] [TERMINATOR \n]
+[TERMINATOR \n]
+[COMMENT ## This is a line comment] [TERMINATOR \n]
[TERMINATOR \n]
[BLOCK_COMMENT ### Block comment ###] [TERMINATOR \n]
[TERMINATOR \n]
@@ -104,8 +104,6 @@ WHITE_SPACE = [\ ]+
IDENTIFIER = [a-zA-Z\$_]([a-zA-Z_0-9$])*
NUMBER = (0(x|X)[0-9a-fA-F]+)|(-?[0-9]+(\.[0-9]+)?(e[+\-]?[0-9]+)?)
-BLOCK_COMMENT = ###~###
-
RESERVED = case|default|function|var|void|with|const|let|enum|export|import|native|__hasProp|__extends|__slice|__bind|__indexOf
LOGIC = and|&&|or|\|\||&|\||\^|\?
COMPARE = ==|\!=|<|>|<=|>=|is|isnt
@@ -217,8 +215,8 @@ QUOTE = this|class|extends|try|catch|finally|throw|if|then|else|unless
"/" / [^ \n\r]+ { yybegin(YYREGEX);
return CoffeeScriptTokenTypes.REGEX_START; }
- {BLOCK_COMMENT} { return CoffeeScriptTokenTypes.BLOCK_COMMENT; }
- #[^\n\r{]+ { return CoffeeScriptTokenTypes.LINE_COMMENT; }
+ ###~### { return CoffeeScriptTokenTypes.BLOCK_COMMENT; }
+ (##?)(.*)*[^\n\r]? { return CoffeeScriptTokenTypes.LINE_COMMENT; }
{TERMINATOR} { return CoffeeScriptTokenTypes.TERMINATOR; }
{WHITE_SPACE} { return CoffeeScriptTokenTypes.WHITE_SPACE; }

0 comments on commit e119fc2

Please sign in to comment.