Skip to content

Commit a1c2327

Browse files
committed
Remove #assert token and syntax node
1 parent 16baa8b commit a1c2327

File tree

3 files changed

+2
-17
lines changed

3 files changed

+2
-17
lines changed

Sources/SwiftParser/TokenPrecedence.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ public enum TokenPrecedence: Comparable {
144144
self = .weakBracketClose
145145

146146
// MARK: Statement keyword punctuator
147-
case // #error, #warning and #assert are statement-like
148-
.poundErrorKeyword, .poundWarningKeyword, .poundAssertKeyword:
147+
case // #error, #warning is statement-like
148+
.poundErrorKeyword, .poundWarningKeyword:
149149
self = .stmtKeyword
150150

151151
// MARK: Strong bracketet

gyb_syntax_support/StmtNodes.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -328,18 +328,4 @@
328328
collection_element_name='CatchItem', is_optional=True),
329329
Child('Body', kind='CodeBlock'),
330330
]),
331-
332-
# e.g. #assert(1 == 2)
333-
Node('PoundAssertStmt', name_for_diagnostics="'#assert' directive", kind='Stmt',
334-
children=[
335-
Child('PoundAssert', kind='PoundAssertToken'),
336-
Child('LeftParen', kind='LeftParenToken'),
337-
Child('Condition', kind='Expr', name_for_diagnostics='condition',
338-
description='The assertion condition.'),
339-
Child('Comma', kind='CommaToken', is_optional=True,
340-
description='The comma after the assertion condition.'),
341-
Child('Message', kind='StringLiteralExpr', name_for_diagnostics='message', is_optional=True,
342-
description='The assertion message.'),
343-
Child('RightParen', kind='RightParenToken'),
344-
]),
345331
]

gyb_syntax_support/Token.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ def macro_name(self):
238238
PoundKeyword('PoundColumn', 'column', text='#column'),
239239
PoundKeyword('PoundFunction', 'function', text='#function'),
240240
PoundKeyword('PoundDsohandle', 'dsohandle', text='#dsohandle'),
241-
PoundKeyword('PoundAssert', 'assert', text='#assert'),
242241

243242
PoundDirectiveKeyword('PoundSourceLocation', 'sourceLocation',
244243
text='#sourceLocation'),

0 commit comments

Comments
 (0)