You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
terraform/testharness/lua_util.go

20 lines
409 B

package testharness
import (
"github.com/hashicorp/hcl2/hcl"
lua "github.com/yuin/gopher-lua"
)
func callingRange(L *lua.LState, level int) *hcl.Range {
d, ok := L.GetStack(level)
if !ok {
return nil
}
L.GetInfo("Sl", d, nil)
return &hcl.Range{
Filename: d.Source,
Start: hcl.Pos{Line: d.CurrentLine, Column: 1, Byte: -1},
End: hcl.Pos{Line: d.CurrentLine, Column: 1, Byte: -1},
}
}