squawk_syntax/ast/
traits.rs1use crate::ast;
4use crate::ast::{AstNode, support};
5
6pub trait NameLike: AstNode {}
7
8pub trait HasCreateTable: AstNode {
9 #[inline]
10 fn path(&self) -> Option<ast::Path> {
11 support::child(self.syntax())
12 }
13
14 #[inline]
15 fn table_arg_list(&self) -> Option<ast::TableArgList> {
16 support::child(self.syntax())
17 }
18}
19
20pub trait HasWithClause: AstNode {
21 #[inline]
22 fn with_clause(&self) -> Option<ast::WithClause> {
23 support::child(self.syntax())
24 }
25}
26
27pub trait HasParamList: AstNode {
28 fn param_list(&self) -> Option<ast::ParamList> {
29 support::child(self.syntax())
30 }
31}