Beispiel #1
0
        public virtual void Parse(string line)
        {
            OriginalLine = line;
            line         = PreSyntaxFixes(line);

            CommentInformation = SplitAtComment(line);
            HasComment         = CommentInformation.HasComment;
            Code    = CommentInformation.Code;
            Comment = CommentInformation.Comment;

            HasCode          = Code.Length > 0 && !Code.All(ch => char.IsWhiteSpace(ch));
            IsCommentOrEmpty = HasComment && !HasCode;

            if (!HasCode)
            {
                Symbol    = string.Empty;
                Directive = string.Empty;
                OpCode    = string.Empty;
                Operand   = string.Empty;
                return;
            }

            if (Match())
            {
                PostSyntaxFixes();
                return;
            }

            Symbol    = string.Empty;
            Directive = string.Empty;
            OpCode    = string.Empty;
            Operand   = string.Empty;
        }