Parse units on numeric literals and keep them in the AST (#5061)
* Code changes Signed-off-by: Nick Cameron <nrc@ncameron.org> * test changes Signed-off-by: Nick Cameron <nrc@ncameron.org> * Frontend changes Signed-off-by: Nick Cameron <nrc@ncameron.org> * Refactor asNum Co-authored-by: Jonathan Tran <jonnytran@gmail.com> --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
This commit is contained in:
@ -660,7 +660,7 @@ myNestedVar = [
|
||||
enter: (node, path) => {
|
||||
if (
|
||||
node.type === 'Literal' &&
|
||||
String(node.value) === literalOfInterest
|
||||
String((node as any).value.value) === literalOfInterest
|
||||
) {
|
||||
pathToNode = path
|
||||
} else if (
|
||||
|
Reference in New Issue
Block a user