this.me / OperatorMatch
Type Alias: OperatorMatch
OperatorMatch = {
matched:false; } | {matched:true;token:OperatorToken;kind:OperatorKind;targetPath:SemanticPath;rewrittenExpression?:any;memoryOperator?:string;returnsValueAtRoot?:boolean; }
Defined in: types.ts:178
Operator recognition can either match (and then execute) or pass.
Type Declaration
{ matched: false; }
matched
matched:
false
{ matched: true; token: OperatorToken; kind: OperatorKind; targetPath: SemanticPath; rewrittenExpression?: any; memoryOperator?: string; returnsValueAtRoot?: boolean; }
matched
matched:
true
token
token:
OperatorToken
The operator token that matched (e.g. "_", "=")
kind
kind:
OperatorKind
The operator kind from the registry
targetPath
targetPath:
SemanticPath
The destination path that should receive the semantic write (operator leaf removed or otherwise transformed). In me.ts this is typically scope.
rewrittenExpression?
optionalrewrittenExpression:any
The expression to write after the operator transforms it. e.g. pointer operator turns expression:string into
memoryOperator?
optionalmemoryOperator:string
If operator is producing a semantic memory, what should be recorded as operator. (me.ts uses "" for both "" and "->" pointer calls).
returnsValueAtRoot?
optionalreturnsValueAtRoot:boolean
Some operators return a value instead of writing when invoked at root.
- root "=" thunk returns computed value
- root "?" returns collected/transformed output
