-
Notifications
You must be signed in to change notification settings - Fork 2
/
todo.txt
29 lines (24 loc) · 1.09 KB
/
todo.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
lexer and parser
----------------
power
allow trailing comma
semicolons multiple expressions
localized decimal separator in numbers
disambigation operator
single quotes to escape variable names
full grammar for identifiers, from https://docs.microsoft.com/en-us/power-platform/power-fx/expression-grammar#IdentifierName
probably something like:
var regex = /(_|\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl})(_|\p{Lu}|\p{Ll}|\p{Lt}|\p{Lm}|\p{Lo}|\p{Nl}|\p{Nd}|\p{Pc}|\p{Mn}|\p{Cf})*/u;
...actually maybe is more correct because it handles ' ' and uses [ ] as it should
const regex = /'[^']*'|[_\p{Lu}\p{Ll}\p{Lt}\p{Lm}\p{Lo}\p{Nl}][_\p{Lu}\p{Ll}\p{Lt}\p{Lm}\p{Lo}\p{Nl}\p{Nd}\p{Pc}\p{Mn}\p{Cf}]*/u;
engineering
-----------
- use let and const
- pointer to parent in the parse tree
- clean up prim - remove duplicate code - be consistent with look ahead and helpers
- pointers to underlying tokens (and therefore index)
- parse tree operator type (note hack of adding spaces on ' and ' and ' or ')
- parse tree operator printing
- partial expression resolution
- tests for unconsumed tokens scenarios
- tests with chai