Appearance
| 1 | namespace Syntax.Parsers.Statements is | |
| 2 | use Source; | |
| 3 | ||
| 4 | class PRAGMA( | |
| 5 | pragma_parser: Parser[Trees.Pragmas.PRAGMA], | |
| 6 | statement_parser: Parser[Trees.Statements.Statement] | |
| 7 | ): Base[Trees.Statements.PRAGMA] is | |
| 8 | super(); | |
| 9 | ||
| 10 | parse(context: CONTEXT) -> Trees.Statements.PRAGMA? is | |
| 11 | let pragma = pragma_parser.parse(context); | |
| 12 | ||
| 13 | if pragma? /\ !pragma.is_poisoned then | |
| 14 | let statement = statement_parser.parse(context); | |
| 15 | ||
| 16 | if statement? /\ !statement.is_poisoned then | |
| 17 | return Trees.Statements.PRAGMA(pragma.location::statement.location, pragma, statement); | |
| 18 | fi | |
| 19 | fi | |
| 20 | return null; | |
| 21 | si | |
| 22 | si | |
| 23 | si |