parser/parser.go
Parser
has 34 methods (exceeds 20 allowed). Consider refactoring. Open
Open
type Parser struct {
l *lexer.Lexer
errors []string
curToken token.Token
Method Parser.parseIfExpression
has 5 return statements (exceeds 4 allowed). Open
Open
func (p *Parser) parseIfExpression() ast.Expression {
expression := &ast.IfExpression{Token: p.curToken}
if !p.expectPeek(token.LPAREN) {
// error
exported type Parser should have comment or be unexported Open
Open
type Parser struct {
- Exclude checks
exported method Parser.ParseProgram should have comment or be unexported Open
Open
func (p *Parser) ParseProgram() *ast.Program {
- Exclude checks
exported const TRACE should have comment or be unexported Open
Open
const TRACE = false
- Exclude checks
exported const LOWEST should have comment (or a comment on this block) or be unexported Open
Open
LOWEST
- Exclude checks
exported function New should have comment or be unexported Open
Open
func New(l *lexer.Lexer) *Parser {
- Exclude checks
exported method Parser.Errors should have comment or be unexported Open
Open
func (p *Parser) Errors() []string {
- Exclude checks
if block ends with a return statement, so drop this else and outdent its block Open
Open
} else {
- Exclude checks