コード例 #1
0
        unsafe void Parse(string source)
        {
            char *token;

            fixed(char *str = source)
            while ((token = CString.FindToken(str, "struct")) != null)
            {
                ParseStruct(CString.GetBlock(token, &str));

                fixed(char *str = source)
                while ((token = CString.FindToken(str, "cbuffer")) != null)
                    ParseCBuffer(CString.GetBlock(token, &str));

                fixed(char *str = source)
                while ((token = CString.FindToken(str, "Texture2D")) != null)
                    ParseTexture(CString.GetStatement(token, &str));

                fixed(char *str = source)
                while ((token = CString.FindToken(str, "TextureCube")) != null)
                    ParseTexture(CString.GetStatement(token, &str));
}
        }