import type { Action, ButtonState } from '@/types/scene' export interface ParseError { line: number message: string } export interface ParseResult { actions: Action[] errors: ParseError[] } const BUTTON_STATES = new Set([ 'normal', 'hover', 'pressed', 'disabled', ]) /** * Parse a small line-based DSL into Action[]. Comments start with `//` * and each non-empty line is one command. Known commands: * * play | pause | rewind * jump (e.g. `jump 2.5`) * jump # (e.g. `jump #135`) * jump @ (e.g. `jump @intro`) * state btn: