mirror of
https://github.com/robertkrimen/otto.git
synced 2025-12-24 12:58:05 +08:00
fix: remove commented-out code (#323)
Remove old commented out code that was found using: https://go-critic.github.io/overview.html#commentedOutCode-ref
This commit is contained in:
committed by
GitHub
parent
d34fc6f56d
commit
edceeed7a9
@@ -455,7 +455,6 @@ func (self *_parser) parseWithStatement() ast.Statement {
|
||||
self.expect(token.RIGHT_PARENTHESIS)
|
||||
|
||||
if self.mode&StoreComments != 0 {
|
||||
//comments = append(comments, self.comments.FetchAll()...)
|
||||
self.comments.CommentMap.AddComments(node, comments, ast.LEADING)
|
||||
self.comments.CommentMap.AddComments(node, withComments, ast.WITH)
|
||||
}
|
||||
@@ -774,7 +773,6 @@ func (self *_parser) parseIfStatement() ast.Statement {
|
||||
|
||||
func (self *_parser) parseSourceElement() ast.Statement {
|
||||
statement := self.parseStatement()
|
||||
//self.comments.Unset()
|
||||
return statement
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +99,6 @@ func execRegExp(this *_object, target string) (match bool, result []int) {
|
||||
result = this.regExpValue().regularExpression.FindStringSubmatchIndex(target[index:])
|
||||
}
|
||||
if result == nil {
|
||||
//this.defineProperty("lastIndex", toValue_(0), 0111, true)
|
||||
this.put("lastIndex", toValue_int(0), true)
|
||||
return // !match
|
||||
}
|
||||
@@ -114,7 +113,6 @@ func execRegExp(this *_object, target string) (match bool, result []int) {
|
||||
}
|
||||
}
|
||||
if global {
|
||||
//this.defineProperty("lastIndex", toValue_(endIndex), 0111, true)
|
||||
this.put("lastIndex", toValue_int(endIndex), true)
|
||||
}
|
||||
return // match
|
||||
|
||||
Reference in New Issue
Block a user