Skip to content

Commit

Permalink
Better js interop symbols handling
Browse files Browse the repository at this point in the history
  • Loading branch information
candid82 committed May 26, 2018
1 parent 8eade6f commit bf7adf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,7 @@ func parseSymbol(obj Object, ctx *ParseContext) Expr {
// See if this is a JS interop (i.e. Math.PI)
parts := strings.Split(sym.Name(), ".")
if len(parts) > 1 && parts[0] != "" && parts[len(parts)-1] != "" {
return parseSymbol(DeriveReadObject(obj, MakeSymbol(parts[0])), ctx)
return parseSymbol(DeriveReadObject(obj, MakeSymbol(strings.Join(parts[:len(parts)-1], "."))), ctx)
}
}
symNs := ctx.GlobalEnv.NamespaceFor(ctx.GlobalEnv.CurrentNamespace(), sym)
Expand Down

0 comments on commit bf7adf2

Please sign in to comment.