Re: Liquid template language
От: ifle  
Дата: 14.08.17 13:43
Оценка:
Создал проэкт, модуль, синтакс, получаю ошибку на совсем безобидном примере. Что не так?

namespace Parser
{
    
    syntax module NLiquidSyntax
    {  
      using Nitra.Core;
      using Nitra.CStyleComments;

      [StartRule]
      syntax Start = "hello";

    }
}


1>------ Rebuild All started: Project: NLiquid, Configuration: Debug Any CPU ------
1>D:\Dev\GitHub\Nitra\Boot2\Net-4.0\Nitra.Runtime.dll(1,1): warning : Failed to read metadata from referenced assembly: Unknown member 'Fir'.
1>D:\Dev\GitHub\Nitra\Boot2\Net-4.0\Nitra.Runtime.dll(1,1): warning : Failed to read metadata from referenced assembly: assertion failed in file CompilingNitraProject.n, line 59: Cannot get Nemerle type for symbol ''
1>C:\Program Files (x86)\Nemerle\Net-4.0\Nemerle.MSBuild.targets(289,5): error : internal compiler error: got some unknown exception of type System.NullReferenceException: Object reference not set to an instance of an object.
1>       at Nitra.Typing.SyntaxModuleBodyContext._N_appendSymbol__74998.apply(TokenLiteralSymbol symbol, Map`2 map) in D:\Dev\GitHub\Nitra\Boot2\Nitra.Grammar\Context\SyntaxModuleBodyContext.n:line 30
1>       at Nemerle.Collections.NList.FoldLeft[T,TOut](list`1 l, TOut acc, Function`3 f)
1>       at Nitra.Typing.SyntaxModuleBodyContext._N_walk_75025(_N_closureOf_get_TokenNamesMap_74988 _N_get_TokenNamesMap_cp_75024, Context baseContext) in D:\Dev\GitHub\Nitra\Boot2\Nitra.Grammar\Context\SyntaxModuleBodyContext.n:line 38
1>       at Nitra.Typing.SyntaxModuleBodyContext._N_walk_75025(_N_closureOf_get_TokenNamesMap_74988 _N_get_TokenNamesMap_cp_75024, Context baseContext) in D:\Dev\GitHub\Nitra\Boot2\Nitra.Grammar\Context\SyntaxModuleBodyContext.n:line 38
1>       at Nitra.Typing.SyntaxModuleBodyContext.get_TokenNamesMap() in D:\Dev\GitHub\Nitra\Boot2\Nitra.Grammar\Context\SyntaxModuleBodyContext.n:line 43
1>       at Nitra.Utils.MakeLiteralName(option`1 fieldName, String value, Context context) in D:\Dev\GitHub\Nitra\Boot2\Nitra.Grammar\Utils.n:line 267
1>       at Nitra.Utils.StringRuleTyping(Location loc, String value, option`1 fieldName, Context context) in D:\Dev\GitHub\Nitra\Boot2\Nitra.Grammar\Utils.n:line 527
1>       at NitraSyntaxParseTree.RuleExpression.String.Typing(option`1 _baseRule, PrecedenceInfo _precedenceInfo, option`1 _fieldName, Context context, RuleDefinitionOptions _options) in D:\Dev\GitHub\Nitra\Boot2\Nitra.Grammar\NitraSyntax.nitra:line 2350
1>       at NitraSyntaxParseTree.SimpleRule.MakeTypedRule() in D:\Dev\GitHub\Nitra\Boot2\Nitra.Grammar\NitraSyntax.nitra:line 1596
1>       at NitraSyntaxParseTree.SimpleRule.Typing() in D:\Dev\GitHub\Nitra\Boot2\Nitra.Grammar\NitraSyntax.nitra:line 1600
1>       at NitraSyntaxParseTree.SyntaxModuleMember.SimpleRule.Typing() in D:\Dev\GitHub\Nitra\Boot2\Nitra.Grammar\NitraSyntax.nitra:line 1049
1>       at NitraSyntaxParseTree.NamespaceMember.SyntaxModule.Typing() in D:\Dev\GitHub\Nitra\Boot2\Nitra.Grammar\NitraSyntax.nitra:line 918
1>       at NitraSyntaxParseTree.NamespaceBody.Typing() in D:\Dev\GitHub\Nitra\Boot2\Nitra.Grammar\NitraSyntax.nitra:line 99
1>       at NitraSyntaxParseTree.NamespaceMember.Namespace.Typing() in D:\Dev\GitHub\Nitra\Boot2\Nitra.Grammar\NitraSyntax.nitra:line 882
1>       at NitraSyntaxParseTree.Start.Typing() in D:\Dev\GitHub\Nitra\Boot2\Nitra.Grammar\NitraSyntax.nitra:line 84
1>       at Nitra.Compiler.CompilingNitraProject.TypeSyntaxModules(List`1 parseTree) in D:\Dev\GitHub\Nitra\Boot2\Nitra.Compiler\CompilingNitraProject.Passes.n:line 160
1>       at Nitra.Compiler.CompilingNitraProject.BeforeTypedMembers() in D:\Dev\GitHub\Nitra\Boot2\Nitra.Compiler\CompilingNitraProject.Passes.n:line 350
1>       at Nitra.InvokeNitraCompiler_assembly_preaddMacro._N__N_method_lambda__42293.apply_void() in D:\Dev\GitHub\Nitra\Boot2\Nitra.Compiler\Macros\Macros.n:line 0
1>       at Nemerle.Compiler.MacroColorizator.InGlobalColor(FunctionVoid fn)
1>       at Nitra.InvokeNitraCompiler_assembly_preaddMacro.Run(Typer _N__1, list`1 parms) in D:\Dev\GitHub\Nitra\Boot2\Nitra.Compiler\Macros\Macros.n:line 27
1>       at Nemerle.Compiler.TypesManager.AttributeMacroExpansion.Expand()
1>       at Nemerle.Compiler.TypesManager.ExpandMacros()
1>       at Nemerle.Compiler.TypesManager.Run()
1>       at Nemerle.Compiler.ManagerClass.Run()
1>       at Nemerle.CommandlineCompiler.MainClass.main_with_catching()
1>Done building project "NLiquid.nproj" -- FAILED.
1>
1>1 error, 2 warnings.
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.