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

[pull] master from rouge-ruby:master #289

Open
wants to merge 178 commits into
base: master
Choose a base branch
from

Conversation

pull[bot]
Copy link

@pull pull bot commented Jan 12, 2022

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

mojavelinux and others added 2 commits January 12, 2022 20:19
* don't crash if last line of console snippet ends with \

* simplify line regex for console lexer
* Initial stata commit

* Updated stata syntax

* Updated highlighting

* Update stata.rb

* Updated highlighting

* Fixed single line comment issue

* Fixed issue with \n

* Update stata.rb

* Added numeric formats

* Added str1-str2045

* Update stata.rb

* Update stata.rb

* compound doubles added

* More keywords

* Added operators

* Update stata.rb

* Update stata.rb

* Update stata.rb

* Update stata.rb

* Update stata.rb

* Update stata.rb

* Addressed reviewer comments

Added end of line to sample file
Fixed indentations
Added reference to Stata manual
Changed KEYWORD_TYPES and KEYWORDS_RESERVED to use class methods

* Rename methods and vacuum trailing spaces

* Update stata.rb

Co-authored-by: Tan Le <tan.le@hey.com>
@pull pull bot added the ⤵️ pull label Jan 12, 2022
tancnle and others added 27 commits January 12, 2022 23:07
* Add puma as development dependency for Ruby 3.0

Ruby 3.0 no longer ships with a built-in webserver

* Update Gemfile

Co-authored-by: Tan Le <tan.le@hey.com>

Co-authored-by: Tan Le <tan.le@hey.com>
* Rust: remove constant "nil"

The word "nil" has no special meaning in the latest version of Rust.

* Rust: update keyword list

Added:

They are keywords in the latest version of Rust.

* `abstract`
* `become`
* `final`
* `in`
* `override`
* `typeof`
* `unsized`
* `virtual`

Removed:

They are *not* keywords in the latest version of Rust.

* `assert`
* `copy`
* `drop`
* `fail`
* `pure`
* resolves #1709 support Cypher multi-line comments

* Remove empty line

