diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_GeneratedParser.peggy b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_GeneratedParser.peggy index 8ed0cf52..a813dccb 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_GeneratedParser.peggy +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_GeneratedParser.peggy @@ -268,7 +268,7 @@ identifier 'identifier' = ([_a-z]+[_a-z0-9]i*) {return nodeIdentifier(text())} unitIdentifier 'identifier' - = ([_a-zA-Z]+[_a-z0-9]i*) {return nodeIdentifier(text())} + = ([_a-df-zA-DF-Z]+[_a-z0-9]i*) {return nodeIdentifier(text())} dollarIdentifier '$identifier' = ([\$_a-z]+[\$_a-z0-9]i*) {return nodeIdentifier(text())} @@ -447,4 +447,4 @@ typeInParanthesis = '(' _nl typeExpression:typeExpression _nl ')' {return typeEx // TODO: Example of foo = {a: 2, b: 5}; type fooKeys = string $ memberOf(foo->keys) // TODO: Example of memberOf( [1,2,3] ) // TODO: Example of $ -// TODO: Cons(a, list) | EmptyList \ No newline at end of file +// TODO: Cons(a, list) | EmptyList diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Number.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Number.res index 5cef930e..cf8ff043 100644 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Number.res +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Number.res @@ -16,7 +16,7 @@ module ScientificUnit = { } let getMultiplier = (r: string) => { - let match = Js.String2.match_(r, %re(`/fromUnit_([_a-zA-Z]*)/`)) + let match = Js.String2.match_(r, %re(`/fromUnit_([a-zA-Z]*)/`)) switch match { | Some([_, unit]) => nameToMultiplier(unit) | _ => None