| 2258 | } |
| 2259 | |
| 2260 | bool HLSLParser::ParseComment(HLSLStatement*& statement) |
| 2261 | { |
| 2262 | if (m_tokenizer.GetToken() != HLSLToken_Comment) |
| 2263 | return false; |
| 2264 | |
| 2265 | const char* textName = m_tree->AddString(m_tokenizer.GetComment()); |
| 2266 | |
| 2267 | // This has already parsed the next comment before have had a chance to |
| 2268 | // grab the string from the previous comment, if they were sequenential comments. |
| 2269 | // So grabbing a copy of comment before this parses the next comment. |
| 2270 | if (!Accept(HLSLToken_Comment)) |
| 2271 | return false; |
| 2272 | |
| 2273 | const char* fileName = GetFileName(); |
| 2274 | int line = GetLineNumber(); |
| 2275 | |
| 2276 | HLSLComment* comment = m_tree->AddNode<HLSLComment>(fileName, line); |
| 2277 | comment->text = textName; |
| 2278 | |
| 2279 | // pass it back |
| 2280 | statement = comment; |
| 2281 | return true; |
| 2282 | } |
| 2283 | |
| 2284 | bool HLSLParser::ParseBlock(HLSLStatement*& firstStatement, const HLSLType& returnType) |
| 2285 | { |
nothing calls this directly
no test coverage detected