* Add newline at the end of the file
This commit adds @tancnle as a maintainer. He joined as a maintainer
from 10 December 2021.
HCL is used in [Terraform which uses the `.tf` file
extension](https://www.nomadproject.io/docs/commands/job/run#examples)
but it is already handled by the [terraform
lexer](https://github.com/rouge-ruby/rouge/blob/master/lib/rouge/lexers/terraform.rb).
But HCL is also used by other Hashicorp tools like:
 * [Packer which uses the `.pkr.hcl`
   extension](https://www.nomadproject.io/docs/commands/job/run#examples)
 * [Vault which uses the `.hcl`
   extension](https://www.vaultproject.io/docs/commands/server#command-options)
 * [Consul which uses the `.hcl`
   extension](https://www.consul.io/docs/agent/options#configuration)
 * [Waypoint which uses the `waypoint.hcl`
   file](https://www.waypointproject.io/docs/waypoint-hcl#project-configuration-waypoint-hcl)
 * [Nomad which uses the `.nomad`
   extension](https://www.nomadproject.io/docs/commands/job/run#examples)
   but also [Nomad Packs which uses the `.hcl`
   extension](https://learn.hashicorp.com/tutorials/nomad/nomad-pack-writing-packs#add-a-new-pack)

(in fact the [list of HCL
Schemas](https://learn.hashicorp.com/tutorials/nomad/nomad-pack-writing-packs#add-a-new-pack)
seems to be the most comprehensive list of HCL implementations)
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Support attributes with names that contain dashes, e.g. ARIA attributes.
* Fix SPARQL unicode names support

* Update lib/rouge/lexers/sparql.rb

Co-authored-by: Tan Le <tan.le@hey.com>

* Update lib/rouge/lexers/sparql.rb

Co-authored-by: Tan Le <tan.le@hey.com>

Co-authored-by: Tan Le <tan.le@hey.com>
* Add idris spec file

* Add Idris examples

* Add directive

* Add prelude functions

* Add prelude classes

* Keyword constants

* Prelude functions order

* Pseudo constants for nicer highlight

* Refine module and import

* Add function signature

* data/class/instance keywords

* Proper builtin functions highlight

* Ensure newlines

* Extract variables to class methods

* Remove captures on function name regex

* Collapse number float rule

* Support case-insensitive escape

Co-authored-by: Tan Le <tan.le@hey.com>
* Add Ruby 3.1 to CI

* Update Rubocop to be compatible with Ruby 3.1
* Add syzlang lexer

This change adds a lexer for syzlang, a DSL used by syzkaller [1] to describe
system call interfaces.

The lexer intentionally recognizes code with less strict whitespacing rules
than what syzkaller demands. This is useful for line-splitting and annotating
syzlang snippets.

[1] https://github.com/google/syzkaller

Signed-off-by: Andrey Konovalov <andreyknvl@gmail.com>

* Add syzprog lexer

This change adds a lexer for syzprog, a DSL used by syzkaller [1] to describe
sequences of system calls.

The lexer intentionally recognizes code with less strict whitespacing rules
than what syzkaller demands. This is useful for line-splitting and annotating
syzprog snippets.

[1] https://github.com/google/syzkaller

Signed-off-by: Andrey Konovalov <andreyknvl@gmail.com>
* Add linting for newlines

* Add new lines and trim extra ones EOF
We would like to run Rubocop linting against the minimum supported Ruby
version, that is 2.5. Profile and warnings will be run against the
latest version of Ruby 3.1 so we can preempt upcoming issues.
Comparing the names is much less efficient than
comparing the instance directly.

It may also change in the future: https://bugs.ruby-lang.org/issues/18576
Update the lexer for syzlang DSL to allow processing inputs with lists and
syscall arguments replaced with "...". This is useful for highlighting snippets
that are shortened for readability.

Also add tests for the new behavior.

Signed-off-by: Andrey Konovalov <andreyknvl@gmail.com>
* initial support for lean 3

* incorporate keywords and operators from PR #1019

* address comments

* add keyword::type + other keywords
* Fix notation of named stages in multi-stage docker builds

* Check for whitespace as well to mitigate "AS" appearing in image names

* Add multi-stage builder pattern to sample
Newly introduced "keywords": `arguments, properties, methods, import`
* add oracle plsql lexer

* add demo and sample

* tweak rules for multiline items and function/package/procedure/type creates

* add type attributes, word operators, preprocessor directives

* add rule for MERGE syntax to get keywords rather than names

* remove trailing dot option for floating point number.
restrict words after dot to functions or regular names instead of keywords

* pad visual sample with more edge cases on numbers and dot method notation.
Add comments to lexer code and pretty it up

* added PLSQL to docs/Languages.md
ensure 2 space indentation throughout
correct spelling errors in comments
change keywords to keywords_reserved and keywords_nresvd to keywords
Remove redundant comments
add cursor attributes to name::attribute list
add optional double/float modifier letters to numeric literals, also to visual test file.

* slight formatting tweak. remove extra space
This updates our Code of Conduct based on the Contributor Covenant v2.1.
tancnle and others added 30 commits April 5, 2024 12:23
This aligns the base-16 default dark colour palette with the originals.
The new lexer uses sets of keywords to quickly categorize names and uses
regular expressions for other elements like numbers and punctuation.
* Add lexer for P4

* ruby 2.7 compat

* add P4 to Languages.md
Co-authored-by: Andrew Hills <ahills@redhat.com>
* Mojo language highlighting support.

* Added new line to fix the Linelint error
* Fix CI for 2.7

* Use load_lexer instead
Cisco IOS shares the same extension but we want to limit it given
the relevant content. For other cases such as `setup.cfg`, we would
prefer INI syntax.
* Skeleton code for the lexer

* Add TODOs

* Extend list of COBOL keywords

* Fixes

* Work work

* Create some fixes

* Follow the lexer development guide

* Add some creative commons licensed COBOL code as example

* Different script

* Comply with license for example script

* Fix EOF issue with linter

* Use negative lookbehind

* Apply suggestions from code review

Co-authored-by: Tan Le <numbat@fastmail.com>

* Move constants into instance variables

* Last fixups

* Set ordering causes issues

* Extract keywords and sections to class methods

* Support lower case keywords in GnuCobol

---------

Co-authored-by: Tan Le <numbat@fastmail.com>
Recognize `Thorfile` and `*.thor` files
as Ruby files since they are Ruby files.

Reference:

- https://github.com/rails/thor/wiki/Getting-Started#file-names
Nextflow is a domain specific language (DSL) implemented on top of the Groovy programming language
https://www.nextflow.io/
* implement a json5 lexer

* add a desc

* Remove unnecessary rules

* Mirror pattern from Pygments JSON5

* Document JSON5 support

---------

Co-authored-by: http://jneen.net/ <jneen@jneen.net>
Co-authored-by: Michael Camilleri <mike@inqk.net>
Co-authored-by: Tan Le <numbat@fastmail.com>
* Fix typo and trim spaces

* Use bash syntax for all shell scripts

* Update CI badge link
This ensures we delegate the handling of `{{}}` in mustache template to
JS lexer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.