Exemplo n.º 1
0
        public static RET Create(ILineInfo line)
        {
            if (line.NumberOfArguments > 1)
            {
                throw new Exceptions.ArgumentNumberException("RET", line.NumberOfArguments);
            }
            var cmd = new RET()
            {
                LineNumber = line.LineNumber
            };

            switch (line.TypeOfArgument(1))
            {
            case Lexer.ArgumentType.Number:
                cmd.Argument1 = new Number((Int16)line.ArgumentAsNumber(1));
                cmd.Assemble  = cmd.assemble;
                break;

            case Lexer.ArgumentType.None:
                cmd.Assemble = cmd.assemble;
                break;
            }
            if (cmd.Assemble == null)
            {
                throw new Exceptions.ArgumentException("RET", line.TypeOfArgument(1));
            }
            return(cmd);
        }
Exemplo n.º 2
0
        public static RET CreateEmpty(ILineInfo line)
        {
            var cmd = new RET()
            {
                LineNumber = line.LineNumber
            };

            cmd.Assemble = cmd.assembleEmpty;
            return(cmd);
        }