[Parse/AST] Remove PoundDiagnosticDecl

There is no reson to make a AST node for '#error' and '#warning'
directives. Parser knows the diagnostics should be emitted or not.
This commit is contained in:
Rintaro Ishizaki
2025-03-07 20:46:18 -08:00
parent 9edb7f95cb
commit 002d7d7cdf
37 changed files with 57 additions and 192 deletions

View File

@@ -178,5 +178,37 @@
key.offset: 336,
key.length: 6
}
],
key.diagnostics: [
{
key.line: 12,
key.column: 8,
key.filepath: syntaxmap-pound-keyword.swift,
key.severity: source.diagnostic.severity.error,
key.id: "pound_error",
key.description: "Error",
key.diagnostic_stage: source.diagnostic.stage.swift.parse,
key.ranges: [
{
key.offset: 224,
key.length: 7
}
]
},
{
key.line: 14,
key.column: 10,
key.filepath: syntaxmap-pound-keyword.swift,
key.severity: source.diagnostic.severity.warning,
key.id: "pound_warning",
key.description: "Warning",
key.diagnostic_stage: source.diagnostic.stage.swift.parse,
key.ranges: [
{
key.offset: 255,
key.length: 9
}
]
}
]
}