diff --git a/corpus/declarations.txt b/corpus/declarations.txt index 79e6d73..d32d0e3 100644 --- a/corpus/declarations.txt +++ b/corpus/declarations.txt @@ -85,6 +85,8 @@ a { b: 0.5%; c: 5em; margin: 10E3px; + margin: -456.8px; + margin: -0.0px; } --- @@ -93,6 +95,8 @@ a { (rule_set (selectors (tag_name)) (block (declaration (property_name) (float_value (unit))) (declaration (property_name) (integer_value (unit))) + (declaration (property_name) (float_value (unit))) + (declaration (property_name) (float_value (unit))) (declaration (property_name) (float_value (unit)))))) ============================ diff --git a/grammar.js b/grammar.js index d88c1bc..347801f 100644 --- a/grammar.js +++ b/grammar.js @@ -313,15 +313,15 @@ module.exports = grammar({ identifier: $ => /[a-zA-Z-_][a-zA-Z0-9-_]*/, - plain_value: $ => /[a-zA-Z-_][^;()\[\]\s]*/, - at_keyword: $ => /@[a-zA-Z-_]+/, comment: $ => token(seq( '/*', /[^*]*\*+([^/*][^*]*\*+)*/, '/' - )) + )), + + plain_value: $ => /[-_]*[a-zA-Z][^;()\[\]\s]*/ } })