Created
May 1, 2015 23:49
-
-
Save beatak/0b8b29fbddc0a28ddad2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/tests/regexplexer.js b/tests/regexplexer.js | |
index 6128c47..79c38ea 100644 | |
--- a/tests/regexplexer.js | |
+++ b/tests/regexplexer.js | |
@@ -1019,3 +1019,20 @@ exports["test yytext state after unput"] = function() { | |
assert.equal(lexer.lex(), "NUMBER"); | |
assert.equal(lexer.lex(), "EOF"); | |
}; | |
+ | |
+exports["test CSS string"] = function() { | |
+ var dict = { | |
+ options: { | |
+ flex: true, | |
+ "case-insensitive": true | |
+ }, | |
+ macros: { | |
+ string: '"([^\n\r\f\u0022]|\\\n|\\\r\n|\\\r|\\\f|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])*"' | |
+ }, | |
+ rules: [ | |
+ ["{string}", "return 'STRING'"] | |
+ ] | |
+ }; | |
+ | |
+ var lexer = new RegExpLexer(dict, null, {}); | |
+}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment