this repo has no description
www.jonmsterling.com/01HC/
1// SPDX-FileCopyrightText: 2025 The Project Pterodactyl Developers
2//
3// SPDX-License-Identifier: MPL-2.0
4
5import Foundation
6
7enum TheoryName: Grammar {
8 static let kind = SyntaxTreeKind(name: "theory.name")
9 static let kinds = [kind]
10
11 static func before(_ parser: inout Parser) -> Bool {
12 parser.isAt(kind: .identifier)
13 }
14
15 static func inside(_ parser: inout Parser) -> ParseResult {
16 parser.advance(metadata: TokenMetadata(semanticTokenType: .interface))
17 return ParseResult(kind: Self.kind)
18 }
19}
20
21extension SyntaxView<TheoryName> {
22 var text: String { cursor.node.text }
23}