Esempio n. 1
0
        public override object VisitJson(
            JimlParser.JsonContext context)
        {
            var composer = (IComposer)Visit(
                context.value());

            return(new Expression(
                       composer));
        }
Esempio n. 2
0
        private static void ThrowIfAnyRecognitionExceptionFound(JimlParser.JsonContext tree)
        {
            var recognitionExceptions = RecognitionErrors
                                        .FindAll(tree);

            if (recognitionExceptions.Any())
            {
                throw new AntlrException(
                          $"Following problems were found while parsing the expression: {tree}", recognitionExceptions);
            }
        }