library-ts/browser/text/lexer/expressions/BinaryExpression.ts

13 lines
409 B
TypeScript
Raw Permalink Normal View History

2025-03-08 08:16:54 +00:00
import { SourceInfo } from "../parsing/SourceInfo";
import { ExpressionNode } from "./ExpressionNode";
export class BinaryExpression<T> extends ExpressionNode<T>
{
constructor( left:ExpressionNode<T>, right:ExpressionNode<T>, data:T, sourceInfo:SourceInfo )
{
super( [ left, right ], data, sourceInfo );
}
get left(){ return this._children[ 0 ]; }
get right(){ return this._children[ 1 ]; }
}