Exemple #1
0
        public LabelToolCommand(CommandToolParser.LabelCommandContext context)
        {
            if (context.LITERAL().Length < 1)
            {
                return;
            }
            Address = ProcessNumber(context.LITERAL()[0].GetText());
            if (HasSemanticError)
            {
                return;
            }

            if (context.LITERAL().Length < 2)
            {
                return;
            }
            var idText = context.LITERAL()[1].GetText();

            if (char.IsDigit(idText[0]))
            {
                HasSemanticError = true;
                return;
            }
            Symbol = idText;
        }