/// <summary> /// Initializes a new instance of the <see cref="MorestachioSyntaxError"/> class. /// </summary> /// <param name="location">The location.</param> public MorestachioSyntaxError(CharacterLocationExtended location, string operation, string tokenOccured, string syntaxExpected, string extra = null) { Location = location; HelpText = $"line:char " + $"'{Location.Line}:{Location.Character}' " + $"- " + $"The syntax to " + $"{operation} the '{tokenOccured}' " + $"block should be: '{syntaxExpected}'.{extra}"; }
/// <summary> /// /// </summary> /// <param name="location"></param> /// <param name="token"></param> public InvalidPathSyntaxError(CharacterLocationExtended location, string token, string helpText = null) { Location = location; Token = token; HelpText = $"line:char '{Location.Line}:{Location.Character}' - The path '{Token}' is not valid. Please see documentation for examples of valid paths."; if (helpText != null) { HelpText += "\r\n" + helpText; } }
/// <summary> /// Initializes a new instance of the <see cref="MorestachioSyntaxError"/> class. /// </summary> /// <param name="location">The location.</param> public MorestachioUnopendScopeError(CharacterLocationExtended location, string tokenOccured, string syntaxExpected, string extra = null) { Location = location; HelpText = $"line:char '{Location.Line}:{Location.Character}' - An '{tokenOccured}' block is being closed, but no corresponding opening element '{syntaxExpected}' was detected.{extra}"; }