diff --git a/packages/imhotep-dsl/src/grammar.ts b/packages/imhotep-dsl/src/grammar.ts index 8cac529..dc62c61 100644 --- a/packages/imhotep-dsl/src/grammar.ts +++ b/packages/imhotep-dsl/src/grammar.ts @@ -1139,7 +1139,8 @@ export class GrammarParser { const relationKinds: Array = [ 'leftOf', 'rightOf', 'above', 'below', - 'alignedWith', 'centeredWithin', 'inside', 'contains', 'overlaps', 'separatedFrom', + 'alignedWith', 'leftAlignedWith', 'rightAlignedWith', 'topAlignedWith', 'bottomAlignedWith', + 'centeredWithin', 'inside', 'contains', 'overlaps', 'separatedFrom', // Spatial aliases 'beside', 'nextTo', 'adjacent', 'touching', 'near', 'under', 'within', ] diff --git a/packages/imhotep-dsl/src/lexer.ts b/packages/imhotep-dsl/src/lexer.ts index e9d6793..356aa72 100644 --- a/packages/imhotep-dsl/src/lexer.ts +++ b/packages/imhotep-dsl/src/lexer.ts @@ -62,6 +62,10 @@ export type TokenKind = | 'contains' | 'overlaps' | 'separatedFrom' + | 'leftAlignedWith' + | 'rightAlignedWith' + | 'topAlignedWith' + | 'bottomAlignedWith' // Spatial aliases | 'beside' | 'nextTo' @@ -190,6 +194,10 @@ const KEYWORDS: Record = { contains: 'contains', overlaps: 'overlaps', separatedFrom: 'separatedFrom', + leftAlignedWith: 'leftAlignedWith', + rightAlignedWith: 'rightAlignedWith', + topAlignedWith: 'topAlignedWith', + bottomAlignedWith: 'bottomAlignedWith', // Spatial aliases beside: 'beside', nextTo: 'nextTo',