mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Syntax] Abolish 'backtick' trivia
- Stop producing 'backtick' trivia for escaping identifier token. '`'s are now parts of the token text - Adjust and simplify C++ libSyntax APIs - Add 'is_deprecated' property to Trivia.py to attribute SwiftSyntax APIs rdar://problem/54810608
This commit is contained in:
@@ -30,7 +30,7 @@ ParsedRawSyntaxNode
|
||||
ParsedRawSyntaxRecorder::recordToken(const Token &tok,
|
||||
const ParsedTrivia &leadingTrivia,
|
||||
const ParsedTrivia &trailingTrivia) {
|
||||
return recordToken(tok.getKind(), tok.getRangeWithoutBackticks(),
|
||||
return recordToken(tok.getKind(), tok.getRange(),
|
||||
leadingTrivia.Pieces, trailingTrivia.Pieces);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ getRecordedNode(const ParsedRawSyntaxNode &node, ParsedRawSyntaxRecorder &rec) {
|
||||
if (node.isDeferredLayout())
|
||||
return rec.recordRawSyntax(node.getKind(), node.getDeferredChildren());
|
||||
assert(node.isDeferredToken());
|
||||
CharSourceRange tokRange = node.getDeferredTokenRangeWithoutBackticks();
|
||||
CharSourceRange tokRange = node.getDeferredTokenRange();
|
||||
tok tokKind = node.getTokenKind();
|
||||
if (node.isMissing())
|
||||
return rec.recordMissingToken(tokKind, tokRange.getStart());
|
||||
|
||||
Reference in New Issue
Block a user