diff --git a/src/compiler/utils.ts b/src/compiler/utils.ts index cbdd1bc..bcf0587 100644 --- a/src/compiler/utils.ts +++ b/src/compiler/utils.ts @@ -219,9 +219,9 @@ export const getDotGetParts = (node: SyntaxNode, input: string) => { ) } - if (property.type.id !== terms.Identifier) { + if (property.type.id !== terms.Identifier && property.type.id !== terms.Number) { throw new CompilerError( - `DotGet property must be an Identifier, got ${property.type.name}`, + `DotGet property must be an Identifier or Number, got ${property.type.name}`, property.from, property.to )