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

Add _class and _while keywords to magik lexer #1251

Merged
merged 2 commits into from
Jul 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/rouge/lexers/magik.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ def self.keywords
_throw
_lock _endlock
_if _then _elif _else _endif
_for _over _loop _endloop _loopbody _continue _leave
_for _over _while _loop _endloop _loopbody _continue _leave
_return
_class
_local _constant _recursive _global _dynamic _import
_private _iter _abstract _method _endmethod
_proc _endproc
Expand Down
8 changes: 7 additions & 1 deletion spec/visual/samples/magik
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ def_slotted_exemplar(
:test_object,
{
{:slot, _unset}
})
},
{_class |java.lang.Integer|})
$

_pragma(classify_level=basic, topic={test_topic, rouge})
Expand All @@ -26,6 +27,11 @@ _method test_object.method_name(arg_1, _gather args)
_local l_y << _true
l_y _and<< _true

_while _true
_loop
_leave
_endloop

# numbers
45, 0, -101
2r101, -8r123
Expand Down