From 5256ca6b4b12794a23b848a2dffa28025b8d9d72 Mon Sep 17 00:00:00 2001 From: "Matth?us G. Chajdas" Date: Sun, 28 Apr 2019 17:15:44 +0200 Subject: Various fixes and cleanups to the last batch of new languages. Add to CHANGES, languages, add versionadded, recreate mappings, fix DASM16 alias. --- CHANGES | 8 ++++---- doc/languages.rst | 4 ++++ pygments/lexers/_mapping.py | 8 ++++---- pygments/lexers/asm.py | 6 ++++-- pygments/lexers/configs.py | 10 +++++++++- pygments/lexers/slash.py | 5 ++++- 6 files changed, 29 insertions(+), 12 deletions(-) diff --git a/CHANGES b/CHANGES index 6a6a6a17..2b1ebb0b 100644 --- a/CHANGES +++ b/CHANGES @@ -12,17 +12,17 @@ Version 2.4.0 - Added lexers: + * Augeas (PR#807) * Charm++ CI (PR#788) + * DASM16 (PR#807) * FloScript (PR#750) * Hspec (PR#790) * SGF (PR#780) + * Slash (PR#807) * Slurm (PR#760) + * TOML (PR#807) * Unicon (PR#731) * VBScript (PR#673) - * DASM16 - * Augeas - * TOML - * Slash - Updated lexers: diff --git a/doc/languages.rst b/doc/languages.rst index 47e3363f..d2508b07 100644 --- a/doc/languages.rst +++ b/doc/languages.rst @@ -14,6 +14,7 @@ Programming languages * AppleScript * Assembly (various) * Asymptote +* `Augeas `_ * Awk * Befunge * Boo @@ -31,6 +32,7 @@ Programming languages * `Cython `_ * `D `_ * Dart +* DCPU-16 * Delphi * Dylan * `Elm `_ @@ -85,10 +87,12 @@ Programming languages * Scheme * Scilab * `SGF `_ +* `Slash `_ * `Slurm `_ * Smalltalk * SNOBOL * Tcl +* `TOML `_ * Vala * Verilog * VHDL diff --git a/pygments/lexers/_mapping.py b/pygments/lexers/_mapping.py index 3c05d147..e8838008 100644 --- a/pygments/lexers/_mapping.py +++ b/pygments/lexers/_mapping.py @@ -44,7 +44,7 @@ LEXERS = { 'ArduinoLexer': ('pygments.lexers.c_like', 'Arduino', ('arduino',), ('*.ino',), ('text/x-arduino',)), 'AspectJLexer': ('pygments.lexers.jvm', 'AspectJ', ('aspectj',), ('*.aj',), ('text/x-aspectj',)), 'AsymptoteLexer': ('pygments.lexers.graphics', 'Asymptote', ('asy', 'asymptote'), ('*.asy',), ('text/x-asymptote',)), - 'AugeasLexer': ('pygments.lexers.configs', 'Augeas', ('augeas',), ('*.aug'), ()), + 'AugeasLexer': ('pygments.lexers.configs', 'Augeas', ('augeas',), ('*.aug',), ()), 'AutoItLexer': ('pygments.lexers.automation', 'AutoIt', ('autoit',), ('*.au3',), ('text/x-autoit',)), 'AutohotkeyLexer': ('pygments.lexers.automation', 'autohotkey', ('ahk', 'autohotkey'), ('*.ahk', '*.ahkl'), ('text/x-autohotkey',)), 'AwkLexer': ('pygments.lexers.textedit', 'Awk', ('awk', 'gawk', 'mawk', 'nawk'), ('*.awk',), ('application/x-awk',)), @@ -122,7 +122,7 @@ LEXERS = { 'DObjdumpLexer': ('pygments.lexers.asm', 'd-objdump', ('d-objdump',), ('*.d-objdump',), ('text/x-d-objdump',)), 'DarcsPatchLexer': ('pygments.lexers.diff', 'Darcs Patch', ('dpatch',), ('*.dpatch', '*.darcspatch'), ()), 'DartLexer': ('pygments.lexers.javascript', 'Dart', ('dart',), ('*.dart',), ('text/x-dart',)), - 'Dasm16Lexer': ('pygments.lexers.asm', 'DASM16', ('dasm16',), ('*.dasm16', '*.dasm'), ('text/x-dasm16')), + 'Dasm16Lexer': ('pygments.lexers.asm', 'DASM16', ('dasm16',), ('*.dasm16', '*.dasm'), ('text/x-dasm16',)), 'DebianControlLexer': ('pygments.lexers.installers', 'Debian Control file', ('control', 'debcontrol'), ('control',), ()), 'DelphiLexer': ('pygments.lexers.pascal', 'Delphi', ('delphi', 'pas', 'pascal', 'objectpascal'), ('*.pas', '*.dpr'), ('text/x-pascal',)), 'DgLexer': ('pygments.lexers.python', 'dg', ('dg',), ('*.dg',), ('text/x-dg',)), @@ -377,7 +377,6 @@ LEXERS = { 'RubyLexer': ('pygments.lexers.ruby', 'Ruby', ('rb', 'ruby', 'duby'), ('*.rb', '*.rbw', 'Rakefile', '*.rake', '*.gemspec', '*.rbx', '*.duby', 'Gemfile'), ('text/x-ruby', 'application/x-ruby')), 'RustLexer': ('pygments.lexers.rust', 'Rust', ('rust', 'rs'), ('*.rs', '*.rs.in'), ('text/rust',)), 'SASLexer': ('pygments.lexers.sas', 'SAS', ('sas',), ('*.SAS', '*.sas'), ('text/x-sas', 'text/sas', 'application/x-sas')), - 'SlashLexer': ('pygments.lexers.slash', 'Slash', ('slash'), ('*.sl'), ()), 'SLexer': ('pygments.lexers.r', 'S', ('splus', 's', 'r'), ('*.S', '*.R', '.Rhistory', '.Rprofile', '.Renviron'), ('text/S-plus', 'text/S', 'text/x-r-source', 'text/x-r', 'text/x-R', 'text/x-r-history', 'text/x-r-profile')), 'SMLLexer': ('pygments.lexers.ml', 'Standard ML', ('sml',), ('*.sml', '*.sig', '*.fun'), ('text/x-standardml', 'application/x-standardml')), 'SarlLexer': ('pygments.lexers.jvm', 'SARL', ('sarl',), ('*.sarl',), ('text/x-sarl',)), @@ -389,6 +388,7 @@ LEXERS = { 'ScssLexer': ('pygments.lexers.css', 'SCSS', ('scss',), ('*.scss',), ('text/x-scss',)), 'ShenLexer': ('pygments.lexers.lisp', 'Shen', ('shen',), ('*.shen',), ('text/x-shen', 'application/x-shen')), 'SilverLexer': ('pygments.lexers.verification', 'Silver', ('silver',), ('*.sil', '*.vpr'), ()), + 'SlashLexer': ('pygments.lexers.slash', 'Slash', ('slash',), ('*.sl',), ()), 'SlimLexer': ('pygments.lexers.webmisc', 'Slim', ('slim',), ('*.slim',), ('text/x-slim',)), 'SlurmBashLexer': ('pygments.lexers.shell', 'Slurm', ('slurm', 'sbatch'), ('*.sl',), ()), 'SmaliLexer': ('pygments.lexers.dalvik', 'Smali', ('smali',), ('*.smali',), ('text/smali',)), @@ -411,6 +411,7 @@ LEXERS = { 'SwigLexer': ('pygments.lexers.c_like', 'SWIG', ('swig',), ('*.swg', '*.i'), ('text/swig',)), 'SystemVerilogLexer': ('pygments.lexers.hdl', 'systemverilog', ('systemverilog', 'sv'), ('*.sv', '*.svh'), ('text/x-systemverilog',)), 'TAPLexer': ('pygments.lexers.testing', 'TAP', ('tap',), ('*.tap',), ()), + 'TOMLLexer': ('pygments.lexers.configs', 'TOML', ('toml',), ('*.toml',), ()), 'Tads3Lexer': ('pygments.lexers.int_fiction', 'TADS 3', ('tads3',), ('*.t',), ()), 'TasmLexer': ('pygments.lexers.asm', 'TASM', ('tasm',), ('*.asm', '*.ASM', '*.tasm'), ('text/x-tasm',)), 'TclLexer': ('pygments.lexers.tcl', 'Tcl', ('tcl',), ('*.tcl', '*.rvt'), ('text/x-tcl', 'text/x-script.tcl', 'application/x-tcl')), @@ -424,7 +425,6 @@ LEXERS = { 'TextLexer': ('pygments.lexers.special', 'Text only', ('text',), ('*.txt',), ('text/plain',)), 'ThriftLexer': ('pygments.lexers.dsls', 'Thrift', ('thrift',), ('*.thrift',), ('application/x-thrift',)), 'TodotxtLexer': ('pygments.lexers.textfmts', 'Todotxt', ('todotxt',), ('todo.txt', '*.todotxt'), ('text/x-todo',)), - 'TOMLLexer': ('pygments.lexers.configs', 'TOML', ('toml',), ('*.toml'), ()), 'TransactSqlLexer': ('pygments.lexers.sql', 'Transact-SQL', ('tsql', 't-sql'), ('*.sql',), ('text/x-tsql',)), 'TreetopLexer': ('pygments.lexers.parsers', 'Treetop', ('treetop',), ('*.treetop', '*.tt'), ()), 'TurtleLexer': ('pygments.lexers.rdf', 'Turtle', ('turtle',), ('*.ttl',), ('text/turtle', 'application/x-turtle')), diff --git a/pygments/lexers/asm.py b/pygments/lexers/asm.py index 761b3315..7100868c 100644 --- a/pygments/lexers/asm.py +++ b/pygments/lexers/asm.py @@ -657,9 +657,11 @@ class Dasm16Lexer(RegexLexer): Simple lexer for DCPU-16 Assembly Check http://0x10c.com/doc/dcpu-16.txt + + .. versionadded:: 2.4 """ - name = 'dasm16' - aliases = ['DASM16'] + name = 'DASM16' + aliases = ['dasm16'] filenames = ['*.dasm16', '*.dasm'] mimetypes = ['text/x-dasm16'] diff --git a/pygments/lexers/configs.py b/pygments/lexers/configs.py index bf9cb0bb..a3e28dd8 100644 --- a/pygments/lexers/configs.py +++ b/pygments/lexers/configs.py @@ -841,6 +841,11 @@ class PacmanConfLexer(RegexLexer): class AugeasLexer(RegexLexer): + """ + Lexer for `Augeas `_. + + .. versionadded:: 2.4 + """ name = 'Augeas' aliases = ['augeas'] filenames = ['*.aug'] @@ -881,7 +886,10 @@ class AugeasLexer(RegexLexer): class TOMLLexer(RegexLexer): """ - Lexer for TOML, a simple language for config files + Lexer for `TOML `_, a simple language + for config files. + + .. versionadded:: 2.4 """ name = 'TOML' diff --git a/pygments/lexers/slash.py b/pygments/lexers/slash.py index f18059f7..bd73d463 100644 --- a/pygments/lexers/slash.py +++ b/pygments/lexers/slash.py @@ -3,7 +3,8 @@ pygments.lexers.slash ~~~~~~~~~~~~~~~~~~~~~ - Lexer for the Slash programming language. + Lexer for the `Slash `_ programming + language. :copyright: Copyright 2012 by GitHub, Inc :license: BSD, see LICENSE for details. @@ -173,6 +174,8 @@ class SlashLanguageLexer(ExtendedRegexLexer): class SlashLexer(DelegatingLexer): """ Lexer for the Slash programming language. + + .. versionadded:: 2.4 """ name = 'Slash' -- cgit v1.2.1