From cf4a9573ed0e6f975c78bb69172a81ee7ae23c76 Mon Sep 17 00:00:00 2001 From: Dilip Kola Date: Mon, 10 Jun 2024 11:57:51 +0530 Subject: [PATCH] fix: grammar --- src/parser.ts | 2 +- test/scenarios/objects/data.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parser.ts b/src/parser.ts index b8aa24a..f82d587 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -1138,7 +1138,7 @@ export class JsonTemplateParser { const contextVar = this.getObjectPropContextVar(); const key = this.parseObjectKeyExpr(); if (contextVar && typeof key === 'string') { - throw new JsonTemplateParserError('Context prop is should be used with key expression'); + throw new JsonTemplateParserError('Context prop should be used with a key expression'); } this.lexer.expect(':'); const value = this.parseBaseExpr(); diff --git a/test/scenarios/objects/data.ts b/test/scenarios/objects/data.ts index 2accba1..7092096 100644 --- a/test/scenarios/objects/data.ts +++ b/test/scenarios/objects/data.ts @@ -36,7 +36,7 @@ export const data: Scenario[] = [ }, { templatePath: 'invalid_context_prop.jt', - error: 'Context prop is should be used with key expression', + error: 'Context prop should be used with a key expression', }, { output: {