示例#1
0
        /// <inheritdoc />
        public override void Parse(string line, IList <string> tokens, IList <Binding> bindings)
        {
            if (tokens.Count < 3)
            {
                throw new ExternalCompilerException("ConstBuffer has too few parameters");
            }
            var newBinding = new ConstBuffer();

            newBinding.name = tokens[1];
            if (!Int32.TryParse(tokens[2], out newBinding.size) || !Int32.TryParse(tokens[3], out newBinding.unknown))
            {
                throw new ExternalCompilerException("Invalid ConstBuffer token");
            }
            bindings.Add(newBinding);
        }
示例#2
0
 /// <inheritdoc />
 public override void Parse(string line, IList<string> tokens, IList<Binding> bindings)
 {
     if (tokens.Count < 3)
         throw new ExternalCompilerException("ConstBuffer has too few parameters");
     var newBinding = new ConstBuffer();
     newBinding.name = tokens[1];
     if (!Int32.TryParse(tokens[2], out newBinding.size) || !Int32.TryParse(tokens[3], out newBinding.unknown))
         throw new ExternalCompilerException("Invalid ConstBuffer token");
     bindings.Add(newBinding);
 }