Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade using C9 Tern for ideas #21

Open
Sevin777 opened this issue Mar 3, 2015 · 0 comments
Open

Upgrade using C9 Tern for ideas #21

Sevin777 opened this issue Mar 3, 2015 · 0 comments

Comments

@Sevin777
Copy link
Owner

Sevin777 commented Mar 3, 2015

https://github.com/c9/c9.ide.language.javascript.tern

https://github.com/c9/c9.ide.language.jsonalyzer

See get call position function:

function getCallNode(currentNode, cursorPos) {
    var result;
    currentNode.traverseUp(
        'Call(e, args)', 'New(e, args)', function(b, node) {
            result = node;
            return node;
        },
        function(node) {
            // Show tooltip only on first line if call spans multiple lines
            var pos = node.getPos();
            if (pos && pos.sl !== cursorPos.row)
                return node;
        }
    );
    return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant