module access to expression
This commit is contained in:
parent
5f6feb26ba
commit
02c06b638e
|
@ -181,4 +181,8 @@ describe("Peggy to Expression", () => {
|
|||
(),
|
||||
)
|
||||
})
|
||||
|
||||
describe("module", () => {
|
||||
testToExpression("Math.pi", "{(:$_atIndex_$ :Math 'pi')}", ())
|
||||
})
|
||||
})
|
||||
|
|
|
@ -65,5 +65,7 @@ let eBindExpression = (bindingExpr: expression, expression: expression): express
|
|||
let eBindExpressionDefault = (expression: expression): expression =>
|
||||
eFunction("$$_bindExpression_$$", list{expression})
|
||||
|
||||
let eIdentifier = (name: string): expression => name->BExpressionValue.EvSymbol->BExpressionT.EValue
|
||||
|
||||
let eTypeIdentifier = (name: string): expression =>
|
||||
name->BExpressionValue.EvTypeIdentifier->BExpressionT.EValue
|
||||
|
|
|
@ -34,6 +34,8 @@ let rec fromNode = (node: Parse.node): expression => {
|
|||
nodeLetStatement["variable"]["value"],
|
||||
fromNode(nodeLetStatement["value"]),
|
||||
)
|
||||
| PgNodeModuleIdentifier(nodeModuleIdentifier) =>
|
||||
ExpressionBuilder.eIdentifier(nodeModuleIdentifier["value"])
|
||||
| PgNodeString(nodeString) => ExpressionBuilder.eString(nodeString["value"])
|
||||
| PgNodeTernary(nodeTernary) =>
|
||||
ExpressionBuilder.eFunction(
|
||||
|
|
Loading…
Reference in New Issue
Block a user