feat: wire directional alignment predicates into dense DSL grammar
- Add leftAlignedWith/rightAlignedWith/topAlignedWith/bottomAlignedWith to lexer TokenKind union and keyword map - Add to grammar.ts consumeRelation() recognized relation kinds - Dense DSL users can now write: '.a' leftAlignedWith '.b', etc. (previously returned parser error 'Expected relation')
This commit is contained in:
@@ -1139,7 +1139,8 @@ export class GrammarParser {
|
||||
|
||||
const relationKinds: Array<Token['kind']> = [
|
||||
'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',
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user