You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rule "some rule" {
when {
$q: String $q == "start";
}
then {
}
}
When I run nools compile I get this error:
Unexpected token name «start», expected punc «,»
Error
at new JS_Parse_Error (/usr/lib/node_modules/uglify-js/lib/parse.js:196:18)
at js_error (/usr/lib/node_modules/uglify-js/lib/parse.js:204:11)
at croak (/usr/lib/node_modules/uglify-js/lib/parse.js:636:9)
at token_error (/usr/lib/node_modules/uglify-js/lib/parse.js:644:9)
at expect_token (/usr/lib/node_modules/uglify-js/lib/parse.js:657:9)
at expect (/usr/lib/node_modules/uglify-js/lib/parse.js:660:36)
at expr_list (/usr/lib/node_modules/uglify-js/lib/parse.js:1137:44)
at /usr/lib/node_modules/uglify-js/lib/parse.js:1152:23
at /usr/lib/node_modules/uglify-js/lib/parse.js:683:24
at expr_atom (/usr/lib/node_modules/uglify-js/lib/parse.js:1115:35)
The text was updated successfully, but these errors were encountered:
Found it: nools compile only seems to allow single quoted strings in the when {} clause. This is strange because the nools.compile() function does accept double quoted strings.
* Added ability to `import` other nools files to create composible rules files [noolsjs#58](noolsjs#58)
* When using `global` to require other files you can now require other files relative to the nools file
* Added uglify-js as a dependency instead of devDependency noolsjs#71
* Fixed issue noolsjs#61 where transpile would not properly escape `"` character.
* Fixed issue noolsjs#66 and noolsjs#67 where regular expression matching was too greedy.
* Fixed issue noolsjs#62 where constraints with a `"` character would produce invalid javascript when `transpiling`.
* Fixed issue noolsjs#69 where rules names with a `'` character in a rule would produce invalid javascript when `transpiling`.
I have no clue what is wrong with this rule:
When I run
nools compile
I get this error:The text was updated successfully, but these errors were encountered: