Skip to content

Commit

Permalink
[Ruby] Treat it as keyword.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Jul 9, 2024
1 parent 29b5856 commit c8fcb93
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 26 deletions.
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Latest development builds (artifacts in Release configuration for each compiler
* Apache Configuration File
* [CSV File](https://www.rfc-editor.org/rfc/rfc4180)
* [D](tools/lang/D.d), up to D language 2.0.
* [Dart](tools/lang/Dart.dart), up to Dart 3.3.
* [Dart](tools/lang/Dart.dart), up to Dart 3.4.
* Diff/Patch File
* [F#](tools/lang/FSharp.fs), up to F# 8.0.
* [Fortran](tools/lang/Fortran.f), up to Fortran 2023.
Expand All @@ -87,7 +87,7 @@ Latest development builds (artifacts in Release configuration for each compiler
* [JavaScript](tools/lang/JavaScript.js), up to ECMAScript 2024 with [JSX](https://facebook.github.io/jsx/) and [Web APIs](https://developer.mozilla.org/en-US/docs/Web/API).
* [JSON](https://www.json.org) and [JSON5](https://json5.org/) Document
* [Julia Script](tools/lang/Julia.jl), up to Julia 1.9. [Screenshots](https://github.com/zufuliu/notepad4/wiki/Screenshots#julia)
* [Kotlin](tools/lang/Kotlin.kt), up to Kotlin 1.9.
* [Kotlin](tools/lang/Kotlin.kt), up to Kotlin 2.0.
* LaTeX
* Lisp Script (Common Lisp, Clojure, Scheme, etc.)
* [LLVM IR](tools/lang/LLVM.ll), up to LLVM 16.
Expand Down Expand Up @@ -118,7 +118,7 @@ Latest development builds (artifacts in Release configuration for each compiler
* Windows Rescouce Script
* [R](tools/lang/R.r), up to R 4.2.
* [REBOL](tools/lang/Rebol.r) 3 and [Red](tools/lang/Red.red)
* [Ruby](tools/lang/Ruby.rb), up to Ruby 3.2. [Screenshots](https://github.com/zufuliu/notepad4/wiki/Screenshots#ruby)
* [Ruby](tools/lang/Ruby.rb), up to Ruby 3.3. [Screenshots](https://github.com/zufuliu/notepad4/wiki/Screenshots#ruby)
* [Rust](tools/lang/Rust.rs), up to Rust 1.38. [Screenshots](https://github.com/zufuliu/notepad4/wiki/Screenshots#rust)
* [SAS](tools/lang/SAS.sas), up to SAS Viya 2024.06.
* [Scala](tools/lang/Scala.scala), up to Scala 3.2.
Expand Down Expand Up @@ -151,7 +151,7 @@ Latest development builds (artifacts in Release configuration for each compiler
* SGML and DTD
* Apple Property List
* [YAML Document](https://yaml.org/)
* [Zig](tools/lang/Zig.zig), up to Zig 0.12.
* [Zig](tools/lang/Zig.zig), up to Zig 0.13.
* Many Others
* Toggle fold for specific level, shortcuts: <kbd>Alt</kbd>+<kbd>Number</kbd>
* Toggle fold for current block without scrolling back to the block start line, shortcut: <kbd>Alt</kbd>+<kbd>C</kbd>, or context menu "Toggle Fold"
Expand Down
2 changes: 1 addition & 1 deletion src/EditLexers/stlRuby.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
static KEYWORDLIST Keywords_Ruby = {{
//++Autogenerated -- start of section automatically generated
"BEGIN END __ENCODING__ __FILE__ __LINE__ alias and begin break case class def defined? do else elsif end ensure "
"false for if in module next nil not or redo rescue retry return self super then true undef unless until when while "
"false for if in it module next nil not or redo rescue retry return self super then true undef unless until when while "
"yield "

, // 1 code folding
Expand Down
2 changes: 1 addition & 1 deletion tools/lang/Dart.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 3.3 https://dart.dev/
// 3.4 https://dart.dev/
// https://dart.dev/guides/language/language-tour
// 2.13 https://dart.dev/guides/language/spec
// https://github.com/dart-lang/language
Expand Down
2 changes: 1 addition & 1 deletion tools/lang/Kotlin.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Kotlin 1.9 https://kotlinlang.org/docs/home.html
// Kotlin 2.0 https://kotlinlang.org/docs/home.html

//! Keywords ===========================================================
// https://kotlinlang.org/docs/keyword-reference.html
Expand Down
28 changes: 10 additions & 18 deletions tools/lang/Ruby.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ruby 3.2 https://www.ruby-lang.org/en/documentation/
# Ruby 3.3 https://www.ruby-lang.org/en/documentation/
# https://docs.ruby-lang.org/en/
# https://ruby-doc.org/
# https://rubyreferences.github.io/
Expand All @@ -10,32 +10,24 @@
__FILE__
BEGIN
END
alias
and
alias and
break
defined?
else
elsif
ensure
else elsif ensure
false
in
next
nil
not
next nil not
or
redo
rescue
retry
return
self
super
then
true
redo rescue retry return
self super
then true
undef
when
end
yield

# https://bugs.ruby-lang.org/issues/18980
it

#! Pre-defined constants ===================================================
# globals_rdoc.html#label-Pre-defined+global+constants
TRUE
Expand Down
2 changes: 1 addition & 1 deletion tools/lang/Zig.zig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 0.12 https://ziglang.org/
// 0.13 https://ziglang.org/
// https://ziglang.org/documentation/master/

//! keywords =======================================================
Expand Down

0 comments on commit c8fcb93

Please sign in to comment.