Skip to content

Commit

Permalink
Fix floating-point literals. Fixes #2.
Browse files Browse the repository at this point in the history
  • Loading branch information
tgjones committed Dec 18, 2019
1 parent f111285 commit 87c0dca
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions grammars/hlsl.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,21 @@
"end": "$"
},
{
"name": "constant.numeric.hlsl",
"match": "\\b([0-9]+\\.?[0-9]*)\\b"
},
{
"name": "constant.numeric.hlsl",
"match": "\\b(\\.[0-9]+)\\b"
},
{
"name": "constant.numeric.hex.hlsl",
"match": "\\b(0x[0-9A-F]+)\\b"
},
"name": "constant.numeric.decimal.hlsl",
"match": "\\b[0-9]+\\.[0-9]*(F|f)?\\b"
},
{
"name": "constant.numeric.decimal.hlsl",
"match": "(\\.([0-9]+)(F|f)?)\\b"
},
{
"name": "constant.numeric.decimal.hlsl",
"match": "\\b([0-9]+(F|f)?)\\b"
},
{
"name": "constant.numeric.hex.hlsl",
"match": "\\b(0(x|X)[0-9a-fA-F]+)\\b"
},
{
"name": "constant.language.hlsl",
"match": "\\b(false|true)\\b"
Expand Down

0 comments on commit 87c0dca

Please sign in to comment.