summaryrefslogtreecommitdiff
path: root/vendor/github.com/aws/aws-sdk-go/internal/ini/statement.go
blob: 18f3fe893170c851e71e2640cc34445d6e783f89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package ini

// Statement is an empty AST mostly used for transitioning states.
func newStatement() AST {
	return newAST(ASTKindStatement, AST{})
}

// SectionStatement represents a section AST
func newSectionStatement(tok Token) AST {
	return newASTWithRootToken(ASTKindSectionStatement, tok)
}

// ExprStatement represents a completed expression AST
func newExprStatement(ast AST) AST {
	return newAST(ASTKindExprStatement, ast)
}

// CommentStatement represents a comment in the ini definition.
//
//	grammar:
//	comment -> #comment' | ;comment'
//	comment' -> epsilon | value
func newCommentStatement(tok Token) AST {
	return newAST(ASTKindCommentStatement, newExpression(tok))
}

// CompletedSectionStatement represents a completed section
func newCompletedSectionStatement(ast AST) AST {
	return newAST(ASTKindCompletedSectionStatement, ast)
}

// SkipStatement is used to skip whole statements
func newSkipStatement(ast AST) AST {
	return newAST(ASTKindSkipStatement, ast)
}