@@ -70,7 +70,7 @@ enum Parsers {
7070 return try updateStmt ( state: & state)
7171 case ( . delete, _) :
7272 return try deleteStmt ( state: & state)
73- case ( . define , _) :
73+ case ( . identifier , _) :
7474 return try definition ( state: & state)
7575 case ( . pragma, _) :
7676 return try pragma ( state: & state)
@@ -180,7 +180,7 @@ enum Parsers {
180180
181181 static func vacuum( state: inout ParserState ) -> VacuumStmtSyntax {
182182 let start = state. take ( )
183- let schema = state. current. kind. isSymbol ? identifier ( state: & state) : nil
183+ let schema = state. current. kind. isIdentifier ? identifier ( state: & state) : nil
184184 let fileName = state. take ( if: . into) ? identifier ( state: & state) : nil
185185 return VacuumStmtSyntax (
186186 id: state. nextId ( ) ,
@@ -400,7 +400,7 @@ enum Parsers {
400400 schema = nil
401401 }
402402
403- let name = state. current. kind. isSymbol ? identifier ( state: & state) : nil
403+ let name = state. current. kind. isIdentifier ? identifier ( state: & state) : nil
404404 return ReindexStmtSyntax (
405405 id: state. nextId ( ) ,
406406 schemaName: schema,
@@ -1461,7 +1461,7 @@ enum Parsers {
14611461 } else {
14621462 let name = identifier ( state: & state)
14631463
1464- let type = state. current. kind. isSymbol && state. current. kind != . unindexed
1464+ let type = state. current. kind. isIdentifier && state. current. kind != . unindexed
14651465 ? typeName ( state: & state, doNotConsumeWords: [ " UNINDEXED " ] )
14661466 : nil
14671467
@@ -1504,7 +1504,7 @@ enum Parsers {
15041504 repeat {
15051505 let column = try columnDef ( state: & state)
15061506 columns [ column. name] = column
1507- } while state. take ( if: . comma) && state. current. kind. isSymbol
1507+ } while state. take ( if: . comma) && state. current. kind. isIdentifier
15081508
15091509 return columns
15101510 }
@@ -2302,10 +2302,8 @@ enum Parsers {
23022302 }
23032303 }
23042304
2305- /// This is a custom thing, `DEFINE QUERY ...`
2305+ /// This is a custom thing, `queryName(input: Name): ...`
23062306 static func definition( state: inout ParserState ) throws -> StmtSyntax {
2307- let define = state. take ( . define)
2308- state. skip ( . query)
23092307 let name = identifier ( state: & state)
23102308
23112309 let params : [ Substring : IdentifierSyntax ] ? = take ( if: . openParen, state: & state) { state in
@@ -2321,7 +2319,7 @@ enum Parsers {
23212319 }
23222320 }
23232321
2324- state. skip ( . as )
2322+ state. skip ( . colon )
23252323 let stmt = try stmt ( state: & state)
23262324
23272325 return QueryDefinitionStmtSyntax (
@@ -2330,7 +2328,7 @@ enum Parsers {
23302328 input: params ? [ " input " ] ,
23312329 output: params ? [ " output " ] ,
23322330 statement: stmt,
2333- location: define . location. spanning ( state. current. location)
2331+ location: name . location. spanning ( state. current. location)
23342332 )
23352333 }
23362334
0 commit comments