示例#1
0
        internal override void Parse(ObjWastTranspiler transpiler)
        {
            // ex. (local $i i32)
            // ex. (local i32)
            // ex. (local i32 i64 f32)
            string identifier = transpiler.ParseIdentifier();
            OwType type       = transpiler.ParseType(Callable.Module);

            if (identifier != null)
            {
                Callable.AddVariable(CreateVariable(identifier, type));
            }
            else
            {
                Callable.AddVariable(CreateVariable(type));

                string name = transpiler.ParseName();

                while (!string.IsNullOrWhiteSpace(name))
                {
                    type = transpiler.ParseType(Callable.Module, name);
                    Callable.AddVariable(CreateVariable(type));

                    name = transpiler.ParseName();
                }
            }
        }
示例#2
0
        internal override void Parse(ObjWastTranspiler transpiler)
        {
            var type = transpiler.ParseType(callable.Module);

            callable.ResultType = type;
        }