AjTalk.Language.Block.CompileArgument C# (CSharp) Method

CompileArgument() public method

public CompileArgument ( string argname ) : void
argname string
return void
        public void CompileArgument(string argname)
        {
            if (this.argnames.Contains(argname))
            {
                throw new Exception("Repeated Argument: " + argname);
            }

            this.argnames.Add(argname);
        }

Usage Example

Example #1
0
        public void DecompileGetArgument()
        {
            Block block = new Block();
            block.CompileArgument("foo");
            block.CompileGet("foo");
            BlockDecompiler decompiler = new BlockDecompiler(block);

            var result = decompiler.Decompile();

            Assert.IsNotNull(result);
            Assert.AreEqual(1, result.Count);
            Assert.AreEqual("GetArgument foo", result[0]);
        }
All Usage Examples Of AjTalk.Language.Block::CompileArgument