this.me / OperatorMatch
Type Alias: OperatorMatch
OperatorMatch = {
matched:false; } | {kind:OperatorKind;matched:true;memoryOperator?:string;returnsValueAtRoot?:boolean;rewrittenExpression?:any;targetPath:SemanticPath;token:OperatorToken; }
Defined in: types.ts:100
Operator recognition can either match (and then execute) or pass.
Type Declaration
{ matched: false; }
matched
matched:
false
{ kind: OperatorKind; matched: true; memoryOperator?: string; returnsValueAtRoot?: boolean; rewrittenExpression?: any; targetPath: SemanticPath; token: OperatorToken; }
kind
kind:
OperatorKind
The operator kind from the registry
matched
matched:
true
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
rewrittenExpression?
optionalrewrittenExpression:any
The expression to write after the operator transforms it. e.g. pointer operator turns expression:string into
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.
token
token:
OperatorToken
The operator token that matched (e.g. "_", "=")
