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

Added support for method(\t syntax for operators #1

Merged
merged 4 commits into from
Sep 26, 2013

Conversation

ivarne
Copy link

@ivarne ivarne commented Sep 26, 2013

Operators like (><=|&+-*/%^~!) was not supported in the original version. This patch adds that capability.

rl_line_buffer[tokenstart] == '!')) {
tokenstart--;
// check for special operators
if (strchr("\\><=|&+-*/%^~!", rl_line_buffer[tokenstart])){
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should ! be in this list? It seems like this would make push! give completions for !.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it must be handled separatly. Should this logic be written in julia repl_methods instead, so that iJulia and REPL.jl can just copy the result?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any problem with sending the whole buffer there?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can send the whole buffer, and eventually I think we do want one canonical token extraction function written in Julia, although I'm not sure if that needs to be part of this PR. There's already something in REPLCompletions.jl, although it might have the same problems with operators.

tokenstart--;
}
tokenstart++;
// ! can't be the first character of a function, unless is's the only
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to nitpick, but there's still a small typo here (is's -> it's)

simonster added a commit that referenced this pull request Sep 26, 2013
Added support for method(\t syntax for operators
@simonster simonster merged commit 25becac into simonster:methods2 Sep 26, 2013
@ivarne ivarne deleted the methods2 branch December 10, 2013 12:40
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

Successfully merging this pull request may close these issues.

2 participants