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

Update legacy lexers #76

Open
orbitalquark opened this issue Sep 5, 2022 · 5 comments · May be fixed by #130
Open

Update legacy lexers #76

orbitalquark opened this issue Sep 5, 2022 · 5 comments · May be fixed by #130
Labels
help wanted Extra attention is needed

Comments

@orbitalquark
Copy link
Owner

orbitalquark commented Sep 5, 2022

Scintillua 6.0 considers lexers from Scintillua 5.x to be legacy lexers. While legacy lexers should still function properly, they ought to be migrated using this migration guide.

In addition to the steps outlined in the migration guide, programming language lexers should ideally distinguish between functions, builtin functions, and methods. They should also distinguish between constants and builtin constants, and variables and builtin variables. For example, the Lua lexer does so here and here. The Makefile lexer does so here.

Lexers that use custom tokens should try and pick from the updated list of tags. If that is not possible/reasonable, it may be worth considering adding to that list. Otherwise, it should remain a custom tag name and a style should be set for it for all themes in themes/. That will signal that applications will need to add styling for it.

The following unchecked Scintillua lexers still need to be migrated:

  • Actionscript
  • Ada
  • ANTLR
  • APDL
  • APL
  • Applescript
  • ASM (NASM)
  • ASP
  • AutoIt
  • AWK
  • Batch
  • BibTeX
  • Boo
  • C
  • C++
  • C#
  • ChucK
  • Clojure
  • CMake
  • Coffeescript
  • ConTeXt
  • CSS
  • CUDA
  • D
  • Dart
  • Desktop Entry
  • Diff
  • Django
  • Dockerfile
  • Dot
  • Eiffel
  • Elixir
  • Elm
  • Erlang
  • F#
  • Fantom
  • Faust
  • Fennel
  • Fish
  • Forth
  • Fortran
  • fstab
  • GAP
  • Gemini
  • gettext
  • Gherkin
  • git-rebase
  • Gleam
  • GLSL
  • Gnuplot
  • Go
  • Groovy
  • Gtkrc
  • Hare
  • Haskell
  • HTML
  • Icon
  • IDL
  • Inform
  • ini
  • Io
  • Java
  • Javascript
  • jq
  • JSON
  • JSP
  • Julia
  • LaTeX
  • Ledger
  • LESS
  • LilyPond
  • Lisp
  • Literate Coffeescript
  • Logtalk
  • Lua
  • Makefile
  • Man Page
  • Markdown
  • MATLAB
  • MediaWiki
  • Meson
  • MoonScript
  • Myrddin
  • Nemerle
  • Networkd
  • Nim
  • NSIS
  • Objective-C
  • OCaml
  • Pascal
  • Perl
  • PHP
  • PICO-8
  • Pike
  • PKGBUILD
  • Pony
  • Postscript
  • PowerShell
  • Prolog
  • Properties
  • Pure
  • Python
  • R
  • rc
  • Reason
  • REBOL
  • ReStructuredText
  • Rexx
  • RHTML
  • RouterOS
  • RPM Spec
  • Ruby
  • Ruby on Rails
  • Rust
  • Sass
  • Scala
  • Scheme
  • Shell
  • Smalltalk
  • strace
  • Standard ML
  • SNOBOL4
  • Spin
  • SQL
  • Systemd
  • TaskPaper
  • Tcl
  • TeX
  • Texinfo
  • TOML
  • txt2tags
  • TypeScript
  • Vala
  • vCard
  • Verilog
  • VHDL
  • Visual Basic
  • Windows Script File
  • XML
  • Xs
  • Xtend
  • YAML
  • Zig
@mcepl
Copy link

mcepl commented Sep 23, 2024

Is this check list kept up-to-date?

@orbitalquark
Copy link
Owner Author

Yes, I try to keep it up to date.

@samuelmarquis
Copy link

Hit the Haskell lexer in #123

@mcepl
Copy link

mcepl commented Jan 15, 2025

It seems to me that many of them have been modernized already:

So, to be exact, when trying to find a lexer, where I could help with fixing this bug, I haven’t found a one, which wouldn’t be modern, and grep -l '\bM\.' lexers/*.lua also didn’t gave me anything else than lexers/lexer.lua.

@orbitalquark
Copy link
Owner Author

The lexers you link have not been migrated according to the migration guide in this issue's original post (https://orbitalquark.github.io/scintillua/api.html#migrating-legacy-lexers). For example, consider the actionscript.lua lexer you linked to.

It starts with

local lex = lexer.new('actionscript')

-- Whitespace.
lex:add_rule('whitespace', token(lexer.WHITESPACE, lexer.space^1))

but applying the migration steps would yield

local lex = lexer.new(...)

(note the lack of whitespace rule, which is now implicit).

There may be some confusion regarding object-oriented lexers vs. migrated lexers. For that I am sorry. I hope the migration guide I linked to makes it clear though.

mcepl added a commit to mcepl/scintillua that referenced this issue Jan 16, 2025
mcepl added a commit to mcepl/scintillua that referenced this issue Jan 16, 2025
mcepl added a commit to mcepl/scintillua that referenced this issue Jan 16, 2025
@mcepl mcepl linked a pull request Jan 16, 2025 that will close this issue
mcepl added a commit to openSUSE-Python/scintillua that referenced this issue Jan 16, 2025
mcepl added a commit to openSUSE-Python/scintillua that referenced this issue Jan 16, 2025
mcepl added a commit to openSUSE-Python/scintillua that referenced this issue Jan 16, 2025
mcepl added a commit to openSUSE-Python/scintillua that referenced this issue Jan 16, 2025
mcepl added a commit to openSUSE-Python/scintillua that referenced this issue Jan 16, 2025
mcepl added a commit to openSUSE-Python/scintillua that referenced this issue Jan 16, 2025
mcepl added a commit to openSUSE-Python/scintillua that referenced this issue Jan 17, 2025
mcepl added a commit to openSUSE-Python/scintillua that referenced this issue Jan 17, 2025
mcepl added a commit to openSUSE-Python/scintillua that referenced this issue Jan 17, 2025
mcepl added a commit to openSUSE-Python/scintillua that referenced this issue Jan 18, 2025
mcepl added a commit to openSUSE-Python/scintillua that referenced this issue Jan 18, 2025
mcepl added a commit to openSUSE-Python/scintillua that referenced this issue Jan 18, 2025
mcepl added a commit to openSUSE-Python/scintillua that referenced this issue Jan 18, 2025
mcepl added a commit to openSUSE-Python/scintillua that referenced this issue Jan 18, 2025
mcepl added a commit to openSUSE-Python/scintillua that referenced this issue Jan 18, 2025
mcepl added a commit to openSUSE-Python/scintillua that referenced this issue Jan 18, 2025
mcepl added a commit to openSUSE-Python/scintillua that referenced this issue Jan 18, 2025
mcepl added a commit to openSUSE-Python/scintillua that referenced this issue Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
3 participants