// isStatement returns true if next token starts a statement
510523
func (p *parser) isStatement() bool {
	if !p.have(1) {
		return false
	}

	switch p.next().Kind {
	case lexer.TokenOpen, lexer.TokenOpenUnescaped, lexer.TokenOpenBlock,
		lexer.TokenOpenInverse, lexer.TokenOpenRawBlock, lexer.TokenOpenPartial,
		lexer.TokenContent, lexer.TokenComment:
		return true
	}

	return false
}
815268
func isInitialism(word string) (string, bool) {
	initialism := strings.ToUpper(word)
	_, ok := initialisms[initialism]
	return initialism, ok
}
60561
func (fds *FDSet) IsSet(fd uintptr) bool {
	if isset, err := __WSAFDIsSet(syscall.Handle(fd), fds); err == nil && isset != 0 {
		return true
	}
	return false
}
1174398
func (f *FlagClause) IsSetByUser(setByUser *bool) *FlagClause {
	if setByUser != nil {
		*setByUser = false
	}
	f.setByUser = setByUser
	return f
}
433785
func (tc *TiDBContext) GetStatement(stmtID int) PreparedStatement {
	tcStmt := tc.stmts[stmtID]
	if tcStmt != nil {
		return tcStmt
	}
	return nil
}
419665
func blockStatementFromDescribe(desc *ast.CallExpr) *ast.BlockStmt {
	var funcLit *ast.FuncLit
	var found = false

	for _, node := range desc.Args {
		switch node := node.(type) {
		case *ast.FuncLit:
			found = true
			funcLit = node
			break
		}
	}

	if !found {
		panic("Error finding ast.FuncLit inside describe statement. Somebody done goofed.")
	}

	return funcLit.Body
}
943554
func (v *DefaultVisitor) VisitStatement(stmt AST) error {
	switch stmt.Kind {
	case ASTKindCompletedSectionStatement:
		child := stmt.GetRoot()
		if child.Kind != ASTKindSectionStatement {
			return NewParseError(fmt.Sprintf("unsupported child statement: %T", child))
		}

		name := string(child.Root.Raw())
		v.Sections.container[name] = Section{}
		v.scope = name
	default:
		return NewParseError(fmt.Sprintf("unsupported statement: %s", stmt.Kind))
	}

	return nil
}
153311
func LexDialectForStatement(l *Lexer) StateFn {

	l.SkipWhiteSpaces()

	r := l.Peek()

	switch r {
	case '/', '-', '#':
		// ensure we have consumed all initial pre-statement comments
		l.Push("LexDialectForStatement", LexDialectForStatement)
		return LexComment(l)
	default:
		peekWord := strings.ToLower(l.PeekWord())
		for _, stmt := range l.dialect.Statements {
			if l.IsEnd() {
				break
			}

			//u.Warnf("LexDialectForStatement peek=%s  keyword=%v ", peekWord, stmt.Token.String())
			if stmt.MatchesKeyword(peekWord, l) {
				// We aren't actually going to consume anything here, just find
				// the correct statement
				l.statement = stmt
				l.curClause = stmt
				if len(stmt.Clauses) > 0 {
					l.curClause = stmt.Clauses[0]
				}
				//u.Infof("statement: %s  curClause %s", l.statement, l.curClause)
				return LexStatement
			} else if stmt.Token == TokenNil {
				if len(stmt.Clauses) == 1 {
					l.statement = stmt
					l.curClause = stmt
					if len(stmt.Clauses) > 0 {
						l.curClause = stmt.Clauses[0]
					}
					return l.clauseState()
				}
				l.statement = stmt
				l.curClause = stmt
				if len(stmt.Clauses) > 0 {
					l.curClause = stmt.Clauses[0]
				}
				return LexStatement
			}

		}
		return l.errorToken("un recognized keyword token:" + peekWord)

	}
}
160573
func isValidStatement(statement Statement, bucketName string) bool {
	if statement.Actions.Intersection(validActions).IsEmpty() {
		return false
	}

	if statement.Effect != "Allow" {
		return false
	}

	if statement.Principal.AWS == nil || !statement.Principal.AWS.Contains("*") {
		return false
	}

	bucketResource := awsResourcePrefix + bucketName
	if statement.Resources.Contains(bucketResource) {
		return true
	}

	if statement.Resources.FuncMatch(startsWithFunc, bucketResource+"/").IsEmpty() {
		return false
	}

	return true
}
926750
func newUpdateStatement(table WritableTable) UpdateStatement {
	return &updateStatementImpl{
		table:        table,
		updateValues: make(map[NonAliasColumn]Expression),
		limit:        -1,
	}
}
503839
func IsJaeum(r rune) bool {
	switch {
	case G <= r && r <= H:
		return true
	case IsLead(r):
		return true
	case IsTail(r):
		return true
	}
	return false
}
1124378
func IsMention(evt *slack.MessageEvent) bool {
	results := regexp.MustCompile(`<@([a-zA-z0-9]+)?>`).FindAllStringSubmatch(evt.Text, -1)
	return len(results) > 0
}
43184
func (node *Program) AddStatement(statement Node) {
	node.Body = append(node.Body, statement)
}
344818
func MustParseStatement(input string) Statement {
	parsed, err := ParseStatement(input)
	if err != nil {
		panic(err)
	}
	return parsed
}
1020522
func (l *Lexer) isString(str string) bool {
	return strings.HasPrefix(l.input[l.pos:], str)
}
751175
func (self *_parser) nextStatement() {
	for {
		switch self.token {
		case token.BREAK, token.CONTINUE,
			token.FOR, token.IF, token.RETURN, token.SWITCH,
			token.VAR, token.DO, token.TRY, token.WITH,
			token.WHILE, token.THROW, token.CATCH, token.FINALLY:
			// Return only if parser made some progress since last
			// sync or if it has not reached 10 next calls without
			// progress. Otherwise consume at least one token to
			// avoid an endless parser loop
			if self.idx == self.recover.idx && self.recover.count < 10 {
				self.recover.count++
				return
			}
			if self.idx > self.recover.idx {
				self.recover.idx = self.idx
				self.recover.count = 0
				return
			}
			// Reaching here indicates a parser bug, likely an
			// incorrect token list in this function, but it only
			// leads to skipping of possibly correct code if a
			// previous error is present, and thus is preferred
			// over a non-terminating parse.
		case token.EOF:
			return
		}
		self.next()
	}
}
542274
func (s *AddPermissionOutput) SetStatement(v string) *AddPermissionOutput {
	s.Statement = &v
	return s
}