Skip to content

Commit

Permalink
Fixed numerics
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanJang committed Dec 2, 2014
1 parent 34b137d commit 7d72a18
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions KSP configuration.JSON-tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
{
"name": "keyword",
"match": "([A-Za-z0-9%@_\\s]*)(?==)",
"match": "([A-Za-z0-9@%_]*\\s*)(?==)",
"comment": "Anything before an equal sign is a key in the key-value pairs."
},
{
Expand All @@ -27,13 +27,13 @@
},
{
"name": "constant.numeric",
"match": "(?<==)(\\s*True||\\s*False)",
"match": "(?<==)(\\s*[Tt]rue||\\s*[Ff]alse)",
"comment": "'True' or 'False' after an equal sign is a boolean."
},
{
"name": "constant.numeric",
"match": "(?<=[=\\,\\(])(\\s*\\-?[0-9\\.]+E?\\-?[0-9\\.]*)",
"comment": "Numeric characters after an equal sign, including scientific notation, is a number."
"match": "\\s*-?[0-9\\.]+E?-?[0-9\\.]*",
"comment": "Numeric characters, including scientific notation, is a number."
},
{
"name": "constant.numeric",
Expand All @@ -57,7 +57,7 @@
},
{
"name": "entity.name.class",
"match": "[A-Za-z0-9/!@%]*",
"match": "[A-Za-z0-9!@%/]*",
"comment": "Anything else matching these symbols is a class name."
}
]
Expand Down
10 changes: 5 additions & 5 deletions KSP configuration.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<key>comment</key>
<string>Anything before an equal sign is a key in the key-value pairs.</string>
<key>match</key>
<string>([A-Za-z0-9%@_\s]*)(?==)</string>
<string>([A-Za-z0-9@%_]*\s*)(?==)</string>
<key>name</key>
<string>keyword</string>
</dict>
Expand All @@ -47,15 +47,15 @@
<key>comment</key>
<string>'True' or 'False' after an equal sign is a boolean.</string>
<key>match</key>
<string>(?&lt;==)(\s*True||\s*False)</string>
<string>(?&lt;==)(\s*[Tt]rue||\s*[Ff]alse)</string>
<key>name</key>
<string>constant.numeric</string>
</dict>
<dict>
<key>comment</key>
<string>Numeric characters after an equal sign, including scientific notation, is a number.</string>
<string>Numeric characters, including scientific notation, is a number.</string>
<key>match</key>
<string>(?&lt;=[=\,\(])(\s*\-?[0-9\.]+E?\-?[0-9\.]*)</string>
<string>\s*-?[0-9\.]+E?-?[0-9\.]*</string>
<key>name</key>
<string>constant.numeric</string>
</dict>
Expand Down Expand Up @@ -95,7 +95,7 @@
<key>comment</key>
<string>Anything else matching these symbols is a class name.</string>
<key>match</key>
<string>[A-Za-z0-9/!@%]*</string>
<string>[A-Za-z0-9!@%/]*</string>
<key>name</key>
<string>entity.name.class</string>
</dict>
Expand Down

0 comments on commit 7d72a18

Please sign in to comment.