Commit Graph

5649 Commits

Author SHA1 Message Date
Ashe Connor
c9b3d19c6f Lexer crash fix (#3900)
* input may return 0 for EOF

Stops overruns into fread from nothing.

* remove two trailing contexts

* fix up sgml tokens
v5.3.3
2017-11-10 22:11:32 +11:00
Alex Arslan
0f4955e5d5 Update Julia definitions to use Atom instead of TextMate (#3871) 2017-11-09 19:39:37 +11:00
Paul Chaignon
d968b0e9ee Improve heuristic for XML/TypeScript (#3883)
The heuristic for XML .ts files might match TypeScript generics
starting with TS
2017-11-04 11:16:44 +01:00
Ashe Connor
1f5ed3b3fe Release v5.3.2 (#3882)
* update grammar submodules

* bump to 5.3.2
v5.3.2
2017-11-01 10:01:03 +10:00
Robert Koeninger
297be948d1 Set color for Idris language (#3866) 2017-10-31 16:27:21 +00:00
Charles Milette
b4492e7205 Add support for Edje Data Collections (#3879)
* Add support for Edje Data Collections

Fixes #3876

* Add EDC in grammars list
2017-10-31 16:26:44 +00:00
Paul Chaignon
c05bc99004 Vendor a few big JS libraries (#3861) 2017-10-31 15:12:02 +01:00
Ashe Connor
99eaf5faf9 Replace the tokenizer with a flex-based scanner (#3846)
* Lex everything except SGML, multiline, SHEBANG

* Prepend SHEBANG#! to tokens

* Support SGML tag/attribute extraction

* Multiline comments

* WIP cont'd; productionifying

* Compile before test

* Add extension to gemspec

* Add flex task to build lexer

* Reentrant extra data storage

* regenerate lexer

* use prefix

* rebuild lexer on linux

* Optimise a number of operations:

* Don't read and split the entire file if we only ever use the first/last n
  lines

* Only consider the first 50KiB when using heuristics/classifying.  This can
  save a *lot* of time; running a large number of regexes over 1MiB of text
  takes a while.

* Memoize File.size/read/stat; re-reading in a 500KiB file every time `data` is
  called adds up a lot.

* Use single regex for C++

* act like #lines

* [1][-2..-1] => nil, ffs

* k may not be set
2017-10-31 11:06:56 +11:00
Cesar Tessarin
21babbceb1 Fix Perl 5 and 6 disambiguation bug (#3860)
* Add test to demonstrate Perl syntax detection bug

A Perl 5 .pm file containing the word `module` or `class`, even with
an explicit `use 5.*` statement, is recognized as Perl 6 code.

* Improve Perl 5 and Perl 6 disambiguation

The heuristics for Perl 5 and 6 `.pm` files disambiguation was done
searching for keywords which can appear in both languages (`class` and
`module`) in addition to the `use` statement check.

Due to Perl 6 being tested first, code containing those words would
always be interpreted as Perl 6.

Test order was thus reversed, testing for Perl 5 first. Since Perl 6
code would never contain a `use 5.*` statement, this does no harm to
Perl 6 detection while fixing the problem to Perl 5.

Fixes: #3637
2017-10-23 10:16:56 +01:00
Paul Chaignon
15885701cd Tests for Ruby 2.4 must pass (#3862) 2017-10-17 11:08:04 +02:00
Ashe Connor
9b942086f7 Release v5.3.1 (#3864)
* Fix Perl/Pod disambiguation
v5.3.1
2017-10-17 19:31:20 +11:00
Ashe Connor
93cd47822f Only recognise Pod for .pod files (#3863)
We uncomplicate matters by removing ".pod" from the Perl definition
entirely.
2017-10-17 19:05:20 +11:00
Colin Seymour
ea3e79a631 Release v5.3.0 (#3859)
* Update grammars

* Update haskell scopes to match updated grammar

* Bump version to 5.3.0
v5.3.0
2017-10-15 09:52:27 +01:00
Maickel Hubner
0af9a35ff1 Create association with OpenEdge .w files (#3648)
* Update heuristics.rb

* Update languages.yml

* Create consmov.w

* Create menu.w

* Switch out large samples for smaller ones

* Relax regex
2017-10-14 18:12:16 +01:00
Codecat
44048c9ba8 Add Angelscript language (#3844)
* Add AngelScript scriping language

* Add AngelScript sample

* Initial implementation of Angelscript

* Update Angelscript tm_scope and ace_mode

* Move Angelscript after ANTLR

* Updated grammar list

* Alphabetical sorting for Angelscript

* Angelscript grammar license is unlicense

* Add ActionScript samples

* Added a heuristic for .as files

* Whitelist sublime-angelscript license hash

* Added heuristic test for Angelscript and Actionscript

* Remove .acs from Angelscript file extensions
2017-10-14 17:34:12 +01:00
Chris Llanwarne
e51b5ec9b7 Add WDL language support (#3858)
* Add WDL language support

* Add ace mode
2017-10-14 17:12:47 +01:00
Colin Seymour
a47008ea00 Ping @lildude from now on (#3856) 2017-10-13 17:49:04 +01:00
Dan Moore
a0b38e8207 Don't count VCL as Perl for statistics. (#3857)
* Don't count VCL as Perl for statistics.

While the Varnish-specific language was apparently inspired by C and Perl, there's no reason to group it as Perl for repo statistics.

* Re-adding color for VCL.

Which was accidentally removed as part of https://github.com/github/linguist/pull/2298/files#diff-3552b1a64ad2071983c4d91349075c75L3223
2017-10-12 15:42:31 -04:00
Colin Seymour
10dfe9f296 Fix typo in script/add-grammar (#3853) 2017-10-10 18:26:26 +01:00
Ján Neščivera
0b9c05f989 added VS Code workspace files to vendored path (#3723) 2017-10-08 17:32:01 +01:00
Paul Chaignon
95dca67e2b New repository for TypeScript grammar (#3730) 2017-10-06 13:27:14 +01:00
Adædra
e98728595b Change Ruby grammar source (#3782)
* Move the Ruby grammar to use Atom's one
2017-09-21 09:52:10 +01:00
Kerem
4cd558c374 Added natvis extension to XML (#3789)
* natvis extension added to xml.

* Added sample natvis file from the Chromium project.
2017-09-17 13:31:02 +01:00
John Gardner
adf6206ef5 Register "buildozer.spec" as an INI filename (#3817)
Resolves #3814.
2017-09-17 13:29:49 +01:00
Shan Mahanama
c2d558b71d Add Ballerina language (#3818)
* Add Ballerina language

* Add missing file

* Update color

* Update with required changes

* Update sub-module
2017-09-17 13:29:12 +01:00
Nate Whetsell
78c58f956e Update Ace modes for Csound languages (#3822) 2017-09-17 13:27:24 +01:00
Agustin Mendez
fc1404985a Add DataWeave language (#3804)
* Add DataWeave language

* Add Licence

* Update to latest DataWeave revision
2017-09-07 15:28:46 +01:00
Adeel Mujahid
5d48ccd757 Classify some project files as XML (#3696)
Also added disambiguation rule for `.proj` and `.user`.

##### CSCFG

https://github.com/search?utf8=%E2%9C%93&q=extension%3Acscfg+NOT+nothack&type=Code
(16.7K hits)

##### CSDEF

https://github.com/search?utf8=%E2%9C%93&q=extension%3Acsdef+NOT+nothack&type=Code
(12.7K hits)

##### CCPROJ

https://github.com/search?utf8=%E2%9C%93&q=extension%3Accproj+NOT+nothack&type=Code
(5K hits)

##### DEPPROJ

https://github.com/search?utf8=%E2%9C%93&q=extension%3Adepproj+NOT+nothack&type=Code
(505 hits)

##### NDPROJ

https://github.com/search?utf8=%E2%9C%93&q=extension%3Andproj+NOT+nothack&type=Code
(194 hits)

##### PROJ

https://github.com/search?utf8=%E2%9C%93&q=extension%3Aproj+%28project+OR+Property+OR+Import+OR+xml+OR+xmlns%29&type=Code
(35K hits)

##### SHPROJ

https://github.com/search?utf8=%E2%9C%93&q=extension%3Ashproj+NOT+nothack&type=Code
(13K hits)
2017-09-07 10:04:09 +01:00
Abigail
3530a18e46 Add .clang-tidy filename for YAML (#3767)
.clang-tidy is the filename used for clang-tidy's configuration file.
clang-tidy is a clang-based C++ "linter" tool. For more info, see:
https://clang.llvm.org/extra/clang-tidy/
2017-09-07 10:01:10 +01:00
Marciano C. Preciado
ae8f4f9228 Make Matlab's Color More Appropriate (#3771)
Purple is not an affiliated color of Matlab or Mathworks. Change the color to better reflect the color theme of the Matlab sofware and logo.
2017-09-07 09:59:19 +01:00
Robert Koeninger
7c34d38786 Updated color for Ceylon language (#3780)
* Updated color for Ceylon language

* Adjusting Ceylon color due to its proximity to Clarion color

* Made Ceylon color darker to avoid collision

* Used more accurate color

* Specified tm_scope for Ceylon
2017-09-07 09:58:30 +01:00
Bradley Meck
38bc5fd336 added .mjs extension to JavaScript (#3783)
* added .mjs extension to JavaScript

* add missing newline at end of file

* add example from https://github.com/bmeck/composable-ast-walker/blob/master/example/constant_fold.mjs
2017-09-07 09:56:36 +01:00
Anthony D. Green
6b06e47c67 Create VBAllInOne.vb (#3785)
Adding the test file the Visual Basic compiler team uses to verify parsing and other features.
2017-09-07 09:55:20 +01:00
Mat Mariani
061712ff78 Added syntax highlighting for Squirrel (#3791)
* Added syntax highlighting for Squirrel

https://github.com/search?utf8=%E2%9C%93&q=extension%3Anut+NOT+nothack&t
ype=Code

Squirrel is already detected by GitHub but has no syntax
highlighting.

* removed duplicate `source.nut`
2017-09-07 09:53:25 +01:00
Seppe Stas
7707585d5e Change KiCad Board language to KiCad Legacy Layout (#3799)
* Change KiCad Board language to KiCad Legacy Layout

KiCad .brd files and .kicad_pcb files have the same purpose, they are both source files for PCB layouts. Having one of the file types named "KiCad Board" and the other one "KiCad Layout" can cause confusion since it implies they are not the same thing.

The [.brd files use the old, legacy layout format](http://kicad-pcb.org/help/file-formats/#_native_file_formats) that is [not actively used anymore](https://github.com/search?utf8=%E2%9C%93&q=language%3A%22KiCad+Board%22&type=Repositories&ref=advsearch&l=KiCad+Board&l=). Having it come before the KiCad Layout language in the Language Selection list and not having it flagged as legacy can cause people to select it when searching for KiCad layout files.

* Change KiCad sample according to changes in 4b306f34

* Update vendor/README.md using script/list-grammars
2017-09-07 09:52:27 +01:00
DoctorWhoof
fa7d433886 Added ".monkey2" extension to Monkey Programming Language (#3809)
The latest Monkey Programming Language extension is ".monkey2". The language description is available at "http://monkeycoder.co.nz".
2017-09-07 09:39:52 +01:00
PatrickJS
998e24cf36 Add ".gql" as a GraphQL file extension (#3813) 2017-09-07 09:38:42 +01:00
John Gardner
63ff51e2ed Add test to keep grammar-list synced with submodules (#3793)
* Add test to check if grammar list is outdated

* Update grammar list

* Fix duplicate punctuation in error messages
2017-08-24 21:13:30 +10:00
Colin Seymour
b541b53b78 Byebug requires Ruby 2.2 (#3790)
Also don't attempt to install it during testing.
2017-08-24 10:17:12 +01:00
Hardmath123
a878620a8e Add nearley language definition. (#3781) 2017-08-17 18:03:38 +01:00
John Gardner
5633fd3668 Fix classification of bogus "markup" languages (#3751)
* Reclassify Protocol Buffer as a data-type language

References: #3740

* Fix classification of bogus "markup" languages

* Fix category of the ironically-named "Pure Data"

Ironically and *appropriately* named, might I add.
2017-08-16 22:48:51 +10:00
Colin Seymour
9d0af0da40 Update to charlock_holmes 0.7.5 (#3778)
This fixes https://github.com/github/linguist/issues/3777
2017-08-16 10:08:33 +01:00
Colin Seymour
edabdc75a5 Bump version: 5.2.0 (#3765) v5.2.0 2017-08-10 14:54:09 +01:00
Wade Urry
6db7736860 Add flow-typed to vendor.yml (#3741) 2017-08-09 11:25:27 +01:00
John Gardner
dd3d8586c5 Refine definition of KiCad (#3743)
* Refine definition of KiCad language

* Add ".sch" as a registered Scheme extension

* Add more meaningful samples from real repositories
2017-08-08 18:47:26 +10:00
John Gardner
f1daf6192c Add Adobe Font Metrics to recognised filetypes (#3731)
* Add Adobe Font Metrics to recognised filetypes

* Reduce filesizes of AFM samples

* Add a self-generated, unpruned AFM sample
2017-08-08 18:30:37 +10:00
Paul Chaignon
2c41df376f Switch grammar for Reason (#3732) 2017-08-06 11:00:35 +02:00
James Dennes
3391dcce6a Make Language methods more resilient to non-String input (#3752)
* Add failing test for finding with non-String input

Show the failing behaviour of find_by_alias, find_by_name, and []
when non-String input is provided.

* Return nil rather than erroring on non-String input
2017-08-02 14:07:44 +02:00
John Gardner
f75c5707a6 Add support for Gerber files (#3744)
* Add grammar for PCB/Gerber Images

* Add language definition for Gerber files

* Fix rogue punctuation and rip chunks off Gerber
2017-08-02 22:00:16 +10:00
John Gardner
25de4e0ae2 Add Printer Font ASCII to recognised PostScript extensions (#3734)
* Register Adobe Type 1 fonts as PostScript files

* Add logic for recognising generated PFA files

* Extend list of PostScript generators
2017-08-02 21:58:40 +10:00