1package ini
2
3// Statement is an empty AST mostly used for transitioning states.
4func newStatement() AST {
5	return newAST(ASTKindStatement, AST{})
6}
7
8// SectionStatement represents a section AST
9func newSectionStatement(tok Token) AST {
10	return newASTWithRootToken(ASTKindSectionStatement, tok)
11}
12
13// ExprStatement represents a completed expression AST
14func newExprStatement(ast AST) AST {
15	return newAST(ASTKindExprStatement, ast)
16}
17
18// CommentStatement represents a comment in the ini definition.
19//
20//	grammar:
21//	comment -> #comment' | ;comment'
22//	comment' -> epsilon | value
23func newCommentStatement(tok Token) AST {
24	return newAST(ASTKindCommentStatement, newExpression(tok))
25}
26
27// CompletedSectionStatement represents a completed section
28func newCompletedSectionStatement(ast AST) AST {
29	return newAST(ASTKindCompletedSectionStatement, ast)
30}
31
32// SkipStatement is used to skip whole statements
33func newSkipStatement(ast AST) AST {
34	return newAST(ASTKindSkipStatement, ast)
35}
36