EvModule defined
This commit is contained in:
parent
b623be5f9b
commit
710756bc50
|
@ -24,6 +24,7 @@ type rec expressionValue =
|
||||||
| EvTimeDuration(float)
|
| EvTimeDuration(float)
|
||||||
| EvDeclaration(lambdaDeclaration)
|
| EvDeclaration(lambdaDeclaration)
|
||||||
| EvTypeIdentifier(string)
|
| EvTypeIdentifier(string)
|
||||||
|
| EvModule(record)
|
||||||
and record = Js.Dict.t<expressionValue>
|
and record = Js.Dict.t<expressionValue>
|
||||||
and externalBindings = record
|
and externalBindings = record
|
||||||
and lambdaValue = {
|
and lambdaValue = {
|
||||||
|
@ -60,6 +61,7 @@ let rec toString = aValue =>
|
||||||
| EvTimeDuration(t) => DateTime.Duration.toString(t)
|
| EvTimeDuration(t) => DateTime.Duration.toString(t)
|
||||||
| EvDeclaration(d) => Declaration.toString(d, r => toString(EvLambda(r)))
|
| EvDeclaration(d) => Declaration.toString(d, r => toString(EvLambda(r)))
|
||||||
| EvTypeIdentifier(id) => `#${id}`
|
| EvTypeIdentifier(id) => `#${id}`
|
||||||
|
| EvModule(m) => `@${m->toStringRecord}`
|
||||||
}
|
}
|
||||||
and toStringRecord = aRecord => {
|
and toStringRecord = aRecord => {
|
||||||
let pairs =
|
let pairs =
|
||||||
|
@ -86,6 +88,7 @@ let toStringWithType = aValue =>
|
||||||
| EvTimeDuration(_) => `Date::${toString(aValue)}`
|
| EvTimeDuration(_) => `Date::${toString(aValue)}`
|
||||||
| EvDeclaration(_) => `Declaration::${toString(aValue)}`
|
| EvDeclaration(_) => `Declaration::${toString(aValue)}`
|
||||||
| EvTypeIdentifier(_) => `TypeIdentifier::${toString(aValue)}`
|
| EvTypeIdentifier(_) => `TypeIdentifier::${toString(aValue)}`
|
||||||
|
| EvModule(_) => `Module::${toString(aValue)}`
|
||||||
}
|
}
|
||||||
|
|
||||||
let argsToString = (args: array<expressionValue>): string => {
|
let argsToString = (args: array<expressionValue>): string => {
|
||||||
|
@ -133,6 +136,7 @@ type expressionValueType =
|
||||||
| EvtTimeDuration
|
| EvtTimeDuration
|
||||||
| EvtDeclaration
|
| EvtDeclaration
|
||||||
| EvtTypeIdentifier
|
| EvtTypeIdentifier
|
||||||
|
| EvtModule
|
||||||
|
|
||||||
type functionCallSignature = CallSignature(string, array<expressionValueType>)
|
type functionCallSignature = CallSignature(string, array<expressionValueType>)
|
||||||
type functionDefinitionSignature =
|
type functionDefinitionSignature =
|
||||||
|
@ -154,6 +158,7 @@ let valueToValueType = value =>
|
||||||
| EvTimeDuration(_) => EvtTimeDuration
|
| EvTimeDuration(_) => EvtTimeDuration
|
||||||
| EvDeclaration(_) => EvtDeclaration
|
| EvDeclaration(_) => EvtDeclaration
|
||||||
| EvTypeIdentifier(_) => EvtTypeIdentifier
|
| EvTypeIdentifier(_) => EvtTypeIdentifier
|
||||||
|
| EvModule(_) => EvtModule
|
||||||
}
|
}
|
||||||
|
|
||||||
let functionCallToCallSignature = (functionCall: functionCall): functionCallSignature => {
|
let functionCallToCallSignature = (functionCall: functionCall): functionCallSignature => {
|
||||||
|
@ -177,6 +182,7 @@ let valueTypeToString = (valueType: expressionValueType): string =>
|
||||||
| EvtTimeDuration => `Duration`
|
| EvtTimeDuration => `Duration`
|
||||||
| EvtDeclaration => `Declaration`
|
| EvtDeclaration => `Declaration`
|
||||||
| EvtTypeIdentifier => `TypeIdentifier`
|
| EvtTypeIdentifier => `TypeIdentifier`
|
||||||
|
| EvtModule => `Module`
|
||||||
}
|
}
|
||||||
|
|
||||||
let functionCallSignatureToString = (functionCallSignature: functionCallSignature): string => {
|
let functionCallSignatureToString = (functionCallSignature: functionCallSignature): string => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user