Example #1
0
 public override void Parse(string line, IList<string> tokens, IList<Binding> bindings)
 {
     if (tokens.Count < 3)
         throw new ExternalCompilerException("Const buffer bind has too few parameters");
     var newBinding = new BindCB();
     newBinding.name = tokens[1];
     if (!Int32.TryParse(tokens[2], out newBinding.value))
         throw new ExternalCompilerException("Const buffer bind value is invalid");
     bindings.Add(newBinding);
 }
Example #2
0
        public override void Parse(string line, IList <string> tokens, IList <Binding> bindings)
        {
            if (tokens.Count < 3)
            {
                throw new ExternalCompilerException("Const buffer bind has too few parameters");
            }
            var newBinding = new BindCB();

            newBinding.name = tokens[1];
            if (!Int32.TryParse(tokens[2], out newBinding.value))
            {
                throw new ExternalCompilerException("Const buffer bind value is invalid");
            }
            bindings.Add(newBinding);
        }