示例#1
0
        /// <summary>
        /// Translates a Z80AsmParserErrorInfo instance into an error
        /// </summary>
        /// <param name="sourceItem">
        /// Source file information, to allow the error to track the filename the error occurred in
        /// </param>
        /// <param name="error">Error information</param>
        private void ReportError(SourceFileItem sourceItem, Z80AsmParserErrorInfo error)
        {
            var errInfo = new AssemblerErrorInfo(sourceItem, error);

            Output.Errors.Add(errInfo);
            ReportScopeError(errInfo.ErrorCode);
        }
示例#2
0
        public AssemblerErrorInfo(SourceFileItem sourceItem, Z80AsmParserErrorInfo syntaxErrorInfo)
        {
            var token = syntaxErrorInfo.Token.Trim();

            ErrorCode = token.Length == 0
                ? Errors.Z0101
                : Errors.Z0100;
            Line     = syntaxErrorInfo.SourceLine;
            Column   = syntaxErrorInfo.Position;
            Message  = Errors.GetMessage(ErrorCode, token);
            Filename = sourceItem.Filename;
        }
示例#3
0
 /// <summary>
 /// Translates a Z80AsmParserErrorInfo instance into an error
 /// </summary>
 /// <param name="sourceItem">
 /// Source file information, to allow the error to track the filename the error ocurred in
 /// </param>
 /// <param name="error">Error information</param>
 private void ReportError(SourceFileItem sourceItem, Z80AsmParserErrorInfo error)
 {
     _output.Errors.Add(new AssemblerErrorInfo(sourceItem, error));
 }