mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-07-06 14:14:07 +00:00
Update dependencies and go1.18 (#1873)
* Update dependencies and go1.18 * Exclude unnecessary linters and update build to go1.18
This commit is contained in:
2
vendor/github.com/d5/tengo/v2/README.md
generated
vendored
2
vendor/github.com/d5/tengo/v2/README.md
generated
vendored
@ -144,7 +144,7 @@ fmt.Println(res) // "success"
|
||||
- [Interoperability](https://github.com/d5/tengo/blob/master/docs/interoperability.md)
|
||||
- [Tengo CLI](https://github.com/d5/tengo/blob/master/docs/tengo-cli.md)
|
||||
- [Standard Library](https://github.com/d5/tengo/blob/master/docs/stdlib.md)
|
||||
- Syntax Highlighters: [VSCode](https://github.com/lissein/vscode-tengo), [Atom](https://github.com/d5/tengo-atom)
|
||||
- Syntax Highlighters: [VSCode](https://github.com/lissein/vscode-tengo), [Atom](https://github.com/d5/tengo-atom), [Vim](https://github.com/geseq/tengo-vim)
|
||||
- **Why the name Tengo?** It's from [1Q84](https://en.wikipedia.org/wiki/1Q84).
|
||||
|
||||
|
||||
|
9
vendor/github.com/d5/tengo/v2/compiler.go
generated
vendored
9
vendor/github.com/d5/tengo/v2/compiler.go
generated
vendored
@ -692,12 +692,15 @@ func (c *Compiler) compileAssign(
|
||||
return c.errorf(node, "operator ':=' not allowed with selector")
|
||||
}
|
||||
|
||||
_, isFunc := rhs[0].(*parser.FuncLit)
|
||||
symbol, depth, exists := c.symbolTable.Resolve(ident, false)
|
||||
if op == token.Define {
|
||||
if depth == 0 && exists {
|
||||
return c.errorf(node, "'%s' redeclared in this block", ident)
|
||||
}
|
||||
symbol = c.symbolTable.Define(ident)
|
||||
if isFunc {
|
||||
symbol = c.symbolTable.Define(ident)
|
||||
}
|
||||
} else {
|
||||
if !exists {
|
||||
return c.errorf(node, "unresolved reference '%s'", ident)
|
||||
@ -718,6 +721,10 @@ func (c *Compiler) compileAssign(
|
||||
}
|
||||
}
|
||||
|
||||
if op == token.Define && !isFunc {
|
||||
symbol = c.symbolTable.Define(ident)
|
||||
}
|
||||
|
||||
switch op {
|
||||
case token.AddAssign:
|
||||
c.emit(node, parser.OpBinaryOp, int(token.Add))
|
||||
|
Reference in New Issue
Block a user