From 3c5bcb434c68a2c6c6d3a346b70ec35961627e8e Mon Sep 17 00:00:00 2001 From: Keith Rarick Date: Thu, 3 Sep 2015 10:27:28 -0700 Subject: [PATCH 0001/1214] Add Go dependencies to generated.rb and test_blob.rb --- lib/linguist/generated.rb | 9 +++++++++ test/test_blob.rb | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/lib/linguist/generated.rb b/lib/linguist/generated.rb index f1fb2d1902..cc64c82422 100644 --- a/lib/linguist/generated.rb +++ b/lib/linguist/generated.rb @@ -56,6 +56,7 @@ def generated? generated_net_specflow_feature_file? || composer_lock? || node_modules? || + go_vendor? || godeps? || generated_by_zephir? || minified_files? || @@ -280,6 +281,14 @@ def node_modules? !!name.match(/node_modules\//) end + # Internal: Is the blob part of the Go vendor/ tree, + # not meant for humans in pull requests. + # + # Returns true or false. + def go_vendor? + !!name.match(/vendor\//) + end + # Internal: Is the blob part of Godeps/, # which are not meant for humans in pull requests. # diff --git a/test/test_blob.rb b/test/test_blob.rb index 1ba647b043..74cffc2bc5 100644 --- a/test/test_blob.rb +++ b/test/test_blob.rb @@ -245,6 +245,10 @@ def test_generated assert sample_blob("node_modules/grunt/lib/grunt.js").generated? + # Go vendored dependencies + assert sample_blob("vendor/vendor.json").generated? + assert sample_blob("vendor/github.com/kr/s3/sign.go").generated? + # Godep saved dependencies assert sample_blob("Godeps/Godeps.json").generated? assert sample_blob("Godeps/_workspace/src/github.com/kr/s3/sign.go").generated? From d46530989c93e036721487dbfd16e9a9b8f1082c Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Thu, 18 Feb 2016 19:57:34 -0500 Subject: [PATCH 0002/1214] Only treat `.go` files in ^vendor/ as generated --- lib/linguist/generated.rb | 4 +++- test/fixtures/go/food_vendor/candy.go | 1 + test/test_blob.rb | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 test/fixtures/go/food_vendor/candy.go diff --git a/lib/linguist/generated.rb b/lib/linguist/generated.rb index cc64c82422..8c2c1bcd1d 100644 --- a/lib/linguist/generated.rb +++ b/lib/linguist/generated.rb @@ -286,7 +286,9 @@ def node_modules? # # Returns true or false. def go_vendor? - !!name.match(/vendor\//) + return false unless extname == '.go' + + !!name.match(/\Avendor\//) end # Internal: Is the blob part of Godeps/, diff --git a/test/fixtures/go/food_vendor/candy.go b/test/fixtures/go/food_vendor/candy.go new file mode 100644 index 0000000000..ce65385be7 --- /dev/null +++ b/test/fixtures/go/food_vendor/candy.go @@ -0,0 +1 @@ +// empty file for testing that paths with vendor in them don't get ingored diff --git a/test/test_blob.rb b/test/test_blob.rb index 74cffc2bc5..2e50853dd4 100644 --- a/test/test_blob.rb +++ b/test/test_blob.rb @@ -246,8 +246,9 @@ def test_generated assert sample_blob("node_modules/grunt/lib/grunt.js").generated? # Go vendored dependencies - assert sample_blob("vendor/vendor.json").generated? + refute sample_blob("vendor/vendor.json").generated? assert sample_blob("vendor/github.com/kr/s3/sign.go").generated? + refute fixture_blob("go/food_vendor/candy.go").generated? # Godep saved dependencies assert sample_blob("Godeps/Godeps.json").generated? From 4a031107ac962ccfafa32685795891c346176510 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Sun, 26 Jun 2016 19:30:23 +0200 Subject: [PATCH 0003/1214] Support for Sublime Text YAML syntax definitions Sublime Text YAML syntax definitions use the .sublime-syntax file extension Most syntax files declare a YAML 1.2 syntax although they are YAML 1.1 compatible Thus, the YAML version header is stripped off before parsing Displays a warning if parsing fails In .sublime-syntax files, the scope is under the 'scope' key -- as opposed to the usual 'scopeName' key --- script/convert-grammars | 21 ++++++++++++++++----- vendor/grammars/NSIS | 2 +- vendor/grammars/awk-sublime | 2 +- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/script/convert-grammars b/script/convert-grammars index ec3287dbd2..56a38607d8 100755 --- a/script/convert-grammars +++ b/script/convert-grammars @@ -42,7 +42,7 @@ class DirectoryPackage case File.extname(path.downcase) when '.plist' path.split('/')[-2] == 'Syntaxes' - when '.tmlanguage' + when '.tmlanguage', '.sublime-syntax' true when '.cson', '.json' path.split('/')[-2] == 'grammars' @@ -114,7 +114,7 @@ class SVNPackage def fetch(tmp_dir) `svn export -q "#{url}/Syntaxes" "#{tmp_dir}/Syntaxes"` raise "Failed to export SVN repository: #{url}: #{$?.to_s}" unless $?.success? - Dir["#{tmp_dir}/Syntaxes/*.{plist,tmLanguage,tmlanguage}"] + Dir["#{tmp_dir}/Syntaxes/*.{plist,tmLanguage,tmlanguage,sublime-syntax}"] end end @@ -148,6 +148,17 @@ def load_grammar(path) case File.extname(path.downcase) when '.plist', '.tmlanguage' Plist::parse_xml(path) + when '.sublime-syntax' + content = File.read(path) + # Attempt to parse YAML file even if it has a YAML 1.2 header + if content.lines[0] =~ /^%YAML[ :]1\.2/ + content = content.lines[1..-1].join + end + begin + YAML.load(content) + rescue Psych::SyntaxError => e + $stderr.puts "Failed to parse YAML grammar '#{path}'" + end when '.cson' cson = `"#{CSONC}" "#{path}"` raise "Failed to convert CSON grammar '#{path}': #{$?.to_s}" unless $?.success? @@ -169,7 +180,7 @@ def load_grammars(tmp_dir, source, all_scopes) else SingleFile.new(source) end - elsif source.end_with?('.tmLanguage', '.plist') + elsif source.end_with?('.tmLanguage', '.plist', '.sublime-syntax') SingleGrammar.new(source) elsif source.start_with?('https://github.com') GitHubPackage.new(source) @@ -185,7 +196,7 @@ def load_grammars(tmp_dir, source, all_scopes) p.fetch(tmp_dir).map do |path| grammar = load_grammar(path) - scope = grammar['scopeName'] + scope = grammar['scopeName'] || grammar['scope'] if all_scopes.key?(scope) unless all_scopes[scope] == p.url @@ -204,7 +215,7 @@ def install_grammars(grammars, path) installed = [] grammars.each do |grammar| - scope = grammar['scopeName'] + scope = grammar['scopeName'] || grammar['scope'] File.write(File.join(GRAMMARS_PATH, "#{scope}.json"), JSON.pretty_generate(grammar)) installed << scope end diff --git a/vendor/grammars/NSIS b/vendor/grammars/NSIS index e052400204..b9be931f41 160000 --- a/vendor/grammars/NSIS +++ b/vendor/grammars/NSIS @@ -1 +1 @@ -Subproject commit e052400204103acc26c14feeb624dd7ce6157611 +Subproject commit b9be931f41ac6039208494f8e98fd53a2394e517 diff --git a/vendor/grammars/awk-sublime b/vendor/grammars/awk-sublime index 7ec7d15446..792d921531 160000 --- a/vendor/grammars/awk-sublime +++ b/vendor/grammars/awk-sublime @@ -1 +1 @@ -Subproject commit 7ec7d154469c05780cfeecca8fc00fda6f9ac0e7 +Subproject commit 792d9215315758c505a44a325b910bedc87bd10b From adaf4011bc629060f98a63625b3706ecfe9048d4 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Sun, 26 Jun 2016 20:57:50 +0200 Subject: [PATCH 0004/1214] Support for .YAML-tmLanguage grammar files --- grammars.yml | 4 ++++ script/convert-grammars | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/grammars.yml b/grammars.yml index d76e95467b..39f22ca486 100755 --- a/grammars.yml +++ b/grammars.yml @@ -36,6 +36,8 @@ vendor/grammars/Docker.tmbundle: - source.dockerfile vendor/grammars/Elm/: - source.elm +- text.html.mediawiki.elm-build-output +- text.html.mediawiki.elm-documentation vendor/grammars/FreeMarker.tmbundle: - text.html.ftl vendor/grammars/G-Code/: @@ -577,6 +579,8 @@ vendor/grammars/sublime-text-ox/: vendor/grammars/sublime-typescript/: - source.ts - source.tsx +- text.error-list +- text.find-refs vendor/grammars/sublime-varnish: - source.varnish.vcl vendor/grammars/sublime_cobol: diff --git a/script/convert-grammars b/script/convert-grammars index 56a38607d8..e267907d96 100755 --- a/script/convert-grammars +++ b/script/convert-grammars @@ -42,7 +42,7 @@ class DirectoryPackage case File.extname(path.downcase) when '.plist' path.split('/')[-2] == 'Syntaxes' - when '.tmlanguage', '.sublime-syntax' + when '.tmlanguage', '.yaml-tmlanguage', '.sublime-syntax' true when '.cson', '.json' path.split('/')[-2] == 'grammars' @@ -114,7 +114,7 @@ class SVNPackage def fetch(tmp_dir) `svn export -q "#{url}/Syntaxes" "#{tmp_dir}/Syntaxes"` raise "Failed to export SVN repository: #{url}: #{$?.to_s}" unless $?.success? - Dir["#{tmp_dir}/Syntaxes/*.{plist,tmLanguage,tmlanguage,sublime-syntax}"] + Dir["#{tmp_dir}/Syntaxes/*.{plist,tmLanguage,tmlanguage,YAML-tmLanguage,sublime-syntax}"] end end @@ -148,7 +148,7 @@ def load_grammar(path) case File.extname(path.downcase) when '.plist', '.tmlanguage' Plist::parse_xml(path) - when '.sublime-syntax' + when '.yaml-tmlanguage', '.sublime-syntax' content = File.read(path) # Attempt to parse YAML file even if it has a YAML 1.2 header if content.lines[0] =~ /^%YAML[ :]1\.2/ @@ -180,7 +180,7 @@ def load_grammars(tmp_dir, source, all_scopes) else SingleFile.new(source) end - elsif source.end_with?('.tmLanguage', '.plist', '.sublime-syntax') + elsif source.end_with?('.tmLanguage', '.plist', '.YAML-tmLanguage', '.sublime-syntax') SingleGrammar.new(source) elsif source.start_with?('https://github.com') GitHubPackage.new(source) From 6482a60c6e71b1618f90c9a0b0f83dee91681179 Mon Sep 17 00:00:00 2001 From: Alhadis Date: Wed, 3 Aug 2016 01:39:07 +1000 Subject: [PATCH 0005/1214] Add colour to PostScript --- lib/linguist/languages.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index abd3418ca5..25a23dc93e 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2931,6 +2931,7 @@ Pony: PostScript: type: markup + color: "#da291c" extensions: - .ps - .eps @@ -3233,7 +3234,7 @@ Rebol: Red: type: programming - color: "#ee0000" + color: "#f50000" extensions: - .red - .reds @@ -3478,7 +3479,7 @@ Sass: Scala: type: programming ace_mode: scala - color: "#DC322F" + color: "#c22d40" extensions: - .scala - .sbt From 0dd78704f7ee1310a72866f59d7c8d1c812a55af Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 10 Aug 2016 13:10:05 -0700 Subject: [PATCH 0006/1214] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 638867c5bc..ec00ae149a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,7 +28,7 @@ We try only to add languages once they have some usage on GitHub. In most cases To add support for a new language: 0. Add an entry for your language to [`languages.yml`][languages]. -0. Add a grammar for your language. Please only add grammars that have a license that permits redistribution. +0. Add a grammar for your language. Please only add grammars that have [one of these licenses](https://github.com/github/linguist/blob/257425141d4e2a5232786bf0b13c901ada075f93/vendor/licenses/config.yml#L2-L11). 0. Add your grammar as a submodule: `git submodule add https://github.com/JaneSmith/MyGrammar vendor/grammars/MyGrammar`. 0. Add your grammar to [`grammars.yml`][grammars] by running `script/convert-grammars --add vendor/grammars/MyGrammar`. 0. Download the license for the grammar: `script/licensed`. Be careful to only commit the file for the new grammar, as this script may update licenses for other grammars as well. From 705e234044dffd3b02e16aceb6b32f84ad8f4c34 Mon Sep 17 00:00:00 2001 From: ajLangley12 Date: Sat, 13 Aug 2016 01:25:59 -0700 Subject: [PATCH 0007/1214] Added ASN.1 language package (#3152) --- .gitmodules | 3 +++ grammars.yml | 2 ++ lib/linguist/languages.yml | 9 +++++++ samples/ASN.1/example.asn | 33 +++++++++++++++++++++++ vendor/grammars/language-asn1 | 1 + vendor/licenses/grammar/language-asn1.txt | 26 ++++++++++++++++++ 6 files changed, 74 insertions(+) create mode 100644 samples/ASN.1/example.asn create mode 160000 vendor/grammars/language-asn1 create mode 100644 vendor/licenses/grammar/language-asn1.txt diff --git a/.gitmodules b/.gitmodules index b5de73ab20..7ad576657a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -755,3 +755,6 @@ url = https://github.com/austinwagner/sublime-sourcepawn [submodule "vendor/grammars/language-roff"] path = vendor/grammars/language-roff url = https://github.com/Alhadis/language-roff +[submodule "vendor/grammars/language-asn1"] + path = vendor/grammars/language-asn1 + url = https://github.com/ajLangley12/language-asn1 diff --git a/grammars.yml b/grammars.yml index 0751772f4c..42a694df3f 100755 --- a/grammars.yml +++ b/grammars.yml @@ -336,6 +336,8 @@ vendor/grammars/language-agc: - source.agc vendor/grammars/language-apl: - source.apl +vendor/grammars/language-asn1: +- source.asn vendor/grammars/language-babel/: - source.js.jsx - source.regexp.babel diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 25a23dc93e..11f7ebc38a 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -82,6 +82,15 @@ APL: tm_scope: source.apl ace_mode: text +ASN.1: + type: data + color: "#aeead0" + extensions: + - .asn + - .asn1 + tm_scope: source.asn + ace_mode: text + ASP: type: programming color: "#6a40fd" diff --git a/samples/ASN.1/example.asn b/samples/ASN.1/example.asn new file mode 100644 index 0000000000..0631abc90a --- /dev/null +++ b/samples/ASN.1/example.asn @@ -0,0 +1,33 @@ +MyShopPurchaseOrders DEFINITIONS AUTOMATIC TAGS ::= BEGIN + +PurchaseOrder ::= SEQUENCE { +dateOfOrder DATE, +customer CustomerInfo, +items ListOfItems +} + +CustomerInfo ::= SEQUENCE { +companyName VisibleString (SIZE (3..50)), +billingAddress Address, +contactPhone NumericString (SIZE (7..12)) +} + +Address::= SEQUENCE { +street VisibleString (SIZE (5 .. 50)) OPTIONAL, +city VisibleString (SIZE (2..30)), +state VisibleString (SIZE(2) ^ FROM ("A".."Z")), +zipCode NumericString (SIZE(5 | 9)) +} + +ListOfItems ::= SEQUENCE (SIZE (1..100)) OF Item + +Item ::= SEQUENCE { +itemCode INTEGER (1..99999), +color VisibleString ("Black" | "Blue" | "Brown"), +power INTEGER (110 | 220), +deliveryTime INTEGER (8..12 | 14..19), +quantity INTEGER (1..1000), +unitPrice REAL (1.00 .. 9999.00), +isTaxable BOOLEAN +} +END diff --git a/vendor/grammars/language-asn1 b/vendor/grammars/language-asn1 new file mode 160000 index 0000000000..d45daeb849 --- /dev/null +++ b/vendor/grammars/language-asn1 @@ -0,0 +1 @@ +Subproject commit d45daeb849f02a79d67585f629bdc83a06cc52e5 diff --git a/vendor/licenses/grammar/language-asn1.txt b/vendor/licenses/grammar/language-asn1.txt new file mode 100644 index 0000000000..3f9bfcae93 --- /dev/null +++ b/vendor/licenses/grammar/language-asn1.txt @@ -0,0 +1,26 @@ +--- +type: grammar +name: language-asn1 +license: mit +--- +The MIT License (MIT) + +Copyright (c) 2016 Alexander Langley + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 1868d1d1909d6024cff37696730be0acec5c2d29 Mon Sep 17 00:00:00 2001 From: Nikita Gryzlov Date: Fri, 19 Aug 2016 10:21:48 +0300 Subject: [PATCH 0008/1214] Add 1C (BSL) language support --- .gitmodules | 3 + grammars.yml | 3 + lib/linguist/languages.yml | 9 + ...5\320\275\321\202\320\260.Form.Module.bsl" | 265 +++++++++++++++ ...321\201\321\202\320\260.CommandModule.bsl" | 85 +++++ ...20\261\321\211\320\265\320\265.Module.bsl" | 109 +++++++ ...\320\260\321\200\320\260.ObjectModule.bsl" | 302 ++++++++++++++++++ samples/1C Enterprise/ci_before_script.os | 20 ++ samples/1C Enterprise/test_canCompile.os | 42 +++ vendor/grammars/atom-language-1c-bsl | 1 + .../licenses/grammar/atom-language-1c-bsl.txt | 25 ++ 11 files changed, 864 insertions(+) create mode 100644 "samples/1C Enterprise/Catalog.\320\230\321\201\321\205\320\276\320\264\321\217\321\211\320\270\320\265\320\237\320\270\321\201\321\214\320\274\320\260.Form.\320\244\320\276\321\200\320\274\320\260\320\255\320\273\320\265\320\274\320\265\320\275\321\202\320\260.Form.Module.bsl" create mode 100644 "samples/1C Enterprise/Catalog.\320\242\320\276\320\262\320\260\321\200\321\213.Command.\320\237\320\265\321\207\320\260\321\202\321\214\320\237\321\200\320\260\320\271\321\201\320\233\320\270\321\201\321\202\320\260.CommandModule.bsl" create mode 100644 "samples/1C Enterprise/CommonModule.\320\236\320\261\320\274\320\265\320\275\320\234\320\276\320\261\320\270\320\273\321\214\320\275\321\213\320\265\320\236\320\261\321\211\320\265\320\265.Module.bsl" create mode 100644 "samples/1C Enterprise/Document.\320\240\320\260\321\201\321\205\320\276\320\264\320\242\320\276\320\262\320\260\321\200\320\260.ObjectModule.bsl" create mode 100644 samples/1C Enterprise/ci_before_script.os create mode 100644 samples/1C Enterprise/test_canCompile.os create mode 160000 vendor/grammars/atom-language-1c-bsl create mode 100644 vendor/licenses/grammar/atom-language-1c-bsl.txt diff --git a/.gitmodules b/.gitmodules index 7ad576657a..25d1d8d588 100644 --- a/.gitmodules +++ b/.gitmodules @@ -758,3 +758,6 @@ url = https://github.com/austinwagner/sublime-sourcepawn [submodule "vendor/grammars/language-asn1"] path = vendor/grammars/language-asn1 url = https://github.com/ajLangley12/language-asn1 +[submodule "vendor/grammars/atom-language-1c-bsl"] + path = vendor/grammars/atom-language-1c-bsl + url = https://github.com/xDrivenDevelopment/atom-language-1c-bsl.git diff --git a/grammars.yml b/grammars.yml index 42a694df3f..e403dbfe04 100755 --- a/grammars.yml +++ b/grammars.yml @@ -181,6 +181,9 @@ vendor/grammars/atom-fsharp/: - source.fsharp.fsi - source.fsharp.fsl - source.fsharp.fsx +vendor/grammars/atom-language-1c-bsl: +- source.bsl +- source.sdbl vendor/grammars/atom-language-clean: - source.clean vendor/grammars/atom-language-purescript/: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 11f7ebc38a..ccef7df036 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -27,6 +27,15 @@ # # Please keep this list alphabetized. Capitalization comes before lower case. +1C Enterprise: + type: programming + color: "#814CCC" + extensions: + - .bsl + - .os + tm_scope: source.bsl + ace_mode: text + ABAP: type: programming color: "#E8274B" diff --git "a/samples/1C Enterprise/Catalog.\320\230\321\201\321\205\320\276\320\264\321\217\321\211\320\270\320\265\320\237\320\270\321\201\321\214\320\274\320\260.Form.\320\244\320\276\321\200\320\274\320\260\320\255\320\273\320\265\320\274\320\265\320\275\321\202\320\260.Form.Module.bsl" "b/samples/1C Enterprise/Catalog.\320\230\321\201\321\205\320\276\320\264\321\217\321\211\320\270\320\265\320\237\320\270\321\201\321\214\320\274\320\260.Form.\320\244\320\276\321\200\320\274\320\260\320\255\320\273\320\265\320\274\320\265\320\275\321\202\320\260.Form.Module.bsl" new file mode 100644 index 0000000000..e59d89b93a --- /dev/null +++ "b/samples/1C Enterprise/Catalog.\320\230\321\201\321\205\320\276\320\264\321\217\321\211\320\270\320\265\320\237\320\270\321\201\321\214\320\274\320\260.Form.\320\244\320\276\321\200\320\274\320\260\320\255\320\273\320\265\320\274\320\265\320\275\321\202\320\260.Form.Module.bsl" @@ -0,0 +1,265 @@ +&НаСервереБезКонтекста +Функция ПолучитьКонтактноеЛицоПоЭлектроннойПочте(ЭлектроннаяПочта) + Запрос = Новый Запрос; + Запрос.Текст = "ВЫБРАТЬ КонтактноеЛицо ИЗ Справочник.Контрагенты ГДЕ ЭлектроннаяПочта = &ЭлектроннаяПочта"; + Запрос.Параметры.Вставить("ЭлектроннаяПочта", СокрЛП(ЭлектроннаяПочта)); + Выборка = Запрос.Выполнить().Выбрать(); + КонтактноеЛицо = ""; + Если Выборка.Следующий() Тогда + КонтактноеЛицо = Выборка.КонтактноеЛицо; + КонецЕсли; + Возврат КонтактноеЛицо; +КонецФункции + +&НаСервереБезКонтекста +Функция ПолучитьКонтактноеЛицоПоПолучателю(Получатель) + Запрос = Новый Запрос; + Запрос.Текст = "ВЫБРАТЬ КонтактноеЛицо ИЗ Справочник.Контрагенты ГДЕ Ссылка = &Получатель"; + Запрос.Параметры.Вставить("Получатель", Получатель); + Выборка = Запрос.Выполнить().Выбрать(); + КонтактноеЛицо = ""; + Если Выборка.Следующий() Тогда + КонтактноеЛицо = Выборка.КонтактноеЛицо; + КонецЕсли; + Возврат КонтактноеЛицо; +КонецФункции + +&НаСервереБезКонтекста +Процедура ДобавитьПолучателей(Получатель, Получатели) + Запрос = Новый Запрос; + Запрос.Текст = "ВЫБРАТЬ ЭлектроннаяПочта ИЗ Справочник.Контрагенты ГДЕ Ссылка "; + Если ТипЗнч(Получатели) = Тип("Массив") Тогда + Запрос.Текст = Запрос.Текст + "В (&Получатели)"; + Иначе + Запрос.Текст = Запрос.Текст + "= &Получатели"; + КонецЕсли; + Запрос.Параметры.Вставить("Получатели", Получатели); + Выборка = Запрос.Выполнить().Выбрать(); + Пока Выборка.Следующий() Цикл + Если Получатель <> "" Тогда + Получатель = Получатель + "; "; + КонецЕсли; + Получатель = Получатель + Выборка.ЭлектроннаяПочта; + КонецЦикла; +КонецПроцедуры + +&НаСервере +Процедура ПриСозданииНаСервере(Отказ, СтандартнаяОбработка) + Если Параметры.Ключ.Пустая() Тогда + Заголовок = "Исходящее письмо (Создание)"; + Объект.Дата = ТекущаяДата(); + ПоШаблону = Параметры.Свойство("ПоШаблону"); + ВходящееПисьмо = Параметры.ВходящееПисьмо; + Если ПоШаблону = Истина Тогда + Элементы.ЗаполнитьПоШаблону.Видимость = Истина; + РаботаСПочтой.ЗаполнитьПисьмоПоШаблону(Объект, Содержимое); + ИначеЕсли Не ВходящееПисьмо.Пустая() Тогда + РаботаСПочтой.ЗаполнитьОтветНаПисьмо(ВходящееПисьмо, Объект, Содержимое); + КонецЕсли; + Адресаты = Параметры.Адресаты; + Если Адресаты <> Неопределено Тогда + Запрос = Новый Запрос; + Запрос.Текст = "ВЫБРАТЬ + | Контрагенты.ЭлектроннаяПочта + |ИЗ + | Справочник.Контрагенты КАК Контрагенты + |ГДЕ + | Контрагенты.Ссылка В(&Адресаты) + | И Контрагенты.ЭлектроннаяПочта <> """""; + Запрос.УстановитьПараметр("Адресаты", Адресаты); + Получатель = ""; + Выборка = Запрос.Выполнить().Выбрать(); + Пока Выборка.Следующий() Цикл + Если Получатель <> "" Тогда + Получатель = Получатель + "; "; + КонецЕсли; + Получатель = Получатель + Выборка.ЭлектроннаяПочта; + КонецЦикла; + Объект.Получатель = Получатель; + КонецЕсли; + КонецЕсли; +КонецПроцедуры + +&НаСервере +Процедура ПриЧтенииНаСервере(ТекущийОбъект) + Содержимое = ТекущийОбъект.Содержимое.Получить(); + Заголовок = ТекущийОбъект.Наименование + " (Исходящее письмо)"; + Если РаботаСПочтой.ПисьмоОтправлено(ТекущийОбъект.Ссылка) Тогда + Заголовок = Заголовок + " - Отправлено"; + КонецЕсли; +КонецПроцедуры + +&НаСервере +Процедура ПередЗаписьюНаСервере(Отказ, ТекущийОбъект, ПараметрыЗаписи) + ТекущийОбъект.Содержимое = Новый ХранилищеЗначения(Содержимое, Новый СжатиеДанных()); + ТекущийОбъект.Текст = Содержимое.ПолучитьТекст(); +КонецПроцедуры + +&НаСервере +Функция ОтправитьПисьмо(Ошибка) + Если Не Записать() Тогда + Ошибка = "ОшибкаЗаписи"; + Возврат Ложь; + КонецЕсли; + Если Не РаботаСПочтой.ОтправитьПисьмо(Объект.Ссылка) Тогда + Ошибка = "ОшибкаОтправки"; + Возврат Ложь; + КонецЕсли; + Заголовок = Заголовок + " - Отправлено"; + Возврат Истина; +КонецФункции + +&НаКлиенте +Функция ОтправитьПисьмоКлиент() + Ошибка = ""; + Если Не ОтправитьПисьмо(Ошибка) Тогда + Если Ошибка = "ОшибкаОтправки" Тогда + Кнопки = Новый СписокЗначений; + Кнопки.Добавить(1, "Настроить почту"); + Кнопки.Добавить(2, "Закрыть"); + + Оп = Новый ОписаниеОповещения( + "ОтправитьПисьмоКлиентВопросЗавершение", + ЭтотОбъект); + ПоказатьВопрос(Оп, + "Не указаны настройки интернет почты!", + Кнопки, , 1); + КонецЕсли; + Возврат Ложь; + КонецЕсли; + + НавигационнаяСсылка = ПолучитьНавигационнуюСсылку(Объект.Ссылка); + ПоказатьОповещениеПользователя("Письмо отправлено", НавигационнаяСсылка, Объект.Наименование); + ОповеститьОбИзменении(Объект.Ссылка); + Возврат Истина; +КонецФункции + +&НаКлиенте +Процедура ОтправитьПисьмоКлиентВопросЗавершение(Результат, Параметры) Экспорт + Если Результат = 1 Тогда + ОткрытьФорму("ОбщаяФорма.НастройкаПочты"); + КонецЕсли; +КонецПроцедуры + +&НаКлиенте +Процедура Отправить(Команда) + ОтправитьПисьмоКлиент(); +КонецПроцедуры + +&НаКлиенте +Процедура ОтправитьИЗакрыть(Команда) + Если Не ОтправитьПисьмоКлиент() Тогда + Возврат; + КонецЕсли; + Закрыть(); +КонецПроцедуры + +&НаКлиенте +Процедура ВставитьСтрокуВТекущуюПозицию(Поле, Документ, Строка) + Перем Начало, Конец; + Поле.ПолучитьГраницыВыделения(Начало, Конец); + Позиция = Документ.ПолучитьПозициюПоЗакладке(Начало); + Документ.Удалить(Начало, Конец); + Начало = Документ.ПолучитьЗакладкуПоПозиции(Позиция); + Документ.Вставить(Начало, Строка); + Позиция = Позиция + СтрДлина(Строка); + Закладка = Документ.ПолучитьЗакладкуПоПозиции(Позиция); + Поле.УстановитьГраницыВыделения(Закладка, Закладка); +КонецПроцедуры + +&НаКлиенте +Процедура ВставитьКонтактноеЛицо(Команда) + Если Объект.Контрагент.Пустая() Тогда + Сообщить("Выберите контрагента"); + Иначе + КонтактноеЛицо = ПолучитьКонтактноеЛицоПоПолучателю(Объект.Контрагент); + ВставитьСтрокуВТекущуюПозицию(Элементы.Содержимое, Содержимое, КонтактноеЛицо + " "); + КонецЕсли; +КонецПроцедуры + +&НаСервере +Процедура ПослеЗаписиНаСервере(ТекущийОбъект, ПараметрыЗаписи) + Заголовок = ТекущийОбъект.Наименование + " (Исходящее письмо)"; +КонецПроцедуры + +&НаКлиенте +Процедура КонтрагентПриИзменении(Элемент) + ДобавитьПолучателей(Объект.Получатель, Объект.Контрагент); +КонецПроцедуры + +&НаКлиенте +Процедура ВыделитьВажное(Команда) + Перем Начало, Конец; + ВсеВажное = Истина; + Элементы.Содержимое.ПолучитьГраницыВыделения(Начало, Конец); + Если Начало = Конец Тогда + Возврат; + КонецЕсли; + + НаборТекстовыхЭлементов = Новый Массив(); + Для Каждого ТекстовыйЭлемент Из Содержимое.СформироватьЭлементы(Начало, Конец) Цикл + Если Тип(ТекстовыйЭлемент) = Тип("ТекстФорматированногоДокумента") Тогда + НаборТекстовыхЭлементов.Добавить(ТекстовыйЭлемент); + КонецЕсли; + КонецЦикла; + + Для Каждого ТекстовыйЭлемент Из НаборТекстовыхЭлементов Цикл + Если ТекстовыйЭлемент.Шрифт.Жирный <> Истина И + ТекстовыйЭлемент.ЦветТекста <> Новый Цвет(255, 0, 0) Тогда + ВсеВажное = Ложь; + Прервать; + КонецЕсли; + КонецЦикла; + + Для Каждого ТекстовыйЭлемент Из НаборТекстовыхЭлементов Цикл + ТекстовыйЭлемент.Шрифт = Новый Шрифт(ТекстовыйЭлемент.Шрифт, , , Не ВсеВажное); + ТекстовыйЭлемент.ЦветТекста = Новый Цвет(?(ВсеВажное, 0, 255), 0, 0); + КонецЦикла; +КонецПроцедуры + +&НаКлиенте +Процедура ЗаполнитьПоШаблону(Команда) + Если Объект.Контрагент.Пустая() Тогда + Сообщить("Выберите контрагента"); + Иначе + НайтиИЗаменить("[Контрагент]", Объект.Контрагент); + НайтиИЗаменить("[КонтактноеЛицо]", ПолучитьКонтактноеЛицоПоПолучателю(Объект.Контрагент)); + КонецЕсли; + НайтиИЗаменить("[ДатаПисьма]", Объект.Дата); +КонецПроцедуры + +&НаКлиенте +Процедура НайтиИЗаменить(СтрокаДляПоиска, СтрокаДляЗамены) + Перем ВставленныйТекст, ШрифтОформления, ЦветТекстаОформления, ЦветФонаОформления, НавигационнаяСсылкаОформления; + РезультатПоиска = Содержимое.НайтиТекст(СтрокаДляПоиска); + Пока ((РезультатПоиска <> Неопределено) И (РезультатПоиска.ЗакладкаНачала <> Неопределено) И (РезультатПоиска.ЗакладкаКонца <> Неопределено)) Цикл + ПозицияНачалаСледующегоЦиклаПоиска = Содержимое.ПолучитьПозициюПоЗакладке(РезультатПоиска.ЗакладкаНачала) + СтрДлина(СтрокаДляЗамены); + МассивЭлементовДляОформления = Содержимое.ПолучитьЭлементы(РезультатПоиска.ЗакладкаНачала, РезультатПоиска.ЗакладкаКонца); + Для Каждого ЭлементДляОформления Из МассивЭлементовДляОформления Цикл + Если Тип(ЭлементДляОформления) = Тип("ТекстФорматированногоДокумента") Тогда + ШрифтОформления = ЭлементДляОформления.Шрифт; + ЦветТекстаОформления = ЭлементДляОформления.ЦветТекста; + ЦветФонаОформления = ЭлементДляОформления.ЦветФона; + НавигационнаяСсылкаОформления = ЭлементДляОформления.НавигационнаяССылка; + Прервать; + КонецЕсли; + КонецЦикла; + Содержимое.Удалить(РезультатПоиска.ЗакладкаНачала, РезультатПоиска.ЗакладкаКонца); + ВставленныйТекст = Содержимое.Вставить(РезультатПоиска.ЗакладкаНачала, СтрокаДляЗамены); + Если ВставленныйТекст <> Неопределено И ШрифтОформления <> Неопределено Тогда + ВставленныйТекст.Шрифт = ШрифтОформления; + КонецЕсли; + Если ВставленныйТекст <> Неопределено И ЦветТекстаОформления <> Неопределено Тогда + ВставленныйТекст.ЦветТекста = ЦветТекстаОформления; + КонецЕсли; + Если ВставленныйТекст <> Неопределено И ЦветФонаОформления <> Неопределено Тогда + ВставленныйТекст.ЦветФона = ЦветФонаОформления; + КонецЕсли; + Если ВставленныйТекст <> Неопределено И НавигационнаяСсылкаОформления <> Неопределено Тогда + ВставленныйТекст.НавигационнаяССылка = НавигационнаяСсылкаОформления; + КонецЕсли; + + РезультатПоиска = Содержимое.НайтиТекст(СтрокаДляПоиска, Содержимое.ПолучитьЗакладкуПоПозиции(ПозицияНачалаСледующегоЦиклаПоиска)); + КонецЦикла; +КонецПроцедуры + diff --git "a/samples/1C Enterprise/Catalog.\320\242\320\276\320\262\320\260\321\200\321\213.Command.\320\237\320\265\321\207\320\260\321\202\321\214\320\237\321\200\320\260\320\271\321\201\320\233\320\270\321\201\321\202\320\260.CommandModule.bsl" "b/samples/1C Enterprise/Catalog.\320\242\320\276\320\262\320\260\321\200\321\213.Command.\320\237\320\265\321\207\320\260\321\202\321\214\320\237\321\200\320\260\320\271\321\201\320\233\320\270\321\201\321\202\320\260.CommandModule.bsl" new file mode 100644 index 0000000000..f96e8811ab --- /dev/null +++ "b/samples/1C Enterprise/Catalog.\320\242\320\276\320\262\320\260\321\200\321\213.Command.\320\237\320\265\321\207\320\260\321\202\321\214\320\237\321\200\320\260\320\271\321\201\320\233\320\270\321\201\321\202\320\260.CommandModule.bsl" @@ -0,0 +1,85 @@ +&НаСервере +Функция ПечатнаяФорма(ПараметрКоманды) + ТабличныйДокумент = Новый ТабличныйДокумент; + ТабличныйДокумент.ОтображатьСетку = Истина; + ТабличныйДокумент.ОтображатьЗаголовки = Истина; + + Сформирован = Ложь; + ТабМакет = Справочники.Товары.ПолучитьМакет("МакетПрайсЛиста"); + + Шапка = ТабМакет.ПолучитьОбласть("Шапка"); + ТабличныйДокумент.Вывести(Шапка); + + ОбластьНоменклатура = ТабМакет.ПолучитьОбласть("ОбластьНоменклатура"); + + Запрос = Новый Запрос; + Запрос.Текст = "ВЫБРАТЬ + | Товары.Код КАК Код, + | Товары.Наименование КАК Наименование, + | Товары.Артикул КАК Артикул, + | Товары.ФайлКартинки КАК Картинка, + | Товары.Описание КАК Описание, + | Товары.Вид КАК Вид, + | ЦеныТоваров.Цена КАК Цена + |ИЗ + | РегистрСведений.ЦеныТоваров КАК ЦеныТоваров + | ЛЕВОЕ СОЕДИНЕНИЕ Справочник.Товары КАК Товары + | ПО ЦеныТоваров.Товар = Товары.Ссылка + |ГДЕ + | Товары.ЭтоГруппа = ЛОЖЬ + | И ЦеныТоваров.ВидЦен = &ВидЦен + | + |УПОРЯДОЧИТЬ ПО + | Вид, + | Товары.Родитель.Код, + | Код"; + + Запрос.УстановитьПараметр("ВидЦен", Справочники.ВидыЦен.НайтиПоНаименованию("Розничная")); + + Выборка = Запрос.Выполнить().Выбрать(); + Пока Выборка.Следующий() Цикл + ОбластьНоменклатура.Параметры.Заполнить(Выборка); + + Описание = ""; + + Чтение = Новый ЧтениеHTML(); + Чтение.УстановитьСтроку(Выборка.Описание); + + ДокDOM = Новый ПостроительDOM(); + HTML = ДокDOM.Прочитать(Чтение); + + Если Не HTML.ЭлементДокумента = Неопределено Тогда + Для Каждого Узел из HTML.ЭлементДокумента.ДочерниеУзлы Цикл + Если Узел.ИмяУзла = "body" Тогда + Для Каждого ЭлементОписания из Узел.ДочерниеУзлы Цикл + Описание = Описание + ЭлементОписания.ТекстовоеСодержимое; + КонецЦикла; + КонецЕсли; + КонецЦикла; + КонецЕсли; + ОбластьНоменклатура.Параметры.Описание = Описание; + + Если (Выборка.Картинка <> Null) Тогда + ОбластьНоменклатура.Параметры.ПараметрКартинки = Новый Картинка(Выборка.Картинка.ДанныеФайла.Получить()); + КонецЕсли; + + ТабличныйДокумент.Вывести(ОбластьНоменклатура, Выборка.Уровень()); + Сформирован = Истина; + КонецЦикла; + + Если Сформирован Тогда + Возврат ТабличныйДокумент; + Иначе + Возврат Неопределено; + КонецЕсли; +КонецФункции + +&НаКлиенте +Процедура ОбработкаКоманды(ПараметрКоманды, ПараметрыВыполненияКоманды) + ТабличныйДокумент = ПечатнаяФорма(ПараметрКоманды); + + Если ТабличныйДокумент <> Неопределено Тогда + ТабличныйДокумент.Показать(); + КонецЕсли; + +КонецПроцедуры diff --git "a/samples/1C Enterprise/CommonModule.\320\236\320\261\320\274\320\265\320\275\320\234\320\276\320\261\320\270\320\273\321\214\320\275\321\213\320\265\320\236\320\261\321\211\320\265\320\265.Module.bsl" "b/samples/1C Enterprise/CommonModule.\320\236\320\261\320\274\320\265\320\275\320\234\320\276\320\261\320\270\320\273\321\214\320\275\321\213\320\265\320\236\320\261\321\211\320\265\320\265.Module.bsl" new file mode 100644 index 0000000000..d5a1a2cb7c --- /dev/null +++ "b/samples/1C Enterprise/CommonModule.\320\236\320\261\320\274\320\265\320\275\320\234\320\276\320\261\320\270\320\273\321\214\320\275\321\213\320\265\320\236\320\261\321\211\320\265\320\265.Module.bsl" @@ -0,0 +1,109 @@ +// Процедура на основании анализа типа данных заменяет их на данные, удаляющие +// информацию из узла в котором их не должно быть +// +// Параметры: +// Данные – Объект, набор записей,... который нужно преобразовать +// +Процедура УдалениеДанных(Данные) + + // Получаем объект описания метаданного, соответствующий данным + ОбъектМетаданных = ?(ТипЗнч(Данные) = Тип("УдалениеОбъекта"), Данные.Ссылка.Метаданные(), Данные.Метаданные()); + // Проверяем тип, интересуют только те типы, которые реализованы на мобильной платформе + Если Метаданные.Справочники.Содержит(ОбъектМетаданных) + ИЛИ Метаданные.Документы.Содержит(ОбъектМетаданных) Тогда + + // Перенос удаления объекта для объектных + Данные = Новый УдалениеОбъекта(Данные.Ссылка); + + ИначеЕсли Метаданные.РегистрыСведений.Содержит(ОбъектМетаданных) + ИЛИ Метаданные.РегистрыНакопления.Содержит(ОбъектМетаданных) + ИЛИ Метаданные.Последовательности.Содержит(ОбъектМетаданных) Тогда + + // Очищаем данные + Данные.Очистить(); + + КонецЕсли; + +КонецПроцедуры + +// Функция формирует пакет обмена, который будет отправлен узлу "УзелОбмена" +// +// Параметры: +// УзелОбмена – узел плана обмена "мобильные", с которым осуществляется обмен +// +// Возвращаемое значение: +// сформированный пакет, помещенный в хранилище значения +Функция СформироватьПакетОбмена(УзелОбмена) Экспорт + + ЗаписьXML = Новый ЗаписьXML; + + ЗаписьXML.УстановитьСтроку("UTF-8"); + ЗаписьXML.ЗаписатьОбъявлениеXML(); + + ЗаписьСообщения = ПланыОбмена.СоздатьЗаписьСообщения(); + ЗаписьСообщения.НачатьЗапись(ЗаписьXML, УзелОбмена); + + ЗаписьXML.ЗаписатьСоответствиеПространстваИмен("xsi", "http://www.w3.org/2001/XMLSchema-instance"); + ЗаписьXML.ЗаписатьСоответствиеПространстваИмен("v8", "http://v8.1c.ru/data"); + + ТипДанныхУдаления = Тип("УдалениеОбъекта"); + + ВыборкаИзменений = ПланыОбмена.ВыбратьИзменения(УзелОбмена, ЗаписьСообщения.НомерСообщения); + Пока ВыборкаИзменений.Следующий() Цикл + + Данные = ВыборкаИзменений.Получить(); + + // Если перенос данных не нужен, то, возможно, необходимо записать удаление данных + Если Не ОбменМобильныеПереопределяемый.НуженПереносДанных(Данные, УзелОбмена) Тогда + + // Получаем значение с возможным удалением данных + УдалениеДанных(Данные); + + КонецЕсли; + + // Записываем данные в сообщение + ОбменМобильныеПереопределяемый.ЗаписатьДанные(ЗаписьXML, Данные); + + КонецЦикла; + + ЗаписьСообщения.ЗакончитьЗапись(); + + Возврат Новый ХранилищеЗначения(ЗаписьXML.Закрыть(), Новый СжатиеДанных(9)); + +КонецФункции + +// Процедура вносит в информационную базу данные, которые присланы из узла "УзелОбмена" +// +// Параметры: +// УзелОбмена – узел плана обмена "мобильные", с которым осуществляется обмен +// ДанныеОбмена - пакет обмена полученный из узла УзелОбмена, помещен в ХранилищеЗначения +// +Процедура ПринятьПакетОбмена(УзелОбмена, ДанныеОбмена) Экспорт + + ЧтениеXML = Новый ЧтениеXML; + ЧтениеXML.УстановитьСтроку(ДанныеОбмена.Получить()); + ЧтениеСообщения = ПланыОбмена.СоздатьЧтениеСообщения(); + ЧтениеСообщения.НачатьЧтение(ЧтениеXML); + ПланыОбмена.УдалитьРегистрациюИзменений(ЧтениеСообщения.Отправитель,ЧтениеСообщения.НомерПринятого); + + НачатьТранзакцию(); + Пока ВозможностьЧтенияXML(ЧтениеXML) Цикл + + Данные = ОбменМобильныеПереопределяемый.ПрочитатьДанные(ЧтениеXML); + + Если Не Данные = Неопределено Тогда + + Данные.ОбменДанными.Отправитель = ЧтениеСообщения.Отправитель; + Данные.ОбменДанными.Загрузка = Истина; + + Данные.Записать(); + + КонецЕсли; + + КонецЦикла; + ЗафиксироватьТранзакцию(); + + ЧтениеСообщения.ЗакончитьЧтение(); + ЧтениеXML.Закрыть(); + +КонецПроцедуры diff --git "a/samples/1C Enterprise/Document.\320\240\320\260\321\201\321\205\320\276\320\264\320\242\320\276\320\262\320\260\321\200\320\260.ObjectModule.bsl" "b/samples/1C Enterprise/Document.\320\240\320\260\321\201\321\205\320\276\320\264\320\242\320\276\320\262\320\260\321\200\320\260.ObjectModule.bsl" new file mode 100644 index 0000000000..1edbfb085c --- /dev/null +++ "b/samples/1C Enterprise/Document.\320\240\320\260\321\201\321\205\320\276\320\264\320\242\320\276\320\262\320\260\321\200\320\260.ObjectModule.bsl" @@ -0,0 +1,302 @@ +//////////////////////////////////////////////////////////////////////////////// +// ПРОЦЕДУРЫ И ФУНКЦИИ +// + +// Формирование печатной формы документа +// +// Параметры: +// Нет. +// +// Возвращаемое значение: +// ТабличныйДокумент - Сформированный табличный документ. +Процедура ПечатнаяФорма(ТабличныйДокумент) Экспорт + + Макет = Документы.РасходТовара.ПолучитьМакет("МакетПечати"); + + // Заголовок + Область = Макет.ПолучитьОбласть("Заголовок"); + ТабличныйДокумент.Вывести(Область); + + // Шапка + Шапка = Макет.ПолучитьОбласть("Шапка"); + Шапка.Параметры.Заполнить(ЭтотОбъект); + ТабличныйДокумент.Вывести(Шапка); + + // Товары + Область = Макет.ПолучитьОбласть("ТоварыШапка"); + ТабличныйДокумент.Вывести(Область); + ОбластьТовары = Макет.ПолучитьОбласть("Товары"); + + Для каждого ТекСтрокаТовары Из Товары Цикл + + ОбластьТовары.Параметры.Заполнить(ТекСтрокаТовары); + ТабличныйДокумент.Вывести(ОбластьТовары); + + КонецЦикла; + +КонецПроцедуры + +// Формирование печатной формы документа +// +// Параметры: +// Нет. +// +// Возвращаемое значение: +// ТабличныйДокумент - Сформированный табличный документ. +Процедура Пересчитать() Экспорт + + Для каждого ТекСтрокаТовары Из Товары Цикл + + ТекСтрокаТовары.Сумма = ТекСтрокаТовары.Количество * ТекСтрокаТовары.Цена; + + КонецЦикла; + +КонецПроцедуры + +//////////////////////////////////////////////////////////////////////////////// +// ОБРАБОТЧИКИ СОБЫТИЙ ОБЪЕКТА + +Процедура ОбработкаПроведения(Отказ, Режим) + + // Формирование движений регистров накопления ТоварныеЗапасы и Продажи. + Движения.ТоварныеЗапасы.Записывать = Истина; + Движения.Продажи.Записывать = Истина; + Если Режим = РежимПроведенияДокумента.Оперативный Тогда + Движения.ТоварныеЗапасы.БлокироватьДляИзменения = Истина; + КонецЕсли; + + // Создадим запрос, чтобы получать информацию об услугах + Запрос = Новый Запрос("ВЫБРАТЬ + | ТоварыВДокументе.НомерСтроки КАК НомерСтроки + |ИЗ + | Документ.РасходТовара.Товары КАК ТоварыВДокументе + |ГДЕ + | ТоварыВДокументе.Ссылка = &Ссылка + | И ТоварыВДокументе.Товар.Вид = ЗНАЧЕНИЕ(Перечисление.ВидыТоваров.Услуга)"); + + Запрос.УстановитьПараметр("Ссылка", Ссылка); + РезультатУслуги = Запрос.Выполнить().Выгрузить(); + РезультатУслуги.Индексы.Добавить("НомерСтроки"); + + Для каждого ТекСтрокаТовары Из Товары Цикл + + Строка = РезультатУслуги.Найти(ТекСтрокаТовары.НомерСтроки, "НомерСтроки"); + Если Строка = Неопределено Тогда + + // Не услуга + Движение = Движения.ТоварныеЗапасы.Добавить(); + Движение.ВидДвижения = ВидДвиженияНакопления.Расход; + Движение.Период = Дата; + Движение.Товар = ТекСтрокаТовары.Товар; + Движение.Склад = Склад; + Движение.Количество = ТекСтрокаТовары.Количество; + + КонецЕсли; + + Движение = Движения.Продажи.Добавить(); + Движение.Период = Дата; + Движение.Товар = ТекСтрокаТовары.Товар; + Движение.Покупатель = Покупатель; + Движение.Количество = ТекСтрокаТовары.Количество; + Движение.Сумма = ТекСтрокаТовары.Сумма; + + КонецЦикла; + + // Формирование движения регистра накопления Взаиморасчеты. + Движения.Взаиморасчеты.Записывать = Истина; + Движение = Движения.Взаиморасчеты.Добавить(); + Движение.ВидДвижения = ВидДвиженияНакопления.Расход; + Движение.Период = Дата; + Движение.Контрагент = Покупатель; + Движение.Валюта = Валюта; + + Если Валюта.Пустая() Тогда + Движение.Сумма = Товары.Итог("Сумма"); + Иначе + + Курс = РегистрыСведений.КурсыВалют.ПолучитьПоследнее(Дата, Новый Структура("Валюта", Валюта)).Курс; + + Если Курс = 0 Тогда + Движение.Сумма = Товары.Итог("Сумма"); + Иначе + Движение.Сумма = Товары.Итог("Сумма") / Курс; + КонецЕсли; + + КонецЕсли; + + //Запишем движения + Движения.Записать(); + + //Контроль остатков при оперативном проведении + Если Режим = РежимПроведенияДокумента.Оперативный Тогда + // Создадим запрос, чтобы контролировать остатки по товарам + Запрос = Новый Запрос("ВЫБРАТЬ + | ТоварыВДокументе.Товар КАК Товар, + | СУММА(ТоварыВДокументе.Количество) КАК Количество, + | МАКСИМУМ(ТоварыВДокументе.НомерСтроки) КАК НомерСтроки + | + |ПОМЕСТИТЬ ТребуетсяТовара + | + |ИЗ + | Документ.РасходТовара.Товары КАК ТоварыВДокументе + | + |ГДЕ + | ТоварыВДокументе.Ссылка = &Ссылка + | И ТоварыВДокументе.Товар.Вид = ЗНАЧЕНИЕ(Перечисление.ВидыТоваров.Товар) + | + |СГРУППИРОВАТЬ ПО + | ТоварыВДокументе.Товар + | + |ИНДЕКСИРОВАТЬ ПО + | Товар + |; + | + |//////////////////////////////////////////////////////////////////////////////// + |ВЫБРАТЬ + | ПРЕДСТАВЛЕНИЕ(ТребуетсяТовара.Товар) КАК ТоварПредставление, + | ВЫБОР + | КОГДА - ЕСТЬNULL(ТоварныеЗапасыОстатки.КоличествоОстаток, 0) > ТоварыВДокументе.Количество + | ТОГДА ТоварыВДокументе.Количество + | ИНАЧЕ - ЕСТЬNULL(ТоварныеЗапасыОстатки.КоличествоОстаток, 0) + | КОНЕЦ КАК Нехватка, + | ТоварыВДокументе.Количество - ВЫБОР + | КОГДА - ЕСТЬNULL(ТоварныеЗапасыОстатки.КоличествоОстаток, 0) > ТоварыВДокументе.Количество + | ТОГДА ТоварыВДокументе.Количество + | ИНАЧЕ - ЕСТЬNULL(ТоварныеЗапасыОстатки.КоличествоОстаток, 0) + | КОНЕЦ КАК МаксимальноеКоличество, + | ТребуетсяТовара.НомерСтроки КАК НомерСтроки + | + |ИЗ + | ТребуетсяТовара КАК ТребуетсяТовара + | ЛЕВОЕ СОЕДИНЕНИЕ РегистрНакопления.ТоварныеЗапасы.Остатки( + | , + | Товар В + | (ВЫБРАТЬ + | ТребуетсяТовара.Товар + | ИЗ + | ТребуетсяТовара) + | И Склад = &Склад) КАК ТоварныеЗапасыОстатки + | ПО ТребуетсяТовара.Товар = ТоварныеЗапасыОстатки.Товар + | ЛЕВОЕ СОЕДИНЕНИЕ Документ.РасходТовара.Товары КАК ТоварыВДокументе + | ПО ТребуетсяТовара.Товар = ТоварыВДокументе.Товар + | И ТребуетсяТовара.НомерСтроки = ТоварыВДокументе.НомерСтроки + | + |ГДЕ + | ТоварыВДокументе.Ссылка = &Ссылка И + | 0 > ЕСТЬNULL(ТоварныеЗапасыОстатки.КоличествоОстаток, 0) + | + |УПОРЯДОЧИТЬ ПО + | НомерСтроки"); + + Запрос.УстановитьПараметр("Склад", Склад); + Запрос.УстановитьПараметр("Ссылка", Ссылка); + РезультатСНехваткой = Запрос.Выполнить(); + + ВыборкаРезультатаСНехваткой = РезультатСНехваткой.Выбрать(); + + // Выдадим ошибки для строк, в которых не хватает остатка + Пока ВыборкаРезультатаСНехваткой.Следующий() Цикл + + Сообщение = Новый СообщениеПользователю(); + Сообщение.Текст = НСтр("ru = 'Не хватает '", "ru") + + ВыборкаРезультатаСНехваткой.Нехватка + + НСтр("ru = ' единиц товара'", "ru") + """" + + ВыборкаРезультатаСНехваткой.ТоварПредставление + + """" + + НСтр("ru = ' на складе'", "ru") + + """" + + Склад + + """." + + НСтр("ru = 'Максимальное количество: '", "ru") + + ВыборкаРезультатаСНехваткой.МаксимальноеКоличество + + "."; + Сообщение.Поле = НСтр("ru = 'Товары'", "ru") + + "[" + + (ВыборкаРезультатаСНехваткой.НомерСтроки - 1) + + "]." + + НСтр("ru = 'Количество'", "ru"); + Сообщение.УстановитьДанные(ЭтотОбъект); + Сообщение.Сообщить(); + Отказ = Истина; + + КонецЦикла; + + КонецЕсли; + +КонецПроцедуры + +Процедура ОбработкаПроверкиЗаполнения(Отказ, ПроверяемыеРеквизиты) + // Проверим заполненность поля "Покупатель" + Если Покупатель.Пустая() Тогда + + // Если поле Покупатель не заполнено, сообщим об этом пользователю + Сообщение = Новый СообщениеПользователю(); + Сообщение.Текст = НСтр("ru = 'Не указан Покупатель, для которого выписывается накладная!'", "ru"); + Сообщение.Поле = НСтр("ru = 'Покупатель'", "ru"); + Сообщение.УстановитьДанные(ЭтотОбъект); + + Сообщение.Сообщить(); + + // Сообщим платформе, что мы сами обработали проверку заполнения поля "Покупатель" + ПроверяемыеРеквизиты.Удалить(ПроверяемыеРеквизиты.Найти("Покупатель")); + // Так как информация в документе не консистентна, то продолжать работу дальше смысла нет + Отказ = Истина; + + КонецЕсли; + + //Если склад не заполнен, то проверим есть ли в документе что-то кроме услуг + Если Склад.Пустая() И Товары.Количество() > 0 Тогда + + // Создадим запрос, чтобы получать информацию об товарах + Запрос = Новый Запрос("ВЫБРАТЬ + | Количество(*) КАК Количество + |ИЗ + | Справочник.Товары КАК Товары + |ГДЕ + | Товары.Ссылка В (&ТоварыВДокументе) + | И Товары.Вид = ЗНАЧЕНИЕ(Перечисление.ВидыТоваров.Товар)"); + + Запрос.УстановитьПараметр("ТоварыВДокументе", Товары.ВыгрузитьКолонку("Товар")); + Выборка = Запрос.Выполнить().Выбрать(); + Выборка.Следующий(); + Если Выборка.Количество = 0 Тогда + // Сообщим платформе, что мы сами обработали проверку заполнения поля "Склад" + ПроверяемыеРеквизиты.Удалить(ПроверяемыеРеквизиты.Найти("Склад")); + КонецЕсли; + + КонецЕсли; + +КонецПроцедуры + +Процедура ОбработкаЗаполнения(ДанныеЗаполнения, СтандартнаяОбработка) + + Если ТипЗнч(ДанныеЗаполнения) = Тип("СправочникСсылка.Контрагенты") Тогда + + ЗапросПоКонтрагенту = Новый Запрос("ВЫБРАТЬ + | Контрагенты.ЭтоГруппа, + | Контрагенты.ВидЦен + |ИЗ + | Справочник.Контрагенты КАК Контрагенты + |ГДЕ + | Контрагенты.Ссылка = &КонтрагентСсылка"); + ЗапросПоКонтрагенту.УстановитьПараметр("КонтрагентСсылка", ДанныеЗаполнения); + Выборка = ЗапросПоКонтрагенту.Выполнить().Выбрать(); + Если Выборка.Следующий() И Выборка.ЭтоГруппа Тогда + Возврат; + КонецЕсли; + + ВидЦен = Выборка.ВидЦен; + Покупатель = ДанныеЗаполнения.Ссылка; + + ИначеЕсли ТипЗнч(ДанныеЗаполнения) = Тип("Структура") Тогда + + Значение = Неопределено; + + Если ДанныеЗаполнения.Свойство("Покупатель", Значение) Тогда + ВидЦен = Значение.ВидЦен; + КонецЕсли; + + КонецЕсли; + +КонецПроцедуры + diff --git a/samples/1C Enterprise/ci_before_script.os b/samples/1C Enterprise/ci_before_script.os new file mode 100644 index 0000000000..baeaa47586 --- /dev/null +++ b/samples/1C Enterprise/ci_before_script.os @@ -0,0 +1,20 @@ +Каталог = ОбъединитьПути(ТекущийКаталог(), "libs\oscript-library\src"); +Загрузчик_Оригинал_ИмяФайла = ОбъединитьПути(Каталог, "package-loader.os"); + +Файлы = НайтиФайлы(Каталог, , Ложь); +Для Каждого ВыбФайл Из Файлы Цикл + + Если ВыбФайл.ЭтоФайл() Тогда + Продолжить; + КонецЕсли; + + Загрузчик_ИмяФайла = ОбъединитьПути(ВыбФайл.ПолноеИмя, "package-loader.os"); + Загрузчик_Файл = Новый Файл(Загрузчик_ИмяФайла); + + Если Загрузчик_Файл.Существует() Тогда + Продолжить; + КонецЕсли; + + КопироватьФайл(Загрузчик_Оригинал_ИмяФайла, Загрузчик_ИмяФайла); + +КонецЦикла; \ No newline at end of file diff --git a/samples/1C Enterprise/test_canCompile.os b/samples/1C Enterprise/test_canCompile.os new file mode 100644 index 0000000000..2e94978512 --- /dev/null +++ b/samples/1C Enterprise/test_canCompile.os @@ -0,0 +1,42 @@ +#Использовать "../libs/oscript-library/src/v8runner" +#Использовать "../libs/oscript-library/src/tempfiles" + +Перем Лог; +Перем КодВозврата; + +Процедура Инициализация() + + Лог = Логирование.ПолучитьЛог("oscript.app.gitlab-test_CanCompile"); + КодВозврата = 0; + +КонецПроцедуры + +Процедура ВыполнитьТест() + + Конфигуратор = Новый УправлениеКонфигуратором(); + + ПараметрыЗапуска = Конфигуратор.ПолучитьПараметрыЗапуска(); + КомандаЗапуска = "/LoadConfigFromFiles ""%1"""; + КомандаЗапуска = СтрШаблон(КомандаЗапуска, ТекущийКаталог() + "\source\cf"); + + Лог.Информация("Команда обновления конфигурации: " + КомандаЗапуска); + + ПараметрыЗапуска.Добавить(КомандаЗапуска); + + Попытка + Конфигуратор.ВыполнитьКоманду(ПараметрыЗапуска); + Исключение + + Лог.Ошибка(Конфигуратор.ВыводКоманды()); + КодВозврата = 1; + + КонецПопытки; + + УдалитьФайлы(Конфигуратор.ПутьКВременнойБазе()); + +КонецПроцедуры + +Инициализация(); +ВыполнитьТест(); + +ЗавершитьРаботу(КодВозврата); \ No newline at end of file diff --git a/vendor/grammars/atom-language-1c-bsl b/vendor/grammars/atom-language-1c-bsl new file mode 160000 index 0000000000..787ea4fd3a --- /dev/null +++ b/vendor/grammars/atom-language-1c-bsl @@ -0,0 +1 @@ +Subproject commit 787ea4fd3ac7239325ca35341fb74b01284125dd diff --git a/vendor/licenses/grammar/atom-language-1c-bsl.txt b/vendor/licenses/grammar/atom-language-1c-bsl.txt new file mode 100644 index 0000000000..b1f0d78cea --- /dev/null +++ b/vendor/licenses/grammar/atom-language-1c-bsl.txt @@ -0,0 +1,25 @@ +--- +type: grammar +name: atom-language-1c-bsl +license: mit +--- +Copyright © 2015 xDrivenDevelopment + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. From 56f0f93bbbd5a4ee56ca6ab3063396b844485416 Mon Sep 17 00:00:00 2001 From: John Gardner Date: Sat, 20 Aug 2016 02:49:15 +1000 Subject: [PATCH 0009/1214] Change grammar used for Haskell highlighting (#3147) --- .gitmodules | 6 ++--- grammars.yml | 12 ++++++--- vendor/grammars/haskell.tmbundle | 1 - vendor/grammars/language-haskell | 1 + vendor/licenses/grammar/haskell.tmbundle.txt | 15 ----------- vendor/licenses/grammar/language-haskell.txt | 26 ++++++++++++++++++++ 6 files changed, 39 insertions(+), 22 deletions(-) delete mode 160000 vendor/grammars/haskell.tmbundle create mode 160000 vendor/grammars/language-haskell delete mode 100644 vendor/licenses/grammar/haskell.tmbundle.txt create mode 100644 vendor/licenses/grammar/language-haskell.txt diff --git a/.gitmodules b/.gitmodules index 25d1d8d588..aa73532fb9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -280,9 +280,6 @@ [submodule "vendor/grammars/groovy.tmbundle"] path = vendor/grammars/groovy.tmbundle url = https://github.com/textmate/groovy.tmbundle -[submodule "vendor/grammars/haskell.tmbundle"] - path = vendor/grammars/haskell.tmbundle - url = https://github.com/textmate/haskell.tmbundle [submodule "vendor/grammars/html.tmbundle"] path = vendor/grammars/html.tmbundle url = https://github.com/textmate/html.tmbundle @@ -755,6 +752,9 @@ url = https://github.com/austinwagner/sublime-sourcepawn [submodule "vendor/grammars/language-roff"] path = vendor/grammars/language-roff url = https://github.com/Alhadis/language-roff +[submodule "vendor/grammars/language-haskell"] + path = vendor/grammars/language-haskell + url = https://github.com/atom-haskell/language-haskell [submodule "vendor/grammars/language-asn1"] path = vendor/grammars/language-asn1 url = https://github.com/ajLangley12/language-asn1 diff --git a/grammars.yml b/grammars.yml index e403dbfe04..de015d258c 100755 --- a/grammars.yml +++ b/grammars.yml @@ -294,9 +294,6 @@ vendor/grammars/graphviz.tmbundle: - source.dot vendor/grammars/groovy.tmbundle: - source.groovy -vendor/grammars/haskell.tmbundle: -- source.haskell -- text.tex.latex.haskell vendor/grammars/haxe-sublime-bundle: - source.erazor - source.haxe.2 @@ -369,6 +366,15 @@ vendor/grammars/language-gfm: - source.gfm vendor/grammars/language-graphql: - source.graphql +vendor/grammars/language-haskell: +- hint.haskell +- hint.message.haskell +- hint.type.haskell +- source.c2hs +- source.cabal +- source.haskell +- source.hsc2hs +- text.tex.latex.haskell vendor/grammars/language-hy: - source.hy vendor/grammars/language-inform7: diff --git a/vendor/grammars/haskell.tmbundle b/vendor/grammars/haskell.tmbundle deleted file mode 160000 index df3d54278a..0000000000 --- a/vendor/grammars/haskell.tmbundle +++ /dev/null @@ -1 +0,0 @@ -Subproject commit df3d54278a3ab3cfb30c37d94e06587478cc79ad diff --git a/vendor/grammars/language-haskell b/vendor/grammars/language-haskell new file mode 160000 index 0000000000..16e6122e17 --- /dev/null +++ b/vendor/grammars/language-haskell @@ -0,0 +1 @@ +Subproject commit 16e6122e17ac5705dd18a1680142f29d059a4724 diff --git a/vendor/licenses/grammar/haskell.tmbundle.txt b/vendor/licenses/grammar/haskell.tmbundle.txt deleted file mode 100644 index 12ab34cf1c..0000000000 --- a/vendor/licenses/grammar/haskell.tmbundle.txt +++ /dev/null @@ -1,15 +0,0 @@ ---- -type: grammar -name: haskell.tmbundle -license: permissive -curated: true ---- - -If not otherwise specified (see below), files in this repository fall under the following license: - - Permission to copy, use, modify, sell and distribute this - software is granted. This software is provided "as is" without - express or implied warranty, and with no claim as to its - suitability for any purpose. - -An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”. diff --git a/vendor/licenses/grammar/language-haskell.txt b/vendor/licenses/grammar/language-haskell.txt new file mode 100644 index 0000000000..d46acdb448 --- /dev/null +++ b/vendor/licenses/grammar/language-haskell.txt @@ -0,0 +1,26 @@ +--- +type: grammar +name: language-haskell +license: mit +--- +The MIT License (MIT) + +Copyright (c) 2015 Atom-Haskell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From ff042a87a49bb7a98d14c26c510df79a0746ec5b Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Wed, 24 Aug 2016 07:12:42 +0200 Subject: [PATCH 0010/1214] Grammar for REXX from Sublime Text package --- .gitmodules | 3 +++ grammars.yml | 2 ++ lib/linguist/languages.yml | 2 +- vendor/grammars/sublime-rexx | 1 + vendor/licenses/grammar/sublime-rexx.txt | 26 ++++++++++++++++++++++++ 5 files changed, 33 insertions(+), 1 deletion(-) create mode 160000 vendor/grammars/sublime-rexx create mode 100644 vendor/licenses/grammar/sublime-rexx.txt diff --git a/.gitmodules b/.gitmodules index aa73532fb9..a25c28a6ea 100644 --- a/.gitmodules +++ b/.gitmodules @@ -761,3 +761,6 @@ url = https://github.com/austinwagner/sublime-sourcepawn [submodule "vendor/grammars/atom-language-1c-bsl"] path = vendor/grammars/atom-language-1c-bsl url = https://github.com/xDrivenDevelopment/atom-language-1c-bsl.git +[submodule "vendor/grammars/sublime-rexx"] + path = vendor/grammars/sublime-rexx + url = https://github.com/mblocker/rexx-sublime diff --git a/grammars.yml b/grammars.yml index de015d258c..7289d71f70 100755 --- a/grammars.yml +++ b/grammars.yml @@ -584,6 +584,8 @@ vendor/grammars/sublime-opal/: - source.opalsysdefs vendor/grammars/sublime-pony: - source.pony +vendor/grammars/sublime-rexx/: +- source.rexx vendor/grammars/sublime-robot-plugin: - text.robot vendor/grammars/sublime-rust: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index ccef7df036..f8e97318c8 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3174,7 +3174,7 @@ REXX: - .rexx - .pprx - .rex - tm_scope: none + tm_scope: source.rexx ace_mode: text RHTML: diff --git a/vendor/grammars/sublime-rexx b/vendor/grammars/sublime-rexx new file mode 160000 index 0000000000..a649cf3aef --- /dev/null +++ b/vendor/grammars/sublime-rexx @@ -0,0 +1 @@ +Subproject commit a649cf3aefdade911e71f3cf086678c16b47fbbd diff --git a/vendor/licenses/grammar/sublime-rexx.txt b/vendor/licenses/grammar/sublime-rexx.txt new file mode 100644 index 0000000000..0c1fcfcecf --- /dev/null +++ b/vendor/licenses/grammar/sublime-rexx.txt @@ -0,0 +1,26 @@ +--- +type: grammar +name: sublime-rexx +license: mit +--- +The MIT License (MIT) + +Copyright (c) 2016 Mike Blocker + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 06e80f3889471bea4f642e5f2bc221072fcd928c Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 24 Aug 2016 09:30:20 -0700 Subject: [PATCH 0011/1214] Grammar update --- grammars.yml | 2 + vendor/grammars/Handlebars | 2 +- vendor/grammars/MagicPython | 2 +- vendor/grammars/NimLime | 2 +- vendor/grammars/PHP-Twig.tmbundle | 2 +- vendor/grammars/Sublime-SQF-Language | 2 +- vendor/grammars/Sublime-VimL | 2 +- vendor/grammars/SublimeGDB | 2 +- vendor/grammars/TLA | 2 +- vendor/grammars/applescript.tmbundle | 2 +- vendor/grammars/atom-language-purescript | 2 +- vendor/grammars/atom-language-stan | 2 +- vendor/grammars/c.tmbundle | 2 +- vendor/grammars/css.tmbundle | 2 +- vendor/grammars/d.tmbundle | 2 +- vendor/grammars/elixir-tmbundle | 2 +- ...ction Call from Selection : Word.tmCommand | 32 + .../Commands/Load in GHCi.tmCommand | 53 ++ .../Commands/Lookup on Hoogle.tmCommand | 25 + .../Commands/New Module.tmCommand | 34 + .../haskell.tmbundle/Commands/Run.plist | 55 ++ .../Commands/Show Type.tmCommand | 24 + .../Preferences/Comments.tmPreferences | 36 + .../Preferences/Indentation.tmPreferences | 23 + .../Preferences/Symbol List.tmPreferences | 17 + .../Preferences/Typing Pairs.plist | 38 + vendor/grammars/haskell.tmbundle/README.mdown | 20 + .../Snippets/Definition.tmSnippet | 16 + .../Snippets/Function.tmSnippet | 17 + .../haskell.tmbundle/Snippets/Guard.tmSnippet | 16 + .../Snippets/Haddock Postfix.tmSnippet | 16 + .../Snippets/Haddock Prefix.tmSnippet | 16 + .../Snippets/Hashbang.tmSnippet | 17 + .../Snippets/Lambda Expression.tmSnippet | 16 + .../Snippets/Left Arrow.tmSnippet | 18 + .../Snippets/List Comprehension.tmSnippet | 16 + .../haskell.tmbundle/Snippets/Main.tmSnippet | 20 + .../Snippets/Right Arrow.tmSnippet | 18 + .../Snippets/Type Constraint.tmSnippet | 16 + .../Snippets/Type Sequence.tmSnippet | 16 + .../Snippets/Type Signature.tmSnippet | 16 + .../Snippets/case _ of _.tmSnippet | 18 + .../Snippets/class _.tmSnippet | 17 + .../Snippets/data _.tmSnippet | 16 + .../Snippets/deriving _.tmSnippet | 16 + .../haskell.tmbundle/Snippets/do _.tmSnippet | 17 + .../Snippets/if _ then _ else _.tmSnippet | 18 + .../Snippets/import _ hiding _.tmSnippet | 16 + .../Snippets/import _.tmSnippet | 16 + .../Snippets/import qualified _.tmSnippet | 16 + .../Snippets/instance _.tmSnippet | 17 + .../haskell.tmbundle/Snippets/let _.tmSnippet | 18 + .../Snippets/newtype _.tmSnippet | 16 + .../Snippets/type _.tmSnippet | 16 + .../Snippets/where _.tmSnippet | 17 + .../haskell.tmbundle/Support/bin/haskelltype | 222 ++++++ .../haskell.tmbundle/Syntaxes/Haskell.plist | 711 ++++++++++++++++++ .../Syntaxes/Literate Haskell.plist | 92 +++ vendor/grammars/haskell.tmbundle/info.plist | 58 ++ vendor/grammars/java.tmbundle | 2 +- vendor/grammars/json.tmbundle | 2 +- vendor/grammars/language-babel | 2 +- vendor/grammars/language-blade | 2 +- vendor/grammars/language-clojure | 2 +- vendor/grammars/language-coffee-script | 2 +- vendor/grammars/language-crystal | 2 +- vendor/grammars/language-csharp | 2 +- vendor/grammars/language-csound | 2 +- vendor/grammars/language-gfm | 2 +- vendor/grammars/language-haskell | 2 +- vendor/grammars/language-javascript | 2 +- vendor/grammars/language-less | 2 +- vendor/grammars/language-python | 2 +- vendor/grammars/language-renpy | 2 +- vendor/grammars/language-restructuredtext | 2 +- vendor/grammars/language-roff | 2 +- vendor/grammars/language-shellscript | 2 +- vendor/grammars/language-toc-wow | 2 +- vendor/grammars/language-yaml | 2 +- vendor/grammars/latex.tmbundle | 2 +- vendor/grammars/objective-c.tmbundle | 2 +- vendor/grammars/pawn-sublime-language | 2 +- vendor/grammars/php.tmbundle | 2 +- vendor/grammars/ruby-slim.tmbundle | 2 +- vendor/grammars/sas.tmbundle | 2 +- vendor/grammars/smali-sublime | 2 +- vendor/grammars/sublime-autoit | 2 +- vendor/grammars/sublime-rust | 2 +- vendor/grammars/sublime-typescript | 2 +- .../sublime_man_page_support/.gitignore | 2 + .../grammars/sublime_man_page_support/LICENSE | 20 + .../Main.sublime-menu | 23 + .../ManPage.sublime-build | 4 + .../ManPage.sublime-commands | 10 + .../sublime_man_page_support/README.md | 10 + .../groff-enhancements.sublime-snippet | 201 +++++ .../man-groff.JSON-tmLanguage | 85 +++ .../man-groff.tmLanguage | 184 +++++ .../man-preview.JSON-tmLanguage | 32 + .../man-preview.tmLanguage | 88 +++ .../sublime_man_page_support/new_page.py | 59 ++ vendor/grammars/swift.tmbundle | 2 +- vendor/grammars/vue-syntax-highlight | 2 +- 103 files changed, 2675 insertions(+), 47 deletions(-) create mode 100644 vendor/grammars/haskell.tmbundle/Commands/Infix Function Call from Selection : Word.tmCommand create mode 100644 vendor/grammars/haskell.tmbundle/Commands/Load in GHCi.tmCommand create mode 100644 vendor/grammars/haskell.tmbundle/Commands/Lookup on Hoogle.tmCommand create mode 100644 vendor/grammars/haskell.tmbundle/Commands/New Module.tmCommand create mode 100644 vendor/grammars/haskell.tmbundle/Commands/Run.plist create mode 100644 vendor/grammars/haskell.tmbundle/Commands/Show Type.tmCommand create mode 100644 vendor/grammars/haskell.tmbundle/Preferences/Comments.tmPreferences create mode 100644 vendor/grammars/haskell.tmbundle/Preferences/Indentation.tmPreferences create mode 100644 vendor/grammars/haskell.tmbundle/Preferences/Symbol List.tmPreferences create mode 100644 vendor/grammars/haskell.tmbundle/Preferences/Typing Pairs.plist create mode 100644 vendor/grammars/haskell.tmbundle/README.mdown create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Definition.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Function.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Guard.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Haddock Postfix.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Haddock Prefix.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Hashbang.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Lambda Expression.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Left Arrow.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/List Comprehension.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Main.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Right Arrow.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Type Constraint.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Type Sequence.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Type Signature.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/case _ of _.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/class _.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/data _.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/deriving _.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/do _.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/if _ then _ else _.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/import _ hiding _.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/import _.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/import qualified _.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/instance _.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/let _.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/newtype _.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/type _.tmSnippet create mode 100644 vendor/grammars/haskell.tmbundle/Snippets/where _.tmSnippet create mode 100755 vendor/grammars/haskell.tmbundle/Support/bin/haskelltype create mode 100644 vendor/grammars/haskell.tmbundle/Syntaxes/Haskell.plist create mode 100644 vendor/grammars/haskell.tmbundle/Syntaxes/Literate Haskell.plist create mode 100644 vendor/grammars/haskell.tmbundle/info.plist create mode 100644 vendor/grammars/sublime_man_page_support/.gitignore create mode 100644 vendor/grammars/sublime_man_page_support/LICENSE create mode 100644 vendor/grammars/sublime_man_page_support/Main.sublime-menu create mode 100644 vendor/grammars/sublime_man_page_support/ManPage.sublime-build create mode 100644 vendor/grammars/sublime_man_page_support/ManPage.sublime-commands create mode 100644 vendor/grammars/sublime_man_page_support/README.md create mode 100644 vendor/grammars/sublime_man_page_support/groff-enhancements.sublime-snippet create mode 100644 vendor/grammars/sublime_man_page_support/man-groff.JSON-tmLanguage create mode 100644 vendor/grammars/sublime_man_page_support/man-groff.tmLanguage create mode 100644 vendor/grammars/sublime_man_page_support/man-preview.JSON-tmLanguage create mode 100644 vendor/grammars/sublime_man_page_support/man-preview.tmLanguage create mode 100644 vendor/grammars/sublime_man_page_support/new_page.py diff --git a/grammars.yml b/grammars.yml index 7289d71f70..d6230d327c 100755 --- a/grammars.yml +++ b/grammars.yml @@ -402,6 +402,8 @@ vendor/grammars/language-renpy: vendor/grammars/language-restructuredtext: - text.restructuredtext vendor/grammars/language-roff: +- source.ideal +- source.pic - text.roff - text.runoff vendor/grammars/language-shellscript: diff --git a/vendor/grammars/Handlebars b/vendor/grammars/Handlebars index 94ef9439d8..c07f986ae7 160000 --- a/vendor/grammars/Handlebars +++ b/vendor/grammars/Handlebars @@ -1 +1 @@ -Subproject commit 94ef9439d81d41a193487dda835d742b584659f4 +Subproject commit c07f986ae74c2a1eb96d856cf147ba94b8eefc90 diff --git a/vendor/grammars/MagicPython b/vendor/grammars/MagicPython index 820a9310f6..f4ff7de27f 160000 --- a/vendor/grammars/MagicPython +++ b/vendor/grammars/MagicPython @@ -1 +1 @@ -Subproject commit 820a9310f67b452257c45332fd16433b5f63296a +Subproject commit f4ff7de27f6ff9a4f1d8e0decd3cc7145dde2fa9 diff --git a/vendor/grammars/NimLime b/vendor/grammars/NimLime index 5089ecab59..2f5ec25fe6 160000 --- a/vendor/grammars/NimLime +++ b/vendor/grammars/NimLime @@ -1 +1 @@ -Subproject commit 5089ecab59ed3211aa482c0fb4c5881f7f7c4e9d +Subproject commit 2f5ec25fe648fb5260b0e5d845d3d88bd109b37d diff --git a/vendor/grammars/PHP-Twig.tmbundle b/vendor/grammars/PHP-Twig.tmbundle index f4f7529ac2..9e802d525e 160000 --- a/vendor/grammars/PHP-Twig.tmbundle +++ b/vendor/grammars/PHP-Twig.tmbundle @@ -1 +1 @@ -Subproject commit f4f7529ac2a07527caa7c9154b87c96d17e18aa1 +Subproject commit 9e802d525ed87a90ec7ff842f44c0c992fd56521 diff --git a/vendor/grammars/Sublime-SQF-Language b/vendor/grammars/Sublime-SQF-Language index 777931999d..984606e146 160000 --- a/vendor/grammars/Sublime-SQF-Language +++ b/vendor/grammars/Sublime-SQF-Language @@ -1 +1 @@ -Subproject commit 777931999d391173c509018fd38e4d124063f13d +Subproject commit 984606e146b4ef96753db7f3a16adeee2b152e24 diff --git a/vendor/grammars/Sublime-VimL b/vendor/grammars/Sublime-VimL index 4b23352ce5..b453aff6f7 160000 --- a/vendor/grammars/Sublime-VimL +++ b/vendor/grammars/Sublime-VimL @@ -1 +1 @@ -Subproject commit 4b23352ce5e48a191d55d61883a9478211df91fd +Subproject commit b453aff6f783769b6b895986da605a2db0db7379 diff --git a/vendor/grammars/SublimeGDB b/vendor/grammars/SublimeGDB index 0afb64f273..d9a512da6e 160000 --- a/vendor/grammars/SublimeGDB +++ b/vendor/grammars/SublimeGDB @@ -1 +1 @@ -Subproject commit 0afb64f2732bfb01af97f593d4f8c977a28dc510 +Subproject commit d9a512da6eb23b8193a8696a6fc1afd77f310d6e diff --git a/vendor/grammars/TLA b/vendor/grammars/TLA index 7e351a9cdf..5dc130cab3 160000 --- a/vendor/grammars/TLA +++ b/vendor/grammars/TLA @@ -1 +1 @@ -Subproject commit 7e351a9cdf6fbf3132e35246ce190bad237fb39c +Subproject commit 5dc130cab32ba6cf8c53e3378cd58740728f3c17 diff --git a/vendor/grammars/applescript.tmbundle b/vendor/grammars/applescript.tmbundle index bfb426974d..5067ef67a5 160000 --- a/vendor/grammars/applescript.tmbundle +++ b/vendor/grammars/applescript.tmbundle @@ -1 +1 @@ -Subproject commit bfb426974dd4ec9adcee4094f32a14a484b2e1f3 +Subproject commit 5067ef67a58f6f56a54460be1390d921bb400d45 diff --git a/vendor/grammars/atom-language-purescript b/vendor/grammars/atom-language-purescript index 83d188103f..fc8b0bf9da 160000 --- a/vendor/grammars/atom-language-purescript +++ b/vendor/grammars/atom-language-purescript @@ -1 +1 @@ -Subproject commit 83d188103fa2544fe037e3634c26ab6bbeb85b3e +Subproject commit fc8b0bf9da61886c6e3973c2d37e6aef88fabfb2 diff --git a/vendor/grammars/atom-language-stan b/vendor/grammars/atom-language-stan index 2fa2745da7..0a79d383b7 160000 --- a/vendor/grammars/atom-language-stan +++ b/vendor/grammars/atom-language-stan @@ -1 +1 @@ -Subproject commit 2fa2745da7ab9de0ba42a9743d1942becb5e4c32 +Subproject commit 0a79d383b7e94fefb242e967d708e054faf656cd diff --git a/vendor/grammars/c.tmbundle b/vendor/grammars/c.tmbundle index d26c35164a..fa4b7e2114 160000 --- a/vendor/grammars/c.tmbundle +++ b/vendor/grammars/c.tmbundle @@ -1 +1 @@ -Subproject commit d26c35164a4d496fd2c0b4ea0c1aeed64d704702 +Subproject commit fa4b7e211463973328b5334d55d0b10dafa27122 diff --git a/vendor/grammars/css.tmbundle b/vendor/grammars/css.tmbundle index 94f7111c29..d79e9c0137 160000 --- a/vendor/grammars/css.tmbundle +++ b/vendor/grammars/css.tmbundle @@ -1 +1 @@ -Subproject commit 94f7111c2953ac7b4cc42d313d9ad9b8701b8468 +Subproject commit d79e9c013769386a765198f7fb0f9dce39da829b diff --git a/vendor/grammars/d.tmbundle b/vendor/grammars/d.tmbundle index e4beff2ce5..8763c4c5f2 160000 --- a/vendor/grammars/d.tmbundle +++ b/vendor/grammars/d.tmbundle @@ -1 +1 @@ -Subproject commit e4beff2ce50afecab1438f0013977fadf89f8a39 +Subproject commit 8763c4c5f2169d48d725d946838428f50abe12a5 diff --git a/vendor/grammars/elixir-tmbundle b/vendor/grammars/elixir-tmbundle index 6ee8051a75..6d0417e8eb 160000 --- a/vendor/grammars/elixir-tmbundle +++ b/vendor/grammars/elixir-tmbundle @@ -1 +1 @@ -Subproject commit 6ee8051a75cd9bc7f20e08f2fde4475e95e9c67a +Subproject commit 6d0417e8eb7e182810755214d0a8cd6421146c01 diff --git a/vendor/grammars/haskell.tmbundle/Commands/Infix Function Call from Selection : Word.tmCommand b/vendor/grammars/haskell.tmbundle/Commands/Infix Function Call from Selection : Word.tmCommand new file mode 100644 index 0000000000..a5fc1784ec --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Commands/Infix Function Call from Selection : Word.tmCommand @@ -0,0 +1,32 @@ + + + + + beforeRunningCommand + nop + command + #!/bin/bash + +NAME="$(cat)" +if [[ -z "$NAME" ]]; then + NAME="\$1" +fi + +echo "\`$NAME\`\$0" + + fallbackInput + word + input + selection + keyEquivalent + ^' + name + Infix Function Call From Word / Selection + output + insertAsSnippet + scope + source.haskell + uuid + FA4AA254-EB7D-4B43-AC67-066AA9E8E8D9 + + diff --git a/vendor/grammars/haskell.tmbundle/Commands/Load in GHCi.tmCommand b/vendor/grammars/haskell.tmbundle/Commands/Load in GHCi.tmCommand new file mode 100644 index 0000000000..5a86536528 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Commands/Load in GHCi.tmCommand @@ -0,0 +1,53 @@ + + + + + beforeRunningCommand + nop + command + #!/bin/bash + +THASKELL=${TM_HASKELL:-ghci} + +esc () { +STR="$1" ruby18 <<"RUBY" + str = ENV['STR'] + str = str.gsub(/'/, "'\\\\''") + str = str.gsub(/[\\"]/, '\\\\\\0') + print "'#{str}'" +RUBY +} + +osascript <<- APPLESCRIPT +tell app "Terminal" + launch + activate + do script "clear; cd $(esc "${TM_DIRECTORY}"); ${THASKELL} $(esc "${TM_FILEPATH}")" + set position of first window to {100, 100} +end tell +APPLESCRIPT + + input + none + inputFormat + text + keyEquivalent + @R + name + Load in GHCi + outputCaret + afterOutput + outputFormat + text + outputLocation + toolTip + scope + source.haskell + semanticClass + process.external.run.haskell + uuid + 2242C46C-153E-4EEB-B80B-A5398559D759 + version + 2 + + diff --git a/vendor/grammars/haskell.tmbundle/Commands/Lookup on Hoogle.tmCommand b/vendor/grammars/haskell.tmbundle/Commands/Lookup on Hoogle.tmCommand new file mode 100644 index 0000000000..da04c3f97c --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Commands/Lookup on Hoogle.tmCommand @@ -0,0 +1,25 @@ + + + + + beforeRunningCommand + nop + command + #!/bin/bash +echo "<meta http-equiv=\"refresh\" content=\"0; http://haskell.org/hoogle/?q=$(cat)\">" + fallbackInput + word + input + selection + keyEquivalent + ^H + name + Lookup on Hoogle + output + showAsHTML + scope + source.haskell + uuid + 50D814AE-D850-4C97-AF3E-1FDE4366C6A3 + + diff --git a/vendor/grammars/haskell.tmbundle/Commands/New Module.tmCommand b/vendor/grammars/haskell.tmbundle/Commands/New Module.tmCommand new file mode 100644 index 0000000000..cc483847a3 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Commands/New Module.tmCommand @@ -0,0 +1,34 @@ + + + + + beforeRunningCommand + nop + command + #!/bin/bash + +NAME=${TM_FILENAME%.hs} +if [[ -z "$NAME" ]]; then + NAME="Main" +fi + +cat <<SNIPPET +module \${1:$NAME} \${2/.+/( + /m}\${2:function}\${2/.+/ +) /m}where +\$0 +SNIPPET + input + none + name + module … + output + insertAsSnippet + scope + source.haskell + tabTrigger + mod + uuid + 156D0588-A61A-4419-9C71-6E47320A4DA5 + + diff --git a/vendor/grammars/haskell.tmbundle/Commands/Run.plist b/vendor/grammars/haskell.tmbundle/Commands/Run.plist new file mode 100644 index 0000000000..7a3fc059f8 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Commands/Run.plist @@ -0,0 +1,55 @@ + + + + + beforeRunningCommand + saveModifiedFiles + command + #!/usr/bin/env ruby18 -wKU +require "#{ENV["TM_SUPPORT_PATH"]}/lib/tm/save_current_document" +require "#{ENV["TM_SUPPORT_PATH"]}/lib/tm/executor" +require "#{ENV["TM_SUPPORT_PATH"]}/lib/escape" + +TextMate.save_if_untitled('hs') + +haskell = e_sh(ENV['TM_HASKELL'] || 'runhaskell') +TextMate::Executor.run(haskell, ENV['TM_FILEPATH']) + + input + document + inputFormat + text + keyEquivalent + @r + name + Run + outputCaret + afterOutput + outputFormat + html + outputLocation + newWindow + requiredCommands + + + command + runhaskell + locations + + /opt/local/bin/runhugs + /usr/local/bin/runhaskell + + variable + TM_HASKELL + + + scope + source.haskell + semanticClass + process.run.script.haskell + uuid + 3B083BE7-9812-4F06-A758-CCAD9514E797 + version + 2 + + diff --git a/vendor/grammars/haskell.tmbundle/Commands/Show Type.tmCommand b/vendor/grammars/haskell.tmbundle/Commands/Show Type.tmCommand new file mode 100644 index 0000000000..7ad9f337e8 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Commands/Show Type.tmCommand @@ -0,0 +1,24 @@ + + + + + beforeRunningCommand + nop + command + haskelltype "$(cat)" + fallbackInput + word + input + selection + keyEquivalent + ^h + name + Show Type + output + showAsTooltip + scope + source.haskell + uuid + 6B723007-D4EE-476B-8282-76230C559D5A + + diff --git a/vendor/grammars/haskell.tmbundle/Preferences/Comments.tmPreferences b/vendor/grammars/haskell.tmbundle/Preferences/Comments.tmPreferences new file mode 100644 index 0000000000..718c6e2d52 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Preferences/Comments.tmPreferences @@ -0,0 +1,36 @@ + + + + + name + Comments + scope + source.haskell + settings + + shellVariables + + + name + TM_COMMENT_START_2 + value + {- + + + name + TM_COMMENT_END_2 + value + -} + + + name + TM_COMMENT_START + value + -- + + + + uuid + E3994307-4D9E-44D6-832E-52C244F1CDF3 + + diff --git a/vendor/grammars/haskell.tmbundle/Preferences/Indentation.tmPreferences b/vendor/grammars/haskell.tmbundle/Preferences/Indentation.tmPreferences new file mode 100644 index 0000000000..afff2e9e59 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Preferences/Indentation.tmPreferences @@ -0,0 +1,23 @@ + + + + + name + Indentation + scope + source.haskell + settings + + decreaseIndentPattern + ^\s*$ + disableIndentCorrections + + increaseIndentPattern + ((^.*(=|\bdo|\bwhere|\bthen|\belse|\bof)\s*$)|(^.*\bif(?!.*\bthen\b.*\belse\b.*).*$)) + indentOnPaste + simple + + uuid + 39417FB9-B85C-4213-BB1D-C19BCDD4E487 + + diff --git a/vendor/grammars/haskell.tmbundle/Preferences/Symbol List.tmPreferences b/vendor/grammars/haskell.tmbundle/Preferences/Symbol List.tmPreferences new file mode 100644 index 0000000000..3349a87520 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Preferences/Symbol List.tmPreferences @@ -0,0 +1,17 @@ + + + + + name + Symbol List + scope + source.haskell entity.name.function.infix + settings + + showInSymbolList + 0 + + uuid + 0C39B945-E2C0-4E43-8A5B-332F6FA73C67 + + diff --git a/vendor/grammars/haskell.tmbundle/Preferences/Typing Pairs.plist b/vendor/grammars/haskell.tmbundle/Preferences/Typing Pairs.plist new file mode 100644 index 0000000000..d9fff7d369 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Preferences/Typing Pairs.plist @@ -0,0 +1,38 @@ + + + + + name + Typing Pairs + scope + source.haskell - comment + settings + + smartTypingPairs + + + " + " + + + { + } + + + [ + ] + + + ( + ) + + + ` + ` + + + + uuid + FBF9D932-D5CE-4EC4-9162-122E511C8627 + + diff --git a/vendor/grammars/haskell.tmbundle/README.mdown b/vendor/grammars/haskell.tmbundle/README.mdown new file mode 100644 index 0000000000..32d8f85a4c --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/README.mdown @@ -0,0 +1,20 @@ +# Installation + +You can install this bundle in TextMate by opening the preferences and going to the bundles tab. After installation it will be automatically updated for you. + +# General + +* [Bundle Styleguide](http://kb.textmate.org/bundle_styleguide) — _before you make changes_ +* [Commit Styleguide](http://kb.textmate.org/commit_styleguide) — _before you send a pull request_ +* [Writing Bug Reports](http://kb.textmate.org/writing_bug_reports) — _before you report an issue_ + +# License + +If not otherwise specified (see below), files in this repository fall under the following license: + + Permission to copy, use, modify, sell and distribute this + software is granted. This software is provided "as is" without + express or implied warranty, and with no claim as to its + suitability for any purpose. + +An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”. \ No newline at end of file diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Definition.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Definition.tmSnippet new file mode 100644 index 0000000000..78f19026e3 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/Definition.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + ${1:name} ${2:pattern}${2/.+/ /}= ${0:definition} + name + Definition + scope + source.haskell + tabTrigger + = + uuid + 81886A7D-5EE8-438C-9FC8-6BA3B65E444A + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Function.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Function.tmSnippet new file mode 100644 index 0000000000..1094af9da3 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/Function.tmSnippet @@ -0,0 +1,17 @@ + + + + + content + ${1:name} :: ${2:Type} +${1} ${3:pattern}${3/.+/ /}${4/.+/= /}${4:definition} + name + Function + scope + source.haskell + tabTrigger + fun + uuid + A83076A6-EC6F-418F-B8F9-9AE952964242 + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Guard.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Guard.tmSnippet new file mode 100644 index 0000000000..ccf1226999 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/Guard.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + | ${1:predicate} = ${0:definition} + name + Guard + scope + source.haskell - comment + tabTrigger + | + uuid + BA1329DB-9437-4246-839A-48A49B48D31D + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Haddock Postfix.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Haddock Postfix.tmSnippet new file mode 100644 index 0000000000..56e7e636f7 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/Haddock Postfix.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + | ${0:documentation} + name + Haddock Postfix + scope + source.haskell comment.block + tabTrigger + | + uuid + 961E79B9-CC31-4843-BBE9-51F46598BC25 + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Haddock Prefix.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Haddock Prefix.tmSnippet new file mode 100644 index 0000000000..0e1a35e894 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/Haddock Prefix.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + ^ ${0:documentation} + name + Haddock Prefix + scope + source.haskell comment.block + tabTrigger + ^ + uuid + E0E613C1-0760-46BC-A51E-168E658904C5 + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Hashbang.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Hashbang.tmSnippet new file mode 100644 index 0000000000..78ef4b3fe3 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/Hashbang.tmSnippet @@ -0,0 +1,17 @@ + + + + + content + #!/usr/bin/env ${1:runhaskell} + + name + #!/usr/bin/env… + scope + source.haskell + tabTrigger + #! + uuid + 54495635-CC26-4C14-A202-5C0CA4B078C2 + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Lambda Expression.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Lambda Expression.tmSnippet new file mode 100644 index 0000000000..7cc131eb6d --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/Lambda Expression.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + \\${1:pattern} -> ${0:expression} + name + Lambda Expression + scope + source.haskell + tabTrigger + \ + uuid + 0672CE3D-A796-44B1-AEF2-975C0FB27184 + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Left Arrow.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Left Arrow.tmSnippet new file mode 100644 index 0000000000..ab95d2e510 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/Left Arrow.tmSnippet @@ -0,0 +1,18 @@ + + + + + content + ${1:name} <- ${0:expression} + keyEquivalent + ^, + name + Left Arrow + scope + source.haskell + tabTrigger + < + uuid + 9EF1F854-442C-40B2-BED5-454A015AA26D + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/List Comprehension.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/List Comprehension.tmSnippet new file mode 100644 index 0000000000..0ae12d1db5 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/List Comprehension.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + [ ${1:expression} | ${2:name} <- ${3:expression}${4/.+/, /}${4:condition} + name + List Comprehension + scope + source.haskell constant.language.nil + tabTrigger + [ + uuid + C721BD84-71FA-423F-8460-2CED4954137F + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Main.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Main.tmSnippet new file mode 100644 index 0000000000..6a63606438 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/Main.tmSnippet @@ -0,0 +1,20 @@ + + + + + content + module Main where + +main :: IO () +main = ${0:putStrLn "Hello World"} + + name + Main + scope + source.haskell + tabTrigger + main + uuid + A3A65891-D126-4D2D-9E6B-E20ADE2EAA88 + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Right Arrow.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Right Arrow.tmSnippet new file mode 100644 index 0000000000..984cc37b21 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/Right Arrow.tmSnippet @@ -0,0 +1,18 @@ + + + + + content + ${1:expression} -> ${0:expression} + keyEquivalent + ^. + name + Right Arrow + scope + source.haskell + tabTrigger + > + uuid + BAF52ED4-6A5B-4260-B5BC-93D2012200C8 + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Type Constraint.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Type Constraint.tmSnippet new file mode 100644 index 0000000000..ec100d9158 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/Type Constraint.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + (${1:Class}) => $0 + name + Type Constraint + scope + source.haskell meta.function.type + tabTrigger + = + uuid + 1D72833B-ED9F-4A5E-9B72-F77E4FD09CE9 + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Type Sequence.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Type Sequence.tmSnippet new file mode 100644 index 0000000000..9f18048c66 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/Type Sequence.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + ${1:Type} -> ${0:Type} + name + Type Sequence + scope + source.haskell meta.function.type + tabTrigger + - + uuid + 17FC3207-9DC4-47F8-A9B3-B38FE5F84158 + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Type Signature.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Type Signature.tmSnippet new file mode 100644 index 0000000000..d2131304b4 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/Type Signature.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + ${1:name} :: ${0:Type} + name + Type Signature + scope + source.haskell + tabTrigger + :: + uuid + 78719987-0091-407A-B5F1-68456A67130D + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/case _ of _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/case _ of _.tmSnippet new file mode 100644 index 0000000000..242117a287 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/case _ of _.tmSnippet @@ -0,0 +1,18 @@ + + + + + content + case ${1:expression} of + ${2:pattern} -> ${3:expression} + ${4:otherwise} -> ${5:expression} + name + case … of … + scope + source.haskell + tabTrigger + case + uuid + DD1D7C05-BC60-4E62-BC8C-9230A32C2533 + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/class _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/class _.tmSnippet new file mode 100644 index 0000000000..600b2abefa --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/class _.tmSnippet @@ -0,0 +1,17 @@ + + + + + content + class ${1:Class} where + ${0:definition} + name + class … + scope + source.haskell + tabTrigger + cla + uuid + 23F6173A-6390-46FF-865C-F59AB70E360A + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/data _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/data _.tmSnippet new file mode 100644 index 0000000000..d9b472d152 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/data _.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + data ${1:Type} = ${0:Other} + name + data … + scope + source.haskell + tabTrigger + dat + uuid + 4C5EC5BB-6AE1-4825-AB50-1CF4741285E9 + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/deriving _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/deriving _.tmSnippet new file mode 100644 index 0000000000..661ed416c1 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/deriving _.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + deriving (${0:Class}) + name + deriving … + scope + source.haskell meta.type + tabTrigger + der + uuid + 3FA57615-871F-4465-B35D-781B2EA9F5FC + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/do _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/do _.tmSnippet new file mode 100644 index 0000000000..9a9b84b620 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/do _.tmSnippet @@ -0,0 +1,17 @@ + + + + + content + do + ${1:return ${0:expression}} + name + do … + scope + source.haskell + tabTrigger + do + uuid + 397D02C1-A10B-4A83-8C05-6EB71E50D4CF + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/if _ then _ else _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/if _ then _ else _.tmSnippet new file mode 100644 index 0000000000..81bd3785bd --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/if _ then _ else _.tmSnippet @@ -0,0 +1,18 @@ + + + + + content + if ${1:condition} + then ${2:expression} + else ${3:expression} + name + if … then … else … + scope + source.haskell + tabTrigger + if + uuid + 5F2050D1-1347-40CE-854E-24B2BF389849 + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/import _ hiding _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/import _ hiding _.tmSnippet new file mode 100644 index 0000000000..88f6f5c388 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/import _ hiding _.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + import ${1:Module}${2/.+/ hiding (/}${2:function}${2/.+/)/}$0 + name + import … hiding … + scope + source.haskell + tabTrigger + imph + uuid + 1BA6898C-E8C4-44C9-98F4-4823608FEFD1 + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/import _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/import _.tmSnippet new file mode 100644 index 0000000000..d90706884b --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/import _.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + import ${1:Module}${2/.+/ (/}${2:function}${2/.+/)/}$0 + name + import … + scope + source.haskell + tabTrigger + imp + uuid + 85150C9B-A5F1-450A-BEBF-119091146957 + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/import qualified _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/import qualified _.tmSnippet new file mode 100644 index 0000000000..6225658fce --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/import qualified _.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + import qualified ${1:Module}${2/.+/ as /}${2:Mod}${3/.+/ (/}${3:function}${3/.+/)/}$0 + name + import qualified … + scope + source.haskell + tabTrigger + impq + uuid + 32BC2D63-AF02-4DBA-8A75-6A74E334FE0C + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/instance _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/instance _.tmSnippet new file mode 100644 index 0000000000..3f725c17c2 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/instance _.tmSnippet @@ -0,0 +1,17 @@ + + + + + content + instance ${1:Class} ${2:Type} where + ${0:definition} + name + instance … + scope + source.haskell + tabTrigger + ins + uuid + 26F8FAFE-4438-4D3C-A453-AAB72FD0F719 + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/let _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/let _.tmSnippet new file mode 100644 index 0000000000..4eb4f3330b --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/let _.tmSnippet @@ -0,0 +1,18 @@ + + + + + content + let + ${1:name} = ${2:expression} + in ${0:expression} + name + let … + scope + source.haskell + tabTrigger + let + uuid + 88C8A6FB-B06D-4386-BA33-51E28F64AD88 + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/newtype _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/newtype _.tmSnippet new file mode 100644 index 0000000000..f729337679 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/newtype _.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + newtype ${1:Type} = ${0:Other} + name + newtype … + scope + source.haskell + tabTrigger + new + uuid + EFCBAB59-D574-454D-A05A-8928CF81947F + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/type _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/type _.tmSnippet new file mode 100644 index 0000000000..1b33fc1538 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/type _.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + type ${1:Type} = ${0:Other} + name + type … + scope + source.haskell + tabTrigger + typ + uuid + 3C25C0C7-D764-4BF8-9BFF-AE6954AF106D + + diff --git a/vendor/grammars/haskell.tmbundle/Snippets/where _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/where _.tmSnippet new file mode 100644 index 0000000000..c65c5eb59a --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Snippets/where _.tmSnippet @@ -0,0 +1,17 @@ + + + + + content + where + ${0:definitions} + name + where … + scope + source.haskell + tabTrigger + where + uuid + A6FD9AB4-8E7E-47A8-B17D-D82F47A0C495 + + diff --git a/vendor/grammars/haskell.tmbundle/Support/bin/haskelltype b/vendor/grammars/haskell.tmbundle/Support/bin/haskelltype new file mode 100755 index 0000000000..4f1ca275cf --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Support/bin/haskelltype @@ -0,0 +1,222 @@ +#!/usr/bin/env ruby18 -w + +word = ARGV.first + +prelude = ' +(!!) :: [a] -> Int -> a ||||| [0,1,2] !! 1 = 1 +($) :: (a -> b) -> a -> b ||||| f x $ g y = f x (g y) +($!) :: (a -> b) -> (a -> b) ||||| +(&&) :: Bool -> Bool -> Bool ||||| Boolean \'and\' +(||) :: Bool -> Bool -> Bool ||||| Boolean \'or\' +(*) :: Num a => a -> a -> a ||||| Multiplication +(**) :: Floating a => a -> a -> a ||||| Exponentiation +(+) :: Num a => a -> a -> a ||||| Addition +(++) :: [a] -> [a] -> [a] ||||| Concatonation: "abc" ++ "def" = "abcdef" +(-) :: Num a => a -> a -> a ||||| Subtraction +(.) :: (b -> c) -> (a -> b) -> a -> c ||||| Function composition +(/) :: Fractional a => a -> a -> a ||||| Division +(/=) :: Eq a => a -> a -> Bool ||||| not equal +(<) :: Ord a => a -> a -> Bool ||||| Less Than +(<=) :: Ord a => a -> a -> Bool ||||| Less Than or Equal To +(==) :: Eq a => a -> a -> Bool ||||| Equality +(=<<) :: Monad a => (a -> m b) -> m a -> m b ||||| Monadic binding +(>) :: Ord a => a -> a -> Bool ||||| Greater Than +(>=) :: Ord a => a -> a -> Bool ||||| Greater Than or Equal To +(>>) :: Monad m => m a -> m b -> m b ||||| Monadic binding +(>>=) :: Monad m => m a -> (a -> m b) -> m b ||||| Monadic binding +(^) :: (Num a, Integral b) => a -> b -> a ||||| Exponentiation +(^^) :: (Fractional a, Integral b) => a -> b -> a ||||| negative exponent allowed +abs :: Num a => a -> a ||||| Absolute Value +acos :: Floating a => a -> a ||||| Arccosine +acosh :: Floating a => a -> a ||||| Hyperbolic Arccosine +all :: (a -> Bool) -> [a] -> Bool ||||| all (/= \'a\') "cba" = False +and :: [Bool] -> Bool ||||| and [True, True, True] = True +any :: (a -> Bool) -> [a] -> Bool ||||| any (== \'c\') "abc" = True +appendFile :: FilePath -> String -> IO () ||||| Appends String to FilePath +applyM :: Monad m => (a -> m b) -> m a -> m b ||||| +asTypeOf :: a -> a -> a ||||| Sort of a type cast +asin :: Floating a => a -> a ||||| Arcsine +asinh :: Floating a => a -> a ||||| Hyperbolic Arcsine +atan :: Floating a => a -> a ||||| Arctangent +atan2 :: RealFrac a => a -> a ||||| ArcTangent +atanh :: Floating a => a -> a ||||| Hyperbolic Arctangent +break :: (a -> Bool) -> [a] -> ([a], [a]) ||||| break (<2) [1,2,3] = ([1],[2,3]) +catch :: IO a -> (IOError -> IO a) -> IO a ||||| +ceiling :: (RealFrac a, Integral b) => a -> b ||||| +compare :: Ord a => a -> a -> Ordering ||||| +concat :: MonadPlus m => [m a] -> m a ||||| concat ["a","bc","d"] = "abcd" +concatMap :: (a -> [b]) -> [a] -> [b] ||||| +const :: a -> b -> a ||||| +cos :: Floating a => a -> a ||||| +cosh :: Floating a => a -> a ||||| +curry :: ((a, b) -> c) -> a -> b -> c ||||| +cycle :: [a] -> [a] ||||| cycle "abc" = "abcabcabc... +decodeFloat :: RealFloat a => a -> (Integer, Int) ||||| +div :: Integral a => a -> a -> a ||||| +divMod :: Integral a => a -> a -> (a, a) ||||| +drop :: Int -> [a] -> [a] ||||| drop 2 "abcd" = "cd" +dropWhile :: (a -> Bool) -> [a] -> [a] ||||| dropWhile (>3) [5,3,5] = [3,5] +elem :: Eq a => a -> [a] -> Bool ||||| \'a\' \'elem\' "abc" = True +encodeFloat :: RealFloat a => Integer -> Int -> a ||||| +enumFrom :: Enum a => a -> [a] ||||| [n..] +enumFromThen :: Enum a => a -> a -> [a] ||||| [m,n..] +enumFromThenTo :: Enum a => a -> a -> a -> [a] ||||| [m,n..o] +enumFromTo :: Enum a => a -> a -> [a] ||||| [m..n] +error :: String -> a ||||| +even :: Integral a => a -> Bool ||||| +exp :: Floating a => a -> a ||||| +exponent :: RealFloat a => a -> Int ||||| +fail :: Monad m => String -> m a ||||| +filter :: (a -> Bool) -> [a] -> [a] ||||| +flip :: (a -> b -> c) -> (b -> a -> c) ||||| +floatDigits :: RealFloat a => a -> Int ||||| +floatRadix :: RealFloat a => a -> Integer ||||| +floatRange :: RealFloat a => a -> (Int, Int) ||||| +floor :: (RealFrac a, Integral b) => a -> b ||||| +fmap :: Functor f => (a -> b) -> f a -> f b ||||| +foldl :: (a -> b -> a) -> a -> [b] -> a ||||| foldl (+) 0 [a,b,c] = ((0+a)+b)+c +foldl1 :: (a -> a -> a) -> [a] -> a ||||| foldl1 (+) [a,b,c] = (a+b)+c +foldr :: (a -> b -> b) -> b -> [a] -> b ||||| foldr (+) 0 [a,b,c] = a+(b+(c+0)) +foldr1 :: (a -> a -> a) -> [a] -> a ||||| foldr1 (+) [a,b,c] = a+(b+c) +fromEnum :: Enum a => a -> Int ||||| +fromInteger :: Num a => Integer -> a ||||| +fromIntegral :: (Integral a, Num b) => a -> b ||||| +fromRational :: Fractional a => Rational -> a ||||| +fst :: (a, b) -> a ||||| +gcd :: (Integral a) => a -> a -> a ||||| +getChar :: IO Char ||||| eof generates an IOError +getContents :: IO String ||||| +getLine :: IO String ||||| eof generates an IOError +head :: [a] -> a ||||| +id :: a -> a ||||| +init :: [a] -> [a] ||||| init "abcd" = "abc" +interact :: (String -> String) -> IO () ||||| +ioError :: IOError -> IO a ||||| +isDenormalized :: RealFloat a => a -> Bool ||||| +isIEEE :: RealFloat a => a -> Bool ||||| +isInfinite :: RealFloat a => a -> Bool ||||| +isNaN :: RealFloat a => a -> Bool ||||| +isNegativeZero :: RealFloat a => a -> Bool ||||| +iterate :: (a -> a) -> a -> [a] ||||| iterate (++ " ") "" = ["", " ", " ",...] +last :: [a] -> a ||||| last "abcde" = "e" +lcm :: Integral a => a -> a -> a ||||| +length :: [a] -> Int ||||| length "Abc" = 3 +lex :: ReadS String ||||| lex "abc def" = [("abc"," def")] +lines :: String -> [String] ||||| +log :: Floating a => a -> a ||||| +logBase :: Floating a => a -> a -> a ||||| +lookup :: Eq a => a -> [(a, b)] -> Maybe b ||||| +map :: (a -> b) -> [a] -> [b] ||||| +mapM :: Monad m => (a -> m b) -> [a] -> m [b] ||||| +mapM_ :: Monad m => (a -> m b) -> [a] -> m () ||||| +max :: Ord a => a -> a -> a ||||| +maxBound :: Bounded a => a ||||| +maximum :: Ord a => [a] -> a ||||| +maybe :: b -> (a -> b) -> Maybe a -> b ||||| maybe 0 (+1) (Just 1) = 2 +min :: Ord a => a -> a -> a ||||| +minBound :: Bounded a => a ||||| +minimum :: Ord a => [a] -> a ||||| +mod :: Integral a => a -> a -> a ||||| +negate :: Num a => a -> a ||||| +not :: Bool -> Bool ||||| +notElem :: Eq a => a -> [a] -> Bool ||||| +null :: [a] -> Bool ||||| +odd :: Integral a => a -> Bool ||||| +or :: [Bool] -> Bool ||||| +otherwise :: Bool ||||| +pi :: Floating a => a ||||| +pred :: Enum a => a -> a ||||| pred True = False +print :: Show a => IO () ||||| adds a newline +product :: Num a => [a] -> a ||||| +properFraction :: (RealFrac a, Integral b) => a -> (b, a) ||||| +putChar :: Char -> IO () ||||| +putStr :: String -> IO () ||||| +putStrLn :: String -> IO () ||||| adds a newline +quot :: Integral a => a -> a -> a ||||| +quotRem :: Integral a => a -> a -> (a, a) ||||| +read :: Read a => String -> a ||||| +readFile :: FilePath -> IO String ||||| +readIO :: Read a => String -> IO a ||||| fails with IOError +readList :: Read a => ReadS [a] ||||| +readLn :: Read a => IO a ||||| +readParen :: Bool -> ReadS a -> ReadS a ||||| +reads :: Read a => ReadS a ||||| reads "1 2" :: [(Int,String)] = [(1," 2")] +readsPrec :: Read a => Int -> ReadS a ||||| +realToFrac :: (Real a, Fractional b) => a -> b ||||| +recip :: Fractional a => a -> a ||||| +rem :: Integral a => a -> a -> a ||||| +repeat :: a -> [a] ||||| repeat \'a\' = "aaaaaaaaa..." +replicate :: Int -> a -> [a] ||||| replicate 4 \'a\' = "aaaa" +return :: Monad m => a -> m a ||||| +reverse :: [a] -> [a] ||||| reverse "abc" = "cba" +round :: (RealFrac a, Integral b) => a -> b ||||| +scaleFloat :: RealFloat a => Int -> a -> a ||||| +scanl :: (a -> b -> a) -> a -> [b] -> [a] ||||| scanl (+) 0 [1,2,3] = [0,1,3,6] +scanl1 :: (a -> a -> a) -> [a] -> [a] ||||| scanl1 (+) [1,2,3] = [1,3,6] +scanr :: (a -> b -> b) -> b -> [a] -> [b] ||||| scanr (+) 0 [1,2,3] = [6,5,3,0] +scanr1 :: (a -> a -> a) -> [a] -> [a] ||||| scanr1 (+) [1,2,3] = [6,5,3] +seq :: a -> b -> b ||||| +sequence :: Monad m => [m a] -> m [a] ||||| +sequence_ :: Monad m => [m a] -> m () ||||| do operations in sequence +show :: Show a => a -> String ||||| +showChar :: Char -> ShowS ||||| +showList :: Show a => [a] -> ShowS ||||| +showParen :: Bool -> ShowS -> ShowS ||||| +showString :: String -> ShowS ||||| +shows :: Show a => a -> ShowS ||||| +showsPrec :: Show a => Int -> a -> ShowS ||||| +significand :: RealFloat a => a -> a ||||| +signum :: Num a => a -> a ||||| +sin :: Floating a => a -> a ||||| +sinh :: Floating a => a -> a ||||| +snd :: (a, b) -> b ||||| +span :: (a -> Bool) -> [a] -> ([a], [a]) ||||| span isAlpha "ab cd" = ("ab"," cd") +splitAt :: Int -> [a] -> ([a], [a]) ||||| splitAt 2 "abcdef" = ("ab","cdef") +sqrt :: Floating a => a -> a ||||| +subtract :: Num a => a -> a -> a ||||| +succ :: Enum a => a -> a ||||| succ False = True +sum :: Num a => [a] -> a ||||| sum [1,2,3] = 6 +tail :: [a] -> [a] ||||| tail "abc" = "bc" +take :: Int -> [a] -> [a] ||||| take 3 "abcde" = "abc" +takeWhile :: (a -> Bool) -> [a] -> [a] ||||| takeWhile (> 2) [3,2,1] = [3] +tan :: Floating a => a -> a ||||| +tanh :: Floating a => a -> a ||||| +toEnum :: Enum a => Int -> a ||||| toEnum 0 :: Bool = False +toInteger :: Integral a => a -> Integer ||||| +toRational :: Real a => a -> Rational ||||| +truncate :: (RealFrac a, Integral b) => a -> b ||||| +uncurry :: (a -> b -> c) -> ((a, b) -> c) ||||| +undefined :: a ||||| +unlines :: [String] -> String ||||| +until :: (a -> Bool) -> (a -> a) -> a -> a ||||| until (> 3) (+ 2) 0 = 4 +unwords :: [String] -> String ||||| +unzip :: [(a, b)] -> ([a], [b]) ||||| unzip [(\'a\',\'b\'),(\'c\',\'d\')] = ("ac",bd") +unzip3 :: [(a, b, c)] -> ([a], [b], [c]) ||||| +userError :: String -> IOError ||||| +words :: String -> [String] ||||| words "ab d as+3" = ["ab","d","as+3"] +writeFile :: FilePath -> String -> IO () ||||| +zip :: [a] -> [b] -> [(a, b)] ||||| zip "abc" "de" = [(\'a\',\'d\'), (\'b\',e\')] +zip3 :: [a] -> [b] -> [c] -> [(a, b, c)] ||||| +zipWith :: (a -> b -> c) -> [a] -> [b] -> [c] ||||| zipWith (+) [1,2] [3,4] = [4,6] +zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d] |||||' + +lookup = prelude.strip.split("\n").inject(Hash.new) { |h,l| + name, desc = l.split("::") + h[name.strip] = desc.split("|||||").map {|a| a.strip} + h +} + +if lookup[word] + puts lookup[word] +else + STDIN.each do |line| + name, desc = line.strip.split("::") + if name and desc + if name.split(",").map{|s| s.strip}.include?(word) + puts desc.strip + exit + end + end + end + puts "☿ It is a mystery ☿" +end diff --git a/vendor/grammars/haskell.tmbundle/Syntaxes/Haskell.plist b/vendor/grammars/haskell.tmbundle/Syntaxes/Haskell.plist new file mode 100644 index 0000000000..6c8ae15127 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Syntaxes/Haskell.plist @@ -0,0 +1,711 @@ + + + + + fileTypes + + hs + + keyEquivalent + ^~H + name + Haskell + patterns + + + captures + + 1 + + name + punctuation.definition.entity.haskell + + 2 + + name + punctuation.definition.entity.haskell + + + comment + In case this regex seems unusual for an infix operator, note that Haskell allows any ordinary function application (elem 4 [1..10]) to be rewritten as an infix expression (4 `elem` [1..10]). + match + (`)[\p{Ll}_][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*(`) + name + keyword.operator.function.infix.haskell + + + match + \(\) + name + constant.language.unit.haskell + + + match + \[\] + name + constant.language.empty-list.haskell + + + begin + \b(module)\b + beginCaptures + + 1 + + name + keyword.other.haskell + + + end + \b(where)\b + endCaptures + + 1 + + name + keyword.other.haskell + + + name + meta.declaration.module.haskell + patterns + + + include + #module_name + + + include + #module_exports + + + match + [a-z]+ + name + invalid + + + + + begin + \b(class)\b + beginCaptures + + 1 + + name + keyword.other.haskell + + + end + \b(where)\b + endCaptures + + 1 + + name + keyword.other.haskell + + + name + meta.declaration.class.haskell + patterns + + + match + \b(Monad|Functor|Eq|Ord|Read|Show|Num|(Frac|Ra)tional|Enum|Bounded|Real(Frac|Float)?|Integral|Floating)\b + name + support.class.prelude.haskell + + + match + [\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']* + name + entity.other.inherited-class.haskell + + + match + \b[\p{Ll}_][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']* + name + variable.other.generic-type.haskell + + + + + begin + \b(instance)\b + beginCaptures + + 1 + + name + keyword.other.haskell + + + end + \b(where)\b|$ + endCaptures + + 1 + + name + keyword.other.haskell + + + name + meta.declaration.instance.haskell + patterns + + + include + #type_signature + + + + + begin + \b(import)\b + beginCaptures + + 1 + + name + keyword.other.haskell + + + end + ($|;|(?=--)) + name + meta.import.haskell + patterns + + + match + (qualified|as|hiding) + name + keyword.other.haskell + + + include + #module_name + + + include + #module_exports + + + + + begin + (deriving)\s*\( + beginCaptures + + 1 + + name + keyword.other.haskell + + + end + \) + name + meta.deriving.haskell + patterns + + + match + \b[\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']* + name + entity.other.inherited-class.haskell + + + + + match + \b(deriving|where|data|type|case|of|let|in|newtype|default)\b + name + keyword.other.haskell + + + match + \binfix[lr]?\b + name + keyword.operator.haskell + + + match + \b(do|if|then|else)\b + name + keyword.control.haskell + + + comment + Floats are always decimal + match + \b([0-9]+\.[0-9]+([eE][+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+)\b + name + constant.numeric.float.haskell + + + match + \b([0-9]+|0([xX][0-9a-fA-F]+|[oO][0-7]+))\b + name + constant.numeric.haskell + + + captures + + 1 + + name + punctuation.definition.preprocessor.c + + + comment + In addition to Haskell's "native" syntax, GHC permits the C preprocessor to be run on a source file. + match + ^\s*(#)\s*\w+ + name + meta.preprocessor.c + + + include + #pragma + + + begin + " + beginCaptures + + 0 + + name + punctuation.definition.string.begin.haskell + + + end + " + endCaptures + + 0 + + name + punctuation.definition.string.end.haskell + + + name + string.quoted.double.haskell + patterns + + + match + \\(NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\"'\&]) + name + constant.character.escape.haskell + + + match + \\o[0-7]+|\\x[0-9A-Fa-f]+|\\[0-9]+ + name + constant.character.escape.octal.haskell + + + match + \^[A-Z@\[\]\\\^_] + name + constant.character.escape.control.haskell + + + begin + \\\s + beginCaptures + + 0 + + name + constant.character.escape.begin.haskell + + + end + \\ + endCaptures + + 0 + + name + constant.character.escape.end.haskell + + + patterns + + + match + \S+ + name + invalid.illegal.character-not-allowed-here.haskell + + + + + + + captures + + 1 + + name + punctuation.definition.string.begin.haskell + + 2 + + name + constant.character.escape.haskell + + 3 + + name + constant.character.escape.octal.haskell + + 4 + + name + constant.character.escape.hexadecimal.haskell + + 5 + + name + constant.character.escape.control.haskell + + 6 + + name + punctuation.definition.string.end.haskell + + + match + (?x) + (') + (?: + [\ -\[\]-~] # Basic Char + | (\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE + |DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS + |US|SP|DEL|[abfnrtv\\\"'\&])) # Escapes + | (\\o[0-7]+) # Octal Escapes + | (\\x[0-9A-Fa-f]+) # Hexadecimal Escapes + | (\^[A-Z@\[\]\\\^_]) # Control Chars + ) + (') + + name + string.quoted.single.haskell + + + begin + ^\s*(?<fn>(?:[\p{Ll}_][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*|\((?!--+\))((?![(),;\[\]`{}_"'])[\p{S}\p{P}])+\))(?:\s*,\s*\g<fn>)?)\s*(::) + beginCaptures + + 1 + + patterns + + + match + [\p{Ll}_][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']* + name + entity.name.function.haskell + + + include + #infix_op + + + + 2 + + name + keyword.other.double-colon.haskell + + + end + $\n? + name + meta.function.type-declaration.haskell + patterns + + + include + #type_signature + + + + + match + \b(Just|Nothing|Left|Right|True|False|LT|EQ|GT|\(\)|\[\])\b + name + support.constant.haskell + + + match + \b[\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']* + name + constant.other.haskell + + + include + #comments + + + match + \b(abs|acos|acosh|all|and|any|appendFile|applyM|asTypeOf|asin|asinh|atan|atan2|atanh|break|catch|ceiling|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|div|divMod|drop|dropWhile|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromEnum|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|head|id|init|interact|ioError|isDenormalized|isIEEE|isInfinite|isNaN|isNegativeZero|iterate|last|lcm|length|lex|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|odd|or|otherwise|pi|pred|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|read|readFile|readIO|readList|readLn|readParen|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showList|showParen|showString|shows|showsPrec|significand|signum|sin|sinh|snd|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|toEnum|toInteger|toRational|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\b(?!') + name + support.function.prelude.haskell + + + include + #infix_op + + + comment + In case this regex seems overly general, note that Haskell permits the definition of new operators which can be nearly any string of punctuation characters, such as $%^&*. + match + ((?![(),;\[\]`{}_"'])[\p{S}\p{P}])+ + name + keyword.operator.haskell + + + match + , + name + punctuation.separator.comma.haskell + + + repository + + block_comment + + applyEndPatternLast + 1 + begin + \{-(?!#) + captures + + 0 + + name + punctuation.definition.comment.haskell + + + end + -\} + name + comment.block.haskell + patterns + + + include + #block_comment + + + + comments + + patterns + + + begin + (^[ \t]+)?(?=--+((?![\p{S}\p{P}])|[(),;\[\]`{}_"'])) + beginCaptures + + 1 + + name + punctuation.whitespace.comment.leading.haskell + + + comment + Operators may begin with '--' as long as they are not entirely composed of '-' characters. This means comments can't be immediately followed by an allowable operator character. + end + (?!\G) + patterns + + + begin + -- + beginCaptures + + 0 + + name + punctuation.definition.comment.haskell + + + end + \n + name + comment.line.double-dash.haskell + + + + + include + #block_comment + + + + infix_op + + comment + An operator cannot be composed entirely of '-' characters; instead, it should be matched as a comment. + match + (\((?!--+\))((?![(),;\[\]`{}_"'])[\p{S}\p{P}])+\)|\(,+\)) + name + entity.name.function.infix.haskell + + module_exports + + begin + \( + end + \) + name + meta.declaration.exports.haskell + patterns + + + match + \b[\p{Ll}_][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']* + name + entity.name.function.haskell + + + match + \b[\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']* + name + storage.type.haskell + + + match + , + name + punctuation.separator.comma.haskell + + + include + #infix_op + + + comment + So named because I don't know what to call this. + match + \(.*?\) + name + meta.other.unknown.haskell + + + + module_name + + match + (?<conid>[\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*(\.\g<conid>)?) + name + support.other.module.haskell + + pragma + + begin + \{-# + end + #-\} + name + meta.preprocessor.haskell + patterns + + + match + \b(LANGUAGE|UNPACK|INLINE)\b + name + keyword.other.preprocessor.haskell + + + + type_signature + + patterns + + + captures + + 1 + + name + entity.other.inherited-class.haskell + + 2 + + name + variable.other.generic-type.haskell + + 3 + + name + keyword.other.big-arrow.haskell + + + match + \(\s*([\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*)\s+([\p{Ll}_][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*)\)\s*(=>) + name + meta.class-constraint.haskell + + + include + #pragma + + + match + -> + name + keyword.other.arrow.haskell + + + match + => + name + keyword.other.big-arrow.haskell + + + match + \b(Int(eger)?|Maybe|Either|Bool|Float|Double|Char|String|Ordering|ShowS|ReadS|FilePath|IO(Error)?)\b + name + support.type.prelude.haskell + + + match + \b[\p{Ll}_][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']* + name + variable.other.generic-type.haskell + + + match + \b[\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']* + name + storage.type.haskell + + + match + \(\) + name + support.constant.unit.haskell + + + include + #comments + + + + + scopeName + source.haskell + uuid + 5C034675-1F6D-497E-8073-369D37E2FD7D + + diff --git a/vendor/grammars/haskell.tmbundle/Syntaxes/Literate Haskell.plist b/vendor/grammars/haskell.tmbundle/Syntaxes/Literate Haskell.plist new file mode 100644 index 0000000000..d819ef0371 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/Syntaxes/Literate Haskell.plist @@ -0,0 +1,92 @@ + + + + + fileTypes + + lhs + + keyEquivalent + ^~H + name + Literate Haskell + patterns + + + begin + ^((\\)begin)({)code(})(\s*\n)? + captures + + 1 + + name + support.function.be.latex + + 2 + + name + punctuation.definition.function.latex + + 3 + + name + punctuation.definition.arguments.begin.latex + + 4 + + name + punctuation.definition.arguments.end.latex + + + contentName + source.haskell.embedded.latex + end + ^((\\)end)({)code(}) + name + meta.embedded.block.haskell.latex + patterns + + + include + source.haskell + + + + + begin + ^(> ) + beginCaptures + + 1 + + name + punctuation.definition.bird-track.haskell + + + comment + This breaks type signature detection for now, but it's better than having no highlighting whatsoever. + contentName + source.haskell + end + $ + name + meta.embedded.haskell + patterns + + + include + source.haskell + + + + + include + text.tex.latex + + + scopeName + text.tex.latex.haskell + uuid + 439807F5-7129-487D-B5DC-95D5272B43DD + + diff --git a/vendor/grammars/haskell.tmbundle/info.plist b/vendor/grammars/haskell.tmbundle/info.plist new file mode 100644 index 0000000000..8b942e8fe6 --- /dev/null +++ b/vendor/grammars/haskell.tmbundle/info.plist @@ -0,0 +1,58 @@ + + + + + contactEmailRot13 + wnzvf@37fvtanyf.pbz + contactName + Jamis Buck + description + Support for <a href="http://www.haskell.org/">Haskell</a>, a general purpose, purely functional programming language featuring static typing, higher order functions, polymorphism, type classes, and monadic effects. + mainMenu + + items + + 3B083BE7-9812-4F06-A758-CCAD9514E797 + 2242C46C-153E-4EEB-B80B-A5398559D759 + ------------------------------------ + 6B723007-D4EE-476B-8282-76230C559D5A + 50D814AE-D850-4C97-AF3E-1FDE4366C6A3 + ------------------------------------ + FA4AA254-EB7D-4B43-AC67-066AA9E8E8D9 + ------------------------------------ + A3A65891-D126-4D2D-9E6B-E20ADE2EAA88 + 21646767-DD1B-4BA9-BF3B-15968F8672AB + 18F43074-566D-4AD9-8DCE-9C26B8516B64 + CE424A97-E486-4DE7-9328-C6ADB99B4ABD + ------------------------------------ + 89248B78-C2C6-48EE-BC47-CF8E9A5EA0E7 + + submenus + + + name + Haskell + ordering + + 3B083BE7-9812-4F06-A758-CCAD9514E797 + 2242C46C-153E-4EEB-B80B-A5398559D759 + 6B723007-D4EE-476B-8282-76230C559D5A + 50D814AE-D850-4C97-AF3E-1FDE4366C6A3 + FA4AA254-EB7D-4B43-AC67-066AA9E8E8D9 + A3A65891-D126-4D2D-9E6B-E20ADE2EAA88 + 21646767-DD1B-4BA9-BF3B-15968F8672AB + 18F43074-566D-4AD9-8DCE-9C26B8516B64 + CE424A97-E486-4DE7-9328-C6ADB99B4ABD + 89248B78-C2C6-48EE-BC47-CF8E9A5EA0E7 + 4B154C05-D107-4316-9AAD-43A3DCF1860A + 5C034675-1F6D-497E-8073-369D37E2FD7D + 439807F5-7129-487D-B5DC-95D5272B43DD + E3994307-4D9E-44D6-832E-52C244F1CDF3 + 39417FB9-B85C-4213-BB1D-C19BCDD4E487 + 0C39B945-E2C0-4E43-8A5B-332F6FA73C67 + FBF9D932-D5CE-4EC4-9162-122E511C8627 + + uuid + 118557A4-4FEF-406D-A68E-BD191D9CBC83 + + diff --git a/vendor/grammars/java.tmbundle b/vendor/grammars/java.tmbundle index 64294ae0b6..faffa518d0 160000 --- a/vendor/grammars/java.tmbundle +++ b/vendor/grammars/java.tmbundle @@ -1 +1 @@ -Subproject commit 64294ae0b62b64b1183c401e3803679eaddb4946 +Subproject commit faffa518d0b22b68b4e5e6b4c939722522b97d40 diff --git a/vendor/grammars/json.tmbundle b/vendor/grammars/json.tmbundle index 0762cbdcb3..563b6f629b 160000 --- a/vendor/grammars/json.tmbundle +++ b/vendor/grammars/json.tmbundle @@ -1 +1 @@ -Subproject commit 0762cbdcb34dd98801b6323e75332cd4c9dbc07e +Subproject commit 563b6f629bcf2c77d239b03fa768f869a4cba368 diff --git a/vendor/grammars/language-babel b/vendor/grammars/language-babel index 0d093e8ffe..c9d6dbf463 160000 --- a/vendor/grammars/language-babel +++ b/vendor/grammars/language-babel @@ -1 +1 @@ -Subproject commit 0d093e8ffeaa80602c6f3ae86fade6a3b5f56e4d +Subproject commit c9d6dbf4637c0c703aa9ada87afdca5a9cfb3e30 diff --git a/vendor/grammars/language-blade b/vendor/grammars/language-blade index 50dcfb72af..fcbe2c2022 160000 --- a/vendor/grammars/language-blade +++ b/vendor/grammars/language-blade @@ -1 +1 @@ -Subproject commit 50dcfb72af30b267c4397f21742d79e4d564642f +Subproject commit fcbe2c202295ba1b3f3d2156b64a82999f51374d diff --git a/vendor/grammars/language-clojure b/vendor/grammars/language-clojure index d41af28800..bc86668c40 160000 --- a/vendor/grammars/language-clojure +++ b/vendor/grammars/language-clojure @@ -1 +1 @@ -Subproject commit d41af288008c6857198a3734d9f27e4f2f6650c5 +Subproject commit bc86668c40817aefbba2164032fcd24c2438b576 diff --git a/vendor/grammars/language-coffee-script b/vendor/grammars/language-coffee-script index 9ebf474016..8f001efe73 160000 --- a/vendor/grammars/language-coffee-script +++ b/vendor/grammars/language-coffee-script @@ -1 +1 @@ -Subproject commit 9ebf474016d7e984bfe40e36d7f5ea774dc1e4b9 +Subproject commit 8f001efe73422d0f7a0c16121588c34e0bd5fe8c diff --git a/vendor/grammars/language-crystal b/vendor/grammars/language-crystal index ec1e4991e6..0d7ac572e4 160000 --- a/vendor/grammars/language-crystal +++ b/vendor/grammars/language-crystal @@ -1 +1 @@ -Subproject commit ec1e4991e6647da9ca2c5337b795700c1f6ee7e4 +Subproject commit 0d7ac572e4628adf5206b03af9fc45cdd815476a diff --git a/vendor/grammars/language-csharp b/vendor/grammars/language-csharp index b3f1130b1a..c97c4bf74d 160000 --- a/vendor/grammars/language-csharp +++ b/vendor/grammars/language-csharp @@ -1 +1 @@ -Subproject commit b3f1130b1ae7f0bab2763d45926033aba92fb48c +Subproject commit c97c4bf74d74502c0b78901b12aab09186dc0eba diff --git a/vendor/grammars/language-csound b/vendor/grammars/language-csound index f5c603ac11..29d8eca1a8 160000 --- a/vendor/grammars/language-csound +++ b/vendor/grammars/language-csound @@ -1 +1 @@ -Subproject commit f5c603ac1168972d252a60edac2fab5dd3470b40 +Subproject commit 29d8eca1a8366295b9c7f052cbc667983d337a75 diff --git a/vendor/grammars/language-gfm b/vendor/grammars/language-gfm index 5435923521..a55c18c3dc 160000 --- a/vendor/grammars/language-gfm +++ b/vendor/grammars/language-gfm @@ -1 +1 @@ -Subproject commit 54359235212c921d4e09ed38575a9e9eb95635b8 +Subproject commit a55c18c3dc4d3fa9e5fb87fab0b0976b87526cbd diff --git a/vendor/grammars/language-haskell b/vendor/grammars/language-haskell index 16e6122e17..296a7e94df 160000 --- a/vendor/grammars/language-haskell +++ b/vendor/grammars/language-haskell @@ -1 +1 @@ -Subproject commit 16e6122e17ac5705dd18a1680142f29d059a4724 +Subproject commit 296a7e94df6b3c89c5247510b7ba4eb71f14c55f diff --git a/vendor/grammars/language-javascript b/vendor/grammars/language-javascript index 83f9e51bc9..84b91e8191 160000 --- a/vendor/grammars/language-javascript +++ b/vendor/grammars/language-javascript @@ -1 +1 @@ -Subproject commit 83f9e51bc96b56d392e603c6efbbfba453e7c4a7 +Subproject commit 84b91e819128cf6a225c215688fcf74872b72158 diff --git a/vendor/grammars/language-less b/vendor/grammars/language-less index 234fd8a37b..d4f5db5fba 160000 --- a/vendor/grammars/language-less +++ b/vendor/grammars/language-less @@ -1 +1 @@ -Subproject commit 234fd8a37be054209a7e1726c29923f4171a2f90 +Subproject commit d4f5db5fba671244c1f2085752d1ea9ce34f8bad diff --git a/vendor/grammars/language-python b/vendor/grammars/language-python index d5ae69749b..bc20450849 160000 --- a/vendor/grammars/language-python +++ b/vendor/grammars/language-python @@ -1 +1 @@ -Subproject commit d5ae69749bde41cc9da8020786106958f376ef5b +Subproject commit bc204508498b1695a4448bd2cf9a3d31c1cdaf5e diff --git a/vendor/grammars/language-renpy b/vendor/grammars/language-renpy index 883f51f4ef..a3b9bbed66 160000 --- a/vendor/grammars/language-renpy +++ b/vendor/grammars/language-renpy @@ -1 +1 @@ -Subproject commit 883f51f4ef5d310121e45d30205f96d3ade4c248 +Subproject commit a3b9bbed668137ab8db5dbafea4d5611957e68ee diff --git a/vendor/grammars/language-restructuredtext b/vendor/grammars/language-restructuredtext index 7133612568..f4f931ab7f 160000 --- a/vendor/grammars/language-restructuredtext +++ b/vendor/grammars/language-restructuredtext @@ -1 +1 @@ -Subproject commit 71336125686fc61e26da1f0b6642930295b467de +Subproject commit f4f931ab7fd2ee4c07db35d3b884c14585da6e3f diff --git a/vendor/grammars/language-roff b/vendor/grammars/language-roff index 8c0b327560..bef4485150 160000 --- a/vendor/grammars/language-roff +++ b/vendor/grammars/language-roff @@ -1 +1 @@ -Subproject commit 8c0b327560f9e2225a6be9817ab20f84ad4f37b3 +Subproject commit bef448515021f7112d42403c0a3d5814a13b193f diff --git a/vendor/grammars/language-shellscript b/vendor/grammars/language-shellscript index 8019ad833c..6b936daeca 160000 --- a/vendor/grammars/language-shellscript +++ b/vendor/grammars/language-shellscript @@ -1 +1 @@ -Subproject commit 8019ad833cc55cec04e8fd89d492b66702c6884f +Subproject commit 6b936daeca50d0551a44b0d014e9debbf02516e9 diff --git a/vendor/grammars/language-toc-wow b/vendor/grammars/language-toc-wow index f538862fdd..03e7c2a02f 160000 --- a/vendor/grammars/language-toc-wow +++ b/vendor/grammars/language-toc-wow @@ -1 +1 @@ -Subproject commit f538862fdd122f249c414d4d5b76f3c8d3b4d94d +Subproject commit 03e7c2a02f2c3b2b0101929547768af5a88a7ddf diff --git a/vendor/grammars/language-yaml b/vendor/grammars/language-yaml index 9f55beb635..784cecc64f 160000 --- a/vendor/grammars/language-yaml +++ b/vendor/grammars/language-yaml @@ -1 +1 @@ -Subproject commit 9f55beb63517483971d256d521e30a7fb0b2bcc0 +Subproject commit 784cecc64ffdb891f6a7fbba62e476b0c833e66f diff --git a/vendor/grammars/latex.tmbundle b/vendor/grammars/latex.tmbundle index a5c14e1ce9..cb0c75906c 160000 --- a/vendor/grammars/latex.tmbundle +++ b/vendor/grammars/latex.tmbundle @@ -1 +1 @@ -Subproject commit a5c14e1ce9f29ceac4efd6578e03a12fe99e8cf8 +Subproject commit cb0c75906cdead220f45acc27225245dd966ef55 diff --git a/vendor/grammars/objective-c.tmbundle b/vendor/grammars/objective-c.tmbundle index fdcedb95de..583d31f673 160000 --- a/vendor/grammars/objective-c.tmbundle +++ b/vendor/grammars/objective-c.tmbundle @@ -1 +1 @@ -Subproject commit fdcedb95de8846220c49f769fee91045188767d9 +Subproject commit 583d31f6734589a6ea1e2da1be9da57cf25a63f9 diff --git a/vendor/grammars/pawn-sublime-language b/vendor/grammars/pawn-sublime-language index 879fae6157..1916b03ba0 160000 --- a/vendor/grammars/pawn-sublime-language +++ b/vendor/grammars/pawn-sublime-language @@ -1 +1 @@ -Subproject commit 879fae615707c5b0073d6ac9a28b701eb14a57b1 +Subproject commit 1916b03ba0f61f488637310c7608b3244fc80c0e diff --git a/vendor/grammars/php.tmbundle b/vendor/grammars/php.tmbundle index 3ed4837b43..010cc1c22c 160000 --- a/vendor/grammars/php.tmbundle +++ b/vendor/grammars/php.tmbundle @@ -1 +1 @@ -Subproject commit 3ed4837b43d3f650ebb525b068636281942883a0 +Subproject commit 010cc1c22c89c117ad4c985997668c3903dc37f0 diff --git a/vendor/grammars/ruby-slim.tmbundle b/vendor/grammars/ruby-slim.tmbundle index 7452b27ea4..2016357d9c 160000 --- a/vendor/grammars/ruby-slim.tmbundle +++ b/vendor/grammars/ruby-slim.tmbundle @@ -1 +1 @@ -Subproject commit 7452b27ea4aa8cbe19d99bd92aa40ac3560c6a93 +Subproject commit 2016357d9ca16b8c3e8c2aa9ac0a48ed46f27adb diff --git a/vendor/grammars/sas.tmbundle b/vendor/grammars/sas.tmbundle index 012368ab93..776b54772b 160000 --- a/vendor/grammars/sas.tmbundle +++ b/vendor/grammars/sas.tmbundle @@ -1 +1 @@ -Subproject commit 012368ab93235a4e4ff70785aaf2cbf5017e13fe +Subproject commit 776b54772b27f6f30be714fbabf9eb9abba3d013 diff --git a/vendor/grammars/smali-sublime b/vendor/grammars/smali-sublime index 60a1fdb344..5bcea806cf 160000 --- a/vendor/grammars/smali-sublime +++ b/vendor/grammars/smali-sublime @@ -1 +1 @@ -Subproject commit 60a1fdb3442cd7082036f1a02e403a5f725ed837 +Subproject commit 5bcea806cf69a6ebce799b0995bdfd4d7865989e diff --git a/vendor/grammars/sublime-autoit b/vendor/grammars/sublime-autoit index d4e742a73a..eeca503056 160000 --- a/vendor/grammars/sublime-autoit +++ b/vendor/grammars/sublime-autoit @@ -1 +1 @@ -Subproject commit d4e742a73afc8eb249f64736c43cb4976cafe9c8 +Subproject commit eeca5030567213210108fb24d123399575fd94ae diff --git a/vendor/grammars/sublime-rust b/vendor/grammars/sublime-rust index 167018cc0f..d3c63dec57 160000 --- a/vendor/grammars/sublime-rust +++ b/vendor/grammars/sublime-rust @@ -1 +1 @@ -Subproject commit 167018cc0f76f51e3911c40af8faf914cb48f66f +Subproject commit d3c63dec579be852b1d8006dc58a9a6f2a9e6cdc diff --git a/vendor/grammars/sublime-typescript b/vendor/grammars/sublime-typescript index 0d538fc748..27529a651f 160000 --- a/vendor/grammars/sublime-typescript +++ b/vendor/grammars/sublime-typescript @@ -1 +1 @@ -Subproject commit 0d538fc74884c812eece814acbe32e9bd8e28a3f +Subproject commit 27529a651f1aea441c3a8c809b0858d0900d82aa diff --git a/vendor/grammars/sublime_man_page_support/.gitignore b/vendor/grammars/sublime_man_page_support/.gitignore new file mode 100644 index 0000000000..91fa95c6c4 --- /dev/null +++ b/vendor/grammars/sublime_man_page_support/.gitignore @@ -0,0 +1,2 @@ +*.cache +*.pyc diff --git a/vendor/grammars/sublime_man_page_support/LICENSE b/vendor/grammars/sublime_man_page_support/LICENSE new file mode 100644 index 0000000000..200d1262f3 --- /dev/null +++ b/vendor/grammars/sublime_man_page_support/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 carsonoid + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/grammars/sublime_man_page_support/Main.sublime-menu b/vendor/grammars/sublime_man_page_support/Main.sublime-menu new file mode 100644 index 0000000000..f1d0110f4f --- /dev/null +++ b/vendor/grammars/sublime_man_page_support/Main.sublime-menu @@ -0,0 +1,23 @@ +[ + { + "id": "tools", + "children": + [ + { + "id": "packages", + "caption": "Packages", + "children": + [ + { + "caption": "Man Page Editing", + "id": "man_page_dev", + "children": + [ + { "caption": "New Man Page", "command": "man_page_new" } + ] + } + ] + } + ] + } +] diff --git a/vendor/grammars/sublime_man_page_support/ManPage.sublime-build b/vendor/grammars/sublime_man_page_support/ManPage.sublime-build new file mode 100644 index 0000000000..0c5c11ed5b --- /dev/null +++ b/vendor/grammars/sublime_man_page_support/ManPage.sublime-build @@ -0,0 +1,4 @@ +{ + "target": "man_page_preview", + "selector": "text.groff" +} diff --git a/vendor/grammars/sublime_man_page_support/ManPage.sublime-commands b/vendor/grammars/sublime_man_page_support/ManPage.sublime-commands new file mode 100644 index 0000000000..7bfeb83d49 --- /dev/null +++ b/vendor/grammars/sublime_man_page_support/ManPage.sublime-commands @@ -0,0 +1,10 @@ +[ + { + "caption": "Create New Man Page", + "command": "man_page_new" + }, + { + "caption": "Preview Current Man Page", + "command": "man_page_preview" + } +] diff --git a/vendor/grammars/sublime_man_page_support/README.md b/vendor/grammars/sublime_man_page_support/README.md new file mode 100644 index 0000000000..6cf11c86a0 --- /dev/null +++ b/vendor/grammars/sublime_man_page_support/README.md @@ -0,0 +1,10 @@ +#Sublime Man Page Support + +Sublime Text 2 Support for Unix style manual pages. + +## Includes: + + * groff syntax highlighting + * command to create a new man page skeleton + * snippet that will add useful macros to your man pages on older systems (must come before man page content) + * Preview command, build-system, and syntax diff --git a/vendor/grammars/sublime_man_page_support/groff-enhancements.sublime-snippet b/vendor/grammars/sublime_man_page_support/groff-enhancements.sublime-snippet new file mode 100644 index 0000000000..ce944f8cd7 --- /dev/null +++ b/vendor/grammars/sublime_man_page_support/groff-enhancements.sublime-snippet @@ -0,0 +1,201 @@ + + 1 \\ +. nx +. +.\\" Check whether we are using grohtml. +.nr mH 0 +.if \\n(.g \\ +. if '\\*(.T'html' \\ +. nr mH 1 +. +. +.\\" Map mono-width fonts to standard fonts for groff's TTY device. +.if n \\{\\ +. do ftr CR R +. do ftr CI I +. do ftr CB B +.\\} +. +.\\" groff has glyph entities for angle brackets. +.ie \\n(.g \\{\\ +. ds la \\(la\\" +. ds ra \\(ra\\" +.\\} +.el \\{\\ +. ds la <\\" +. ds ra >\\" +. \\" groff's man macros control hyphenation with this register. +. nr HY 1 +.\\} +. +.nr mS 0 +. +. +.\\" Declare start of command synopsis. Sets up hanging indentation. +.de SY +. ie !\\\\n(mS \\{\\ +. nh +. nr mS 1 +. nr mA \\\\n(.j +. ad l +. nr mI \\\\n(.i +. \\} +. el \\{\\ +. br +. ns +. \\} +. +. nr mT \\w'\\fB\\\\\$1\\fP\\ ' +. HP \\\\n(mTu +. B "\\\\\$1" +.. +. +. +.\\" End of command synopsis. Restores adjustment. +.de YS +. in \\\\n(mIu +. ad \\\\n(mA +. hy \\\\n(HY +. nr mS 0 +.. +. +. +.\\" Declare optional option. +.de OP +. ie \\\\n(.\$-1 \\ +. RI "[\\fB\\\\\$1\\fP" "\\ \\\\\$2" "]" +. el \\ +. RB "[" "\\\\\$1" "]" +.. +. +. +.\\" Start URL. +.de UR +. ds m1 \\\\\$1\\" +. nh +. if \\\\n(mH \\{\\ +. \\" Start diversion in a new environment. +. do ev URL-div +. do di URL-div +. \\} +.. +. +. +.\\" End URL. +.de UE +. ie \\\\n(mH \\{\\ +. br +. di +. ev +. +. \\" Has there been one or more input lines for the link text? +. ie \\\\n(dn \\{\\ +. do HTML-NS "" +. \\" Yes, strip off final newline of diversion and emit it. +. do chop URL-div +. do URL-div +\\c +. do HTML-NS +. \\} +. el \\ +. do HTML-NS "\\\\*(m1" +\\&\\\\\$*\\" +. \\} +. el \\ +\\\\*(la\\\\*(m1\\\\*(ra\\\\\$*\\" +. +. hy \\\\n(HY +.. +. +. +.\\" Start email address. +.de MT +. ds m1 \\\\\$1\\" +. nh +. if \\\\n(mH \\{\\ +. \\" Start diversion in a new environment. +. do ev URL-div +. do di URL-div +. \\} +.. +. +. +.\\" End email address. +.de ME +. ie \\\\n(mH \\{\\ +. br +. di +. ev +. +. \\" Has there been one or more input lines for the link text? +. ie \\\\n(dn \\{\\ +. do HTML-NS "" +. \\" Yes, strip off final newline of diversion and emit it. +. do chop URL-div +. do URL-div +\\c +. do HTML-NS +. \\} +. el \\ +. do HTML-NS "\\\\*(m1" +\\&\\\\\$*\\" +. \\} +. el \\ +\\\\*(la\\\\*(m1\\\\*(ra\\\\\$*\\" +. +. hy \\\\n(HY +.. +. +. +.\\" Continuation line for .TP header. +.de TQ +. br +. ns +. TP \\\\\$1\\" no doublequotes around argument! +.. +. +. +.\\" Start example. +.de EX +. nr mE \\\\n(.f +. nf +. nh +. ft CW +.. +. +. +.\\" End example. +.de EE +. ft \\\\n(mE +. fi +. hy \\\\n(HY +.. +. +. +.\\" Start display. +.de DS +. \\" XXX to be written +.. +. +. +.\\" End display. +.de DE +. \\" XXX to be written +.. +. +.\\" EOF + +]]> + + diff --git a/vendor/grammars/sublime_man_page_support/man-groff.JSON-tmLanguage b/vendor/grammars/sublime_man_page_support/man-groff.JSON-tmLanguage new file mode 100644 index 0000000000..70410e737f --- /dev/null +++ b/vendor/grammars/sublime_man_page_support/man-groff.JSON-tmLanguage @@ -0,0 +1,85 @@ +{ "name": "Man Page (groff/troff)", + "scopeName": "text.groff", + "fileTypes": ["man", "groff"], + "patterns": [ + { + "name": "comment.macro.text.groff", + "match": "^\\.\\\\\".*$", + "comment": "comments" + }, + { + "name": "uri.macro.text.groff", + "begin": "^(\\.UR)\\b(.*)$", + "beginCaptures": { + "1": { "name": "keyword.text.groff" }, + "2": { "name": "constant.other.text.groff" } + }, + "end": "^(\\.UE)", + "endCaptures": { + "1": { "name": "keyword.text.groff" } + }, + "patterns": [ + { + "name": "string.text.groff", + "match": "." + } + ], + "comment": "email address macro" + }, + { + "name": "emailaddress.macro.text.groff", + "begin": "^(\\.MT)\\b(.*)$", + "beginCaptures": { + "1": { "name": "keyword.text.groff" }, + "2": { "name": "constant.other.text.groff" } + }, + "end": "^(\\.ME)", + "endCaptures": { + "1": { "name": "keyword.text.groff" } + }, + "patterns": [ + { + "name": "string.text.groff", + "match": "." + } + ], + "comment": "email address macro" + }, + { + "name": "option.macro.text.groff", + "match": "^(\\.OP)\\s([^\\s]+)\\s?(.*)$", + "captures": { + "1": { "name": "keyword.text.groff" }, + "2": { "name": "support.constant.text.groff" }, + "3": { "name": "string.text.groff" } + }, + "comment": "text style macros" + }, + { + "name": "style.macro.text.groff", + "begin": "^(\\.SM|\\.SB|\\.BI|\\.IB|\\.RI|\\.IR|\\.BR|\\.RB|\\.B|\\.I)\\b", + "beginCaptures": { + "1": { "name": "keyword.text.groff" } + }, + "end": "$", + "patterns": [ + { + "name": "string.text.groff", + "match": ".", + "comment": "catch-all" + } + ], + "comment": "text style macros" + }, + { + "name": "macro.text.groff", + "match": "^(\\.[a-zA-Z]*\\s?)(\\s?.+)?$", + "captures": { + "1": { "name": "keyword.text.groff" }, + "2": { "name": "entity.text.groff" } + }, + "comment": "marco catch-all" + } + ], + "uuid": "9f281c08-ae81-4ccd-b910-a67b17d1952e" +} diff --git a/vendor/grammars/sublime_man_page_support/man-groff.tmLanguage b/vendor/grammars/sublime_man_page_support/man-groff.tmLanguage new file mode 100644 index 0000000000..16b01d0d93 --- /dev/null +++ b/vendor/grammars/sublime_man_page_support/man-groff.tmLanguage @@ -0,0 +1,184 @@ + + + + + fileTypes + + man + groff + + name + Man Page (groff/troff) + patterns + + + comment + comments + match + ^\.\\".*$ + name + comment.macro.text.groff + + + begin + ^(\.UR)\b(.*)$ + beginCaptures + + 1 + + name + keyword.text.groff + + 2 + + name + constant.other.text.groff + + + comment + email address macro + end + ^(\.UE) + endCaptures + + 1 + + name + keyword.text.groff + + + name + uri.macro.text.groff + patterns + + + match + . + name + string.text.groff + + + + + begin + ^(\.MT)\b(.*)$ + beginCaptures + + 1 + + name + keyword.text.groff + + 2 + + name + constant.other.text.groff + + + comment + email address macro + end + ^(\.ME) + endCaptures + + 1 + + name + keyword.text.groff + + + name + emailaddress.macro.text.groff + patterns + + + match + . + name + string.text.groff + + + + + captures + + 1 + + name + keyword.text.groff + + 2 + + name + support.constant.text.groff + + 3 + + name + string.text.groff + + + comment + text style macros + match + ^(\.OP)\s([^\s]+)\s?(.*)$ + name + option.macro.text.groff + + + begin + ^(\.SM|\.SB|\.BI|\.IB|\.RI|\.IR|\.BR|\.RB|\.B|\.I)\b + beginCaptures + + 1 + + name + keyword.text.groff + + + comment + text style macros + end + $ + name + style.macro.text.groff + patterns + + + comment + catch-all + match + . + name + string.text.groff + + + + + captures + + 1 + + name + keyword.text.groff + + 2 + + name + entity.text.groff + + + comment + marco catch-all + match + ^(\.[a-zA-Z]*\s?)(\s?.+)?$ + name + macro.text.groff + + + scopeName + text.groff + uuid + 9f281c08-ae81-4ccd-b910-a67b17d1952e + + diff --git a/vendor/grammars/sublime_man_page_support/man-preview.JSON-tmLanguage b/vendor/grammars/sublime_man_page_support/man-preview.JSON-tmLanguage new file mode 100644 index 0000000000..0d9d524b0c --- /dev/null +++ b/vendor/grammars/sublime_man_page_support/man-preview.JSON-tmLanguage @@ -0,0 +1,32 @@ +{ "name": "Man Page Preview", + "scopeName": "source.man", + "fileTypes": ["man"], + "uuid": "f3ff3e8d-4f68-432c-af44-e00d6e15c81a", + "patterns": [ + { + "name": "string.source.man", + "match": "^(man\\((\\d+)\\))(.+)(man\\((\\d+)\\).*)$", + "captures": { + "0": { "name": "string.source.man" }, + "2": { "name": "constant.source.man" }, + "3": { "name": "keyword.source.man" }, + "5": { "name": "constant.source.man" } + } + }, + { + "name": "string.source.man", + "match": "^(\\d\\.\\d(\\.\\d)?)(.+)(man\\((\\d+)\\).*)$", + "captures": { + "1": { "name": "constant.source.man" }, + "2": { "name": "storage.source.man" }, + "3": { "name": "keyword.source.man" }, + "4": { "name": "string.source.man" }, + "5": { "name": "constant.source.man" } + } + }, + { + "name": "keyword.source.man", + "match": "^[A-Z][A-Z\\s]+\\s$" + } + ] +} \ No newline at end of file diff --git a/vendor/grammars/sublime_man_page_support/man-preview.tmLanguage b/vendor/grammars/sublime_man_page_support/man-preview.tmLanguage new file mode 100644 index 0000000000..0d7690336d --- /dev/null +++ b/vendor/grammars/sublime_man_page_support/man-preview.tmLanguage @@ -0,0 +1,88 @@ + + + + + fileTypes + + man + + name + Man Page Preview + patterns + + + captures + + 0 + + name + string.source.man + + 2 + + name + constant.source.man + + 3 + + name + keyword.source.man + + 5 + + name + constant.source.man + + + match + ^(man\((\d+)\))(.+)(man\((\d+)\).*)$ + name + string.source.man + + + captures + + 1 + + name + constant.source.man + + 2 + + name + storage.source.man + + 3 + + name + keyword.source.man + + 4 + + name + string.source.man + + 5 + + name + constant.source.man + + + match + ^(\d\.\d(\.\d)?)(.+)(man\((\d+)\).*)$ + name + string.source.man + + + match + ^[A-Z][A-Z\s]+\s$ + name + keyword.source.man + + + scopeName + source.man + uuid + f3ff3e8d-4f68-432c-af44-e00d6e15c81a + + diff --git a/vendor/grammars/sublime_man_page_support/new_page.py b/vendor/grammars/sublime_man_page_support/new_page.py new file mode 100644 index 0000000000..8a8a46ea1a --- /dev/null +++ b/vendor/grammars/sublime_man_page_support/new_page.py @@ -0,0 +1,59 @@ +import sublime, sublime_plugin +import os, time +import subprocess + +from sublime_lib.path import root_at_packages, get_package_name + +class ManPagePreview(sublime_plugin.WindowCommand): + def run(self): + # exit if file is dirty, we can't run a man command against a file that doesn't exist + if self.window.active_view().is_dirty(): + o = self.window.get_output_panel("manfail") + o.run_command("insert_snippet", {"contents": "Unable to preview unsaved file."}) + self.window.run_command("show_panel", {"panel": "output.manfail"}) + return + + # process document with groff + curpath = self.window.active_view().file_name() + c = subprocess.Popen(["groff", "-Tascii", "-man", curpath], stdout=subprocess.PIPE) + output, err = c.communicate() + + # run groff output through col to clean it up + col = subprocess.Popen(["col", "-bx"], stdout=subprocess.PIPE, stdin=subprocess.PIPE) + cleanout, err = col.communicate(output) + + # write clean output to new window + v = self.window.new_file() + v.settings().set('default_dir', root_at_packages('User')) + v.set_syntax_file('Packages/Man Page Support/man-preview.tmLanguage') + e = v.begin_edit() + p = v.text_point(0,0) + v.insert(e, p, cleanout) + v.end_edit(e) + +class ManPageNewCommand(sublime_plugin.WindowCommand): + def run(self): + v = self.window.new_file() + v.settings().set('default_dir', root_at_packages('User')) + v.set_syntax_file('Packages/Man Page Support/man-groff.tmLanguage') + + template = """.\\\" Manpage for ${1:}. +.\\\" Contact ${2:} to correct errors or typos. +.TH man 8 "%s" "1.0" "${1:}" +.SH NAME +${1:} +.SH SYNOPSIS +.SY +${1:} +.YS +.SH DESCRIPTION +${1:} +.SH BUGS +No known bugs. +.SH SEE ALSO +.SH AUTHOR +.MT ${2:} +${3:} +.ME +""" %(time.strftime("%B %Y")) + v.run_command("insert_snippet", {"contents": template}) diff --git a/vendor/grammars/swift.tmbundle b/vendor/grammars/swift.tmbundle index 662fd22bf8..b3cb4372f2 160000 --- a/vendor/grammars/swift.tmbundle +++ b/vendor/grammars/swift.tmbundle @@ -1 +1 @@ -Subproject commit 662fd22bf8e6d2ed1dfcb5881c23838bad620404 +Subproject commit b3cb4372f2e63175c72eaa6e94af2eb52bb6a9db diff --git a/vendor/grammars/vue-syntax-highlight b/vendor/grammars/vue-syntax-highlight index a29a875bf3..8e729750bc 160000 --- a/vendor/grammars/vue-syntax-highlight +++ b/vendor/grammars/vue-syntax-highlight @@ -1 +1 @@ -Subproject commit a29a875bf3e81f780e905c223a96261c04732659 +Subproject commit 8e729750bc181d3d05d5e74cf7cb8f8c4c19627d From c802ba3a1d6804cdf4d397ae2f0171d140b5283a Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 24 Aug 2016 09:37:47 -0700 Subject: [PATCH 0012/1214] Grammar update --- grammars.yml | 2 -- vendor/grammars/Handlebars | 2 +- vendor/grammars/MagicPython | 2 +- vendor/grammars/NimLime | 2 +- vendor/grammars/PHP-Twig.tmbundle | 2 +- vendor/grammars/Sublime-SQF-Language | 2 +- vendor/grammars/Sublime-VimL | 2 +- vendor/grammars/SublimeGDB | 2 +- vendor/grammars/TLA | 2 +- vendor/grammars/applescript.tmbundle | 2 +- vendor/grammars/atom-language-purescript | 2 +- vendor/grammars/atom-language-stan | 2 +- vendor/grammars/c.tmbundle | 2 +- vendor/grammars/css.tmbundle | 2 +- vendor/grammars/d.tmbundle | 2 +- vendor/grammars/elixir-tmbundle | 2 +- vendor/grammars/java.tmbundle | 2 +- vendor/grammars/json.tmbundle | 2 +- vendor/grammars/language-babel | 2 +- vendor/grammars/language-blade | 2 +- vendor/grammars/language-clojure | 2 +- vendor/grammars/language-coffee-script | 2 +- vendor/grammars/language-crystal | 2 +- vendor/grammars/language-csharp | 2 +- vendor/grammars/language-csound | 2 +- vendor/grammars/language-gfm | 2 +- vendor/grammars/language-haskell | 2 +- vendor/grammars/language-javascript | 2 +- vendor/grammars/language-less | 2 +- vendor/grammars/language-python | 2 +- vendor/grammars/language-renpy | 2 +- vendor/grammars/language-restructuredtext | 2 +- vendor/grammars/language-roff | 2 +- vendor/grammars/language-shellscript | 2 +- vendor/grammars/language-toc-wow | 2 +- vendor/grammars/language-yaml | 2 +- vendor/grammars/latex.tmbundle | 2 +- vendor/grammars/objective-c.tmbundle | 2 +- vendor/grammars/pawn-sublime-language | 2 +- vendor/grammars/php.tmbundle | 2 +- vendor/grammars/ruby-slim.tmbundle | 2 +- vendor/grammars/sas.tmbundle | 2 +- vendor/grammars/smali-sublime | 2 +- vendor/grammars/sublime-autoit | 2 +- vendor/grammars/sublime-rust | 2 +- vendor/grammars/sublime-typescript | 2 +- vendor/grammars/swift.tmbundle | 2 +- vendor/grammars/vue-syntax-highlight | 2 +- 48 files changed, 47 insertions(+), 49 deletions(-) diff --git a/grammars.yml b/grammars.yml index d6230d327c..7289d71f70 100755 --- a/grammars.yml +++ b/grammars.yml @@ -402,8 +402,6 @@ vendor/grammars/language-renpy: vendor/grammars/language-restructuredtext: - text.restructuredtext vendor/grammars/language-roff: -- source.ideal -- source.pic - text.roff - text.runoff vendor/grammars/language-shellscript: diff --git a/vendor/grammars/Handlebars b/vendor/grammars/Handlebars index c07f986ae7..94ef9439d8 160000 --- a/vendor/grammars/Handlebars +++ b/vendor/grammars/Handlebars @@ -1 +1 @@ -Subproject commit c07f986ae74c2a1eb96d856cf147ba94b8eefc90 +Subproject commit 94ef9439d81d41a193487dda835d742b584659f4 diff --git a/vendor/grammars/MagicPython b/vendor/grammars/MagicPython index f4ff7de27f..820a9310f6 160000 --- a/vendor/grammars/MagicPython +++ b/vendor/grammars/MagicPython @@ -1 +1 @@ -Subproject commit f4ff7de27f6ff9a4f1d8e0decd3cc7145dde2fa9 +Subproject commit 820a9310f67b452257c45332fd16433b5f63296a diff --git a/vendor/grammars/NimLime b/vendor/grammars/NimLime index 2f5ec25fe6..5089ecab59 160000 --- a/vendor/grammars/NimLime +++ b/vendor/grammars/NimLime @@ -1 +1 @@ -Subproject commit 2f5ec25fe648fb5260b0e5d845d3d88bd109b37d +Subproject commit 5089ecab59ed3211aa482c0fb4c5881f7f7c4e9d diff --git a/vendor/grammars/PHP-Twig.tmbundle b/vendor/grammars/PHP-Twig.tmbundle index 9e802d525e..f4f7529ac2 160000 --- a/vendor/grammars/PHP-Twig.tmbundle +++ b/vendor/grammars/PHP-Twig.tmbundle @@ -1 +1 @@ -Subproject commit 9e802d525ed87a90ec7ff842f44c0c992fd56521 +Subproject commit f4f7529ac2a07527caa7c9154b87c96d17e18aa1 diff --git a/vendor/grammars/Sublime-SQF-Language b/vendor/grammars/Sublime-SQF-Language index 984606e146..777931999d 160000 --- a/vendor/grammars/Sublime-SQF-Language +++ b/vendor/grammars/Sublime-SQF-Language @@ -1 +1 @@ -Subproject commit 984606e146b4ef96753db7f3a16adeee2b152e24 +Subproject commit 777931999d391173c509018fd38e4d124063f13d diff --git a/vendor/grammars/Sublime-VimL b/vendor/grammars/Sublime-VimL index b453aff6f7..4b23352ce5 160000 --- a/vendor/grammars/Sublime-VimL +++ b/vendor/grammars/Sublime-VimL @@ -1 +1 @@ -Subproject commit b453aff6f783769b6b895986da605a2db0db7379 +Subproject commit 4b23352ce5e48a191d55d61883a9478211df91fd diff --git a/vendor/grammars/SublimeGDB b/vendor/grammars/SublimeGDB index d9a512da6e..0afb64f273 160000 --- a/vendor/grammars/SublimeGDB +++ b/vendor/grammars/SublimeGDB @@ -1 +1 @@ -Subproject commit d9a512da6eb23b8193a8696a6fc1afd77f310d6e +Subproject commit 0afb64f2732bfb01af97f593d4f8c977a28dc510 diff --git a/vendor/grammars/TLA b/vendor/grammars/TLA index 5dc130cab3..7e351a9cdf 160000 --- a/vendor/grammars/TLA +++ b/vendor/grammars/TLA @@ -1 +1 @@ -Subproject commit 5dc130cab32ba6cf8c53e3378cd58740728f3c17 +Subproject commit 7e351a9cdf6fbf3132e35246ce190bad237fb39c diff --git a/vendor/grammars/applescript.tmbundle b/vendor/grammars/applescript.tmbundle index 5067ef67a5..bfb426974d 160000 --- a/vendor/grammars/applescript.tmbundle +++ b/vendor/grammars/applescript.tmbundle @@ -1 +1 @@ -Subproject commit 5067ef67a58f6f56a54460be1390d921bb400d45 +Subproject commit bfb426974dd4ec9adcee4094f32a14a484b2e1f3 diff --git a/vendor/grammars/atom-language-purescript b/vendor/grammars/atom-language-purescript index fc8b0bf9da..83d188103f 160000 --- a/vendor/grammars/atom-language-purescript +++ b/vendor/grammars/atom-language-purescript @@ -1 +1 @@ -Subproject commit fc8b0bf9da61886c6e3973c2d37e6aef88fabfb2 +Subproject commit 83d188103fa2544fe037e3634c26ab6bbeb85b3e diff --git a/vendor/grammars/atom-language-stan b/vendor/grammars/atom-language-stan index 0a79d383b7..2fa2745da7 160000 --- a/vendor/grammars/atom-language-stan +++ b/vendor/grammars/atom-language-stan @@ -1 +1 @@ -Subproject commit 0a79d383b7e94fefb242e967d708e054faf656cd +Subproject commit 2fa2745da7ab9de0ba42a9743d1942becb5e4c32 diff --git a/vendor/grammars/c.tmbundle b/vendor/grammars/c.tmbundle index fa4b7e2114..d26c35164a 160000 --- a/vendor/grammars/c.tmbundle +++ b/vendor/grammars/c.tmbundle @@ -1 +1 @@ -Subproject commit fa4b7e211463973328b5334d55d0b10dafa27122 +Subproject commit d26c35164a4d496fd2c0b4ea0c1aeed64d704702 diff --git a/vendor/grammars/css.tmbundle b/vendor/grammars/css.tmbundle index d79e9c0137..94f7111c29 160000 --- a/vendor/grammars/css.tmbundle +++ b/vendor/grammars/css.tmbundle @@ -1 +1 @@ -Subproject commit d79e9c013769386a765198f7fb0f9dce39da829b +Subproject commit 94f7111c2953ac7b4cc42d313d9ad9b8701b8468 diff --git a/vendor/grammars/d.tmbundle b/vendor/grammars/d.tmbundle index 8763c4c5f2..e4beff2ce5 160000 --- a/vendor/grammars/d.tmbundle +++ b/vendor/grammars/d.tmbundle @@ -1 +1 @@ -Subproject commit 8763c4c5f2169d48d725d946838428f50abe12a5 +Subproject commit e4beff2ce50afecab1438f0013977fadf89f8a39 diff --git a/vendor/grammars/elixir-tmbundle b/vendor/grammars/elixir-tmbundle index 6d0417e8eb..6ee8051a75 160000 --- a/vendor/grammars/elixir-tmbundle +++ b/vendor/grammars/elixir-tmbundle @@ -1 +1 @@ -Subproject commit 6d0417e8eb7e182810755214d0a8cd6421146c01 +Subproject commit 6ee8051a75cd9bc7f20e08f2fde4475e95e9c67a diff --git a/vendor/grammars/java.tmbundle b/vendor/grammars/java.tmbundle index faffa518d0..64294ae0b6 160000 --- a/vendor/grammars/java.tmbundle +++ b/vendor/grammars/java.tmbundle @@ -1 +1 @@ -Subproject commit faffa518d0b22b68b4e5e6b4c939722522b97d40 +Subproject commit 64294ae0b62b64b1183c401e3803679eaddb4946 diff --git a/vendor/grammars/json.tmbundle b/vendor/grammars/json.tmbundle index 563b6f629b..0762cbdcb3 160000 --- a/vendor/grammars/json.tmbundle +++ b/vendor/grammars/json.tmbundle @@ -1 +1 @@ -Subproject commit 563b6f629bcf2c77d239b03fa768f869a4cba368 +Subproject commit 0762cbdcb34dd98801b6323e75332cd4c9dbc07e diff --git a/vendor/grammars/language-babel b/vendor/grammars/language-babel index c9d6dbf463..0d093e8ffe 160000 --- a/vendor/grammars/language-babel +++ b/vendor/grammars/language-babel @@ -1 +1 @@ -Subproject commit c9d6dbf4637c0c703aa9ada87afdca5a9cfb3e30 +Subproject commit 0d093e8ffeaa80602c6f3ae86fade6a3b5f56e4d diff --git a/vendor/grammars/language-blade b/vendor/grammars/language-blade index fcbe2c2022..50dcfb72af 160000 --- a/vendor/grammars/language-blade +++ b/vendor/grammars/language-blade @@ -1 +1 @@ -Subproject commit fcbe2c202295ba1b3f3d2156b64a82999f51374d +Subproject commit 50dcfb72af30b267c4397f21742d79e4d564642f diff --git a/vendor/grammars/language-clojure b/vendor/grammars/language-clojure index bc86668c40..d41af28800 160000 --- a/vendor/grammars/language-clojure +++ b/vendor/grammars/language-clojure @@ -1 +1 @@ -Subproject commit bc86668c40817aefbba2164032fcd24c2438b576 +Subproject commit d41af288008c6857198a3734d9f27e4f2f6650c5 diff --git a/vendor/grammars/language-coffee-script b/vendor/grammars/language-coffee-script index 8f001efe73..9ebf474016 160000 --- a/vendor/grammars/language-coffee-script +++ b/vendor/grammars/language-coffee-script @@ -1 +1 @@ -Subproject commit 8f001efe73422d0f7a0c16121588c34e0bd5fe8c +Subproject commit 9ebf474016d7e984bfe40e36d7f5ea774dc1e4b9 diff --git a/vendor/grammars/language-crystal b/vendor/grammars/language-crystal index 0d7ac572e4..ec1e4991e6 160000 --- a/vendor/grammars/language-crystal +++ b/vendor/grammars/language-crystal @@ -1 +1 @@ -Subproject commit 0d7ac572e4628adf5206b03af9fc45cdd815476a +Subproject commit ec1e4991e6647da9ca2c5337b795700c1f6ee7e4 diff --git a/vendor/grammars/language-csharp b/vendor/grammars/language-csharp index c97c4bf74d..b3f1130b1a 160000 --- a/vendor/grammars/language-csharp +++ b/vendor/grammars/language-csharp @@ -1 +1 @@ -Subproject commit c97c4bf74d74502c0b78901b12aab09186dc0eba +Subproject commit b3f1130b1ae7f0bab2763d45926033aba92fb48c diff --git a/vendor/grammars/language-csound b/vendor/grammars/language-csound index 29d8eca1a8..f5c603ac11 160000 --- a/vendor/grammars/language-csound +++ b/vendor/grammars/language-csound @@ -1 +1 @@ -Subproject commit 29d8eca1a8366295b9c7f052cbc667983d337a75 +Subproject commit f5c603ac1168972d252a60edac2fab5dd3470b40 diff --git a/vendor/grammars/language-gfm b/vendor/grammars/language-gfm index a55c18c3dc..5435923521 160000 --- a/vendor/grammars/language-gfm +++ b/vendor/grammars/language-gfm @@ -1 +1 @@ -Subproject commit a55c18c3dc4d3fa9e5fb87fab0b0976b87526cbd +Subproject commit 54359235212c921d4e09ed38575a9e9eb95635b8 diff --git a/vendor/grammars/language-haskell b/vendor/grammars/language-haskell index 296a7e94df..16e6122e17 160000 --- a/vendor/grammars/language-haskell +++ b/vendor/grammars/language-haskell @@ -1 +1 @@ -Subproject commit 296a7e94df6b3c89c5247510b7ba4eb71f14c55f +Subproject commit 16e6122e17ac5705dd18a1680142f29d059a4724 diff --git a/vendor/grammars/language-javascript b/vendor/grammars/language-javascript index 84b91e8191..83f9e51bc9 160000 --- a/vendor/grammars/language-javascript +++ b/vendor/grammars/language-javascript @@ -1 +1 @@ -Subproject commit 84b91e819128cf6a225c215688fcf74872b72158 +Subproject commit 83f9e51bc96b56d392e603c6efbbfba453e7c4a7 diff --git a/vendor/grammars/language-less b/vendor/grammars/language-less index d4f5db5fba..234fd8a37b 160000 --- a/vendor/grammars/language-less +++ b/vendor/grammars/language-less @@ -1 +1 @@ -Subproject commit d4f5db5fba671244c1f2085752d1ea9ce34f8bad +Subproject commit 234fd8a37be054209a7e1726c29923f4171a2f90 diff --git a/vendor/grammars/language-python b/vendor/grammars/language-python index bc20450849..d5ae69749b 160000 --- a/vendor/grammars/language-python +++ b/vendor/grammars/language-python @@ -1 +1 @@ -Subproject commit bc204508498b1695a4448bd2cf9a3d31c1cdaf5e +Subproject commit d5ae69749bde41cc9da8020786106958f376ef5b diff --git a/vendor/grammars/language-renpy b/vendor/grammars/language-renpy index a3b9bbed66..883f51f4ef 160000 --- a/vendor/grammars/language-renpy +++ b/vendor/grammars/language-renpy @@ -1 +1 @@ -Subproject commit a3b9bbed668137ab8db5dbafea4d5611957e68ee +Subproject commit 883f51f4ef5d310121e45d30205f96d3ade4c248 diff --git a/vendor/grammars/language-restructuredtext b/vendor/grammars/language-restructuredtext index f4f931ab7f..7133612568 160000 --- a/vendor/grammars/language-restructuredtext +++ b/vendor/grammars/language-restructuredtext @@ -1 +1 @@ -Subproject commit f4f931ab7fd2ee4c07db35d3b884c14585da6e3f +Subproject commit 71336125686fc61e26da1f0b6642930295b467de diff --git a/vendor/grammars/language-roff b/vendor/grammars/language-roff index bef4485150..8c0b327560 160000 --- a/vendor/grammars/language-roff +++ b/vendor/grammars/language-roff @@ -1 +1 @@ -Subproject commit bef448515021f7112d42403c0a3d5814a13b193f +Subproject commit 8c0b327560f9e2225a6be9817ab20f84ad4f37b3 diff --git a/vendor/grammars/language-shellscript b/vendor/grammars/language-shellscript index 6b936daeca..8019ad833c 160000 --- a/vendor/grammars/language-shellscript +++ b/vendor/grammars/language-shellscript @@ -1 +1 @@ -Subproject commit 6b936daeca50d0551a44b0d014e9debbf02516e9 +Subproject commit 8019ad833cc55cec04e8fd89d492b66702c6884f diff --git a/vendor/grammars/language-toc-wow b/vendor/grammars/language-toc-wow index 03e7c2a02f..f538862fdd 160000 --- a/vendor/grammars/language-toc-wow +++ b/vendor/grammars/language-toc-wow @@ -1 +1 @@ -Subproject commit 03e7c2a02f2c3b2b0101929547768af5a88a7ddf +Subproject commit f538862fdd122f249c414d4d5b76f3c8d3b4d94d diff --git a/vendor/grammars/language-yaml b/vendor/grammars/language-yaml index 784cecc64f..9f55beb635 160000 --- a/vendor/grammars/language-yaml +++ b/vendor/grammars/language-yaml @@ -1 +1 @@ -Subproject commit 784cecc64ffdb891f6a7fbba62e476b0c833e66f +Subproject commit 9f55beb63517483971d256d521e30a7fb0b2bcc0 diff --git a/vendor/grammars/latex.tmbundle b/vendor/grammars/latex.tmbundle index cb0c75906c..a5c14e1ce9 160000 --- a/vendor/grammars/latex.tmbundle +++ b/vendor/grammars/latex.tmbundle @@ -1 +1 @@ -Subproject commit cb0c75906cdead220f45acc27225245dd966ef55 +Subproject commit a5c14e1ce9f29ceac4efd6578e03a12fe99e8cf8 diff --git a/vendor/grammars/objective-c.tmbundle b/vendor/grammars/objective-c.tmbundle index 583d31f673..fdcedb95de 160000 --- a/vendor/grammars/objective-c.tmbundle +++ b/vendor/grammars/objective-c.tmbundle @@ -1 +1 @@ -Subproject commit 583d31f6734589a6ea1e2da1be9da57cf25a63f9 +Subproject commit fdcedb95de8846220c49f769fee91045188767d9 diff --git a/vendor/grammars/pawn-sublime-language b/vendor/grammars/pawn-sublime-language index 1916b03ba0..879fae6157 160000 --- a/vendor/grammars/pawn-sublime-language +++ b/vendor/grammars/pawn-sublime-language @@ -1 +1 @@ -Subproject commit 1916b03ba0f61f488637310c7608b3244fc80c0e +Subproject commit 879fae615707c5b0073d6ac9a28b701eb14a57b1 diff --git a/vendor/grammars/php.tmbundle b/vendor/grammars/php.tmbundle index 010cc1c22c..3ed4837b43 160000 --- a/vendor/grammars/php.tmbundle +++ b/vendor/grammars/php.tmbundle @@ -1 +1 @@ -Subproject commit 010cc1c22c89c117ad4c985997668c3903dc37f0 +Subproject commit 3ed4837b43d3f650ebb525b068636281942883a0 diff --git a/vendor/grammars/ruby-slim.tmbundle b/vendor/grammars/ruby-slim.tmbundle index 2016357d9c..7452b27ea4 160000 --- a/vendor/grammars/ruby-slim.tmbundle +++ b/vendor/grammars/ruby-slim.tmbundle @@ -1 +1 @@ -Subproject commit 2016357d9ca16b8c3e8c2aa9ac0a48ed46f27adb +Subproject commit 7452b27ea4aa8cbe19d99bd92aa40ac3560c6a93 diff --git a/vendor/grammars/sas.tmbundle b/vendor/grammars/sas.tmbundle index 776b54772b..012368ab93 160000 --- a/vendor/grammars/sas.tmbundle +++ b/vendor/grammars/sas.tmbundle @@ -1 +1 @@ -Subproject commit 776b54772b27f6f30be714fbabf9eb9abba3d013 +Subproject commit 012368ab93235a4e4ff70785aaf2cbf5017e13fe diff --git a/vendor/grammars/smali-sublime b/vendor/grammars/smali-sublime index 5bcea806cf..60a1fdb344 160000 --- a/vendor/grammars/smali-sublime +++ b/vendor/grammars/smali-sublime @@ -1 +1 @@ -Subproject commit 5bcea806cf69a6ebce799b0995bdfd4d7865989e +Subproject commit 60a1fdb3442cd7082036f1a02e403a5f725ed837 diff --git a/vendor/grammars/sublime-autoit b/vendor/grammars/sublime-autoit index eeca503056..d4e742a73a 160000 --- a/vendor/grammars/sublime-autoit +++ b/vendor/grammars/sublime-autoit @@ -1 +1 @@ -Subproject commit eeca5030567213210108fb24d123399575fd94ae +Subproject commit d4e742a73afc8eb249f64736c43cb4976cafe9c8 diff --git a/vendor/grammars/sublime-rust b/vendor/grammars/sublime-rust index d3c63dec57..167018cc0f 160000 --- a/vendor/grammars/sublime-rust +++ b/vendor/grammars/sublime-rust @@ -1 +1 @@ -Subproject commit d3c63dec579be852b1d8006dc58a9a6f2a9e6cdc +Subproject commit 167018cc0f76f51e3911c40af8faf914cb48f66f diff --git a/vendor/grammars/sublime-typescript b/vendor/grammars/sublime-typescript index 27529a651f..0d538fc748 160000 --- a/vendor/grammars/sublime-typescript +++ b/vendor/grammars/sublime-typescript @@ -1 +1 @@ -Subproject commit 27529a651f1aea441c3a8c809b0858d0900d82aa +Subproject commit 0d538fc74884c812eece814acbe32e9bd8e28a3f diff --git a/vendor/grammars/swift.tmbundle b/vendor/grammars/swift.tmbundle index b3cb4372f2..662fd22bf8 160000 --- a/vendor/grammars/swift.tmbundle +++ b/vendor/grammars/swift.tmbundle @@ -1 +1 @@ -Subproject commit b3cb4372f2e63175c72eaa6e94af2eb52bb6a9db +Subproject commit 662fd22bf8e6d2ed1dfcb5881c23838bad620404 diff --git a/vendor/grammars/vue-syntax-highlight b/vendor/grammars/vue-syntax-highlight index 8e729750bc..a29a875bf3 160000 --- a/vendor/grammars/vue-syntax-highlight +++ b/vendor/grammars/vue-syntax-highlight @@ -1 +1 @@ -Subproject commit 8e729750bc181d3d05d5e74cf7cb8f8c4c19627d +Subproject commit a29a875bf3e81f780e905c223a96261c04732659 From 6adec161fa27bbfecb24b70da87f5b549bc08908 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 24 Aug 2016 09:40:22 -0700 Subject: [PATCH 0013/1214] Updating version to v4.8.9 --- lib/linguist/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/version.rb b/lib/linguist/version.rb index 66c161a0d5..8c15a584ac 100644 --- a/lib/linguist/version.rb +++ b/lib/linguist/version.rb @@ -1,3 +1,3 @@ module Linguist - VERSION = "4.8.8" + VERSION = "4.8.9" end From 2f50aa460ab40cbcf4a7a6e40d93575b3084851f Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 24 Aug 2016 09:50:12 -0700 Subject: [PATCH 0014/1214] Removing nuked grammars --- ...ction Call from Selection : Word.tmCommand | 32 - .../Commands/Load in GHCi.tmCommand | 53 -- .../Commands/Lookup on Hoogle.tmCommand | 25 - .../Commands/New Module.tmCommand | 34 - .../haskell.tmbundle/Commands/Run.plist | 55 -- .../Commands/Show Type.tmCommand | 24 - .../Preferences/Comments.tmPreferences | 36 - .../Preferences/Indentation.tmPreferences | 23 - .../Preferences/Symbol List.tmPreferences | 17 - .../Preferences/Typing Pairs.plist | 38 - vendor/grammars/haskell.tmbundle/README.mdown | 20 - .../Snippets/Definition.tmSnippet | 16 - .../Snippets/Function.tmSnippet | 17 - .../haskell.tmbundle/Snippets/Guard.tmSnippet | 16 - .../Snippets/Haddock Postfix.tmSnippet | 16 - .../Snippets/Haddock Prefix.tmSnippet | 16 - .../Snippets/Hashbang.tmSnippet | 17 - .../Snippets/Lambda Expression.tmSnippet | 16 - .../Snippets/Left Arrow.tmSnippet | 18 - .../Snippets/List Comprehension.tmSnippet | 16 - .../haskell.tmbundle/Snippets/Main.tmSnippet | 20 - .../Snippets/Right Arrow.tmSnippet | 18 - .../Snippets/Type Constraint.tmSnippet | 16 - .../Snippets/Type Sequence.tmSnippet | 16 - .../Snippets/Type Signature.tmSnippet | 16 - .../Snippets/case _ of _.tmSnippet | 18 - .../Snippets/class _.tmSnippet | 17 - .../Snippets/data _.tmSnippet | 16 - .../Snippets/deriving _.tmSnippet | 16 - .../haskell.tmbundle/Snippets/do _.tmSnippet | 17 - .../Snippets/if _ then _ else _.tmSnippet | 18 - .../Snippets/import _ hiding _.tmSnippet | 16 - .../Snippets/import _.tmSnippet | 16 - .../Snippets/import qualified _.tmSnippet | 16 - .../Snippets/instance _.tmSnippet | 17 - .../haskell.tmbundle/Snippets/let _.tmSnippet | 18 - .../Snippets/newtype _.tmSnippet | 16 - .../Snippets/type _.tmSnippet | 16 - .../Snippets/where _.tmSnippet | 17 - .../haskell.tmbundle/Support/bin/haskelltype | 222 ------ .../haskell.tmbundle/Syntaxes/Haskell.plist | 711 ------------------ .../Syntaxes/Literate Haskell.plist | 92 --- vendor/grammars/haskell.tmbundle/info.plist | 58 -- .../sublime_man_page_support/.gitignore | 2 - .../grammars/sublime_man_page_support/LICENSE | 20 - .../Main.sublime-menu | 23 - .../ManPage.sublime-build | 4 - .../ManPage.sublime-commands | 10 - .../sublime_man_page_support/README.md | 10 - .../groff-enhancements.sublime-snippet | 201 ----- .../man-groff.JSON-tmLanguage | 85 --- .../man-groff.tmLanguage | 184 ----- .../man-preview.JSON-tmLanguage | 32 - .../man-preview.tmLanguage | 88 --- .../sublime_man_page_support/new_page.py | 59 -- 55 files changed, 2626 deletions(-) delete mode 100644 vendor/grammars/haskell.tmbundle/Commands/Infix Function Call from Selection : Word.tmCommand delete mode 100644 vendor/grammars/haskell.tmbundle/Commands/Load in GHCi.tmCommand delete mode 100644 vendor/grammars/haskell.tmbundle/Commands/Lookup on Hoogle.tmCommand delete mode 100644 vendor/grammars/haskell.tmbundle/Commands/New Module.tmCommand delete mode 100644 vendor/grammars/haskell.tmbundle/Commands/Run.plist delete mode 100644 vendor/grammars/haskell.tmbundle/Commands/Show Type.tmCommand delete mode 100644 vendor/grammars/haskell.tmbundle/Preferences/Comments.tmPreferences delete mode 100644 vendor/grammars/haskell.tmbundle/Preferences/Indentation.tmPreferences delete mode 100644 vendor/grammars/haskell.tmbundle/Preferences/Symbol List.tmPreferences delete mode 100644 vendor/grammars/haskell.tmbundle/Preferences/Typing Pairs.plist delete mode 100644 vendor/grammars/haskell.tmbundle/README.mdown delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Definition.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Function.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Guard.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Haddock Postfix.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Haddock Prefix.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Hashbang.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Lambda Expression.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Left Arrow.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/List Comprehension.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Main.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Right Arrow.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Type Constraint.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Type Sequence.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/Type Signature.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/case _ of _.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/class _.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/data _.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/deriving _.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/do _.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/if _ then _ else _.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/import _ hiding _.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/import _.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/import qualified _.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/instance _.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/let _.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/newtype _.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/type _.tmSnippet delete mode 100644 vendor/grammars/haskell.tmbundle/Snippets/where _.tmSnippet delete mode 100755 vendor/grammars/haskell.tmbundle/Support/bin/haskelltype delete mode 100644 vendor/grammars/haskell.tmbundle/Syntaxes/Haskell.plist delete mode 100644 vendor/grammars/haskell.tmbundle/Syntaxes/Literate Haskell.plist delete mode 100644 vendor/grammars/haskell.tmbundle/info.plist delete mode 100644 vendor/grammars/sublime_man_page_support/.gitignore delete mode 100644 vendor/grammars/sublime_man_page_support/LICENSE delete mode 100644 vendor/grammars/sublime_man_page_support/Main.sublime-menu delete mode 100644 vendor/grammars/sublime_man_page_support/ManPage.sublime-build delete mode 100644 vendor/grammars/sublime_man_page_support/ManPage.sublime-commands delete mode 100644 vendor/grammars/sublime_man_page_support/README.md delete mode 100644 vendor/grammars/sublime_man_page_support/groff-enhancements.sublime-snippet delete mode 100644 vendor/grammars/sublime_man_page_support/man-groff.JSON-tmLanguage delete mode 100644 vendor/grammars/sublime_man_page_support/man-groff.tmLanguage delete mode 100644 vendor/grammars/sublime_man_page_support/man-preview.JSON-tmLanguage delete mode 100644 vendor/grammars/sublime_man_page_support/man-preview.tmLanguage delete mode 100644 vendor/grammars/sublime_man_page_support/new_page.py diff --git a/vendor/grammars/haskell.tmbundle/Commands/Infix Function Call from Selection : Word.tmCommand b/vendor/grammars/haskell.tmbundle/Commands/Infix Function Call from Selection : Word.tmCommand deleted file mode 100644 index a5fc1784ec..0000000000 --- a/vendor/grammars/haskell.tmbundle/Commands/Infix Function Call from Selection : Word.tmCommand +++ /dev/null @@ -1,32 +0,0 @@ - - - - - beforeRunningCommand - nop - command - #!/bin/bash - -NAME="$(cat)" -if [[ -z "$NAME" ]]; then - NAME="\$1" -fi - -echo "\`$NAME\`\$0" - - fallbackInput - word - input - selection - keyEquivalent - ^' - name - Infix Function Call From Word / Selection - output - insertAsSnippet - scope - source.haskell - uuid - FA4AA254-EB7D-4B43-AC67-066AA9E8E8D9 - - diff --git a/vendor/grammars/haskell.tmbundle/Commands/Load in GHCi.tmCommand b/vendor/grammars/haskell.tmbundle/Commands/Load in GHCi.tmCommand deleted file mode 100644 index 5a86536528..0000000000 --- a/vendor/grammars/haskell.tmbundle/Commands/Load in GHCi.tmCommand +++ /dev/null @@ -1,53 +0,0 @@ - - - - - beforeRunningCommand - nop - command - #!/bin/bash - -THASKELL=${TM_HASKELL:-ghci} - -esc () { -STR="$1" ruby18 <<"RUBY" - str = ENV['STR'] - str = str.gsub(/'/, "'\\\\''") - str = str.gsub(/[\\"]/, '\\\\\\0') - print "'#{str}'" -RUBY -} - -osascript <<- APPLESCRIPT -tell app "Terminal" - launch - activate - do script "clear; cd $(esc "${TM_DIRECTORY}"); ${THASKELL} $(esc "${TM_FILEPATH}")" - set position of first window to {100, 100} -end tell -APPLESCRIPT - - input - none - inputFormat - text - keyEquivalent - @R - name - Load in GHCi - outputCaret - afterOutput - outputFormat - text - outputLocation - toolTip - scope - source.haskell - semanticClass - process.external.run.haskell - uuid - 2242C46C-153E-4EEB-B80B-A5398559D759 - version - 2 - - diff --git a/vendor/grammars/haskell.tmbundle/Commands/Lookup on Hoogle.tmCommand b/vendor/grammars/haskell.tmbundle/Commands/Lookup on Hoogle.tmCommand deleted file mode 100644 index da04c3f97c..0000000000 --- a/vendor/grammars/haskell.tmbundle/Commands/Lookup on Hoogle.tmCommand +++ /dev/null @@ -1,25 +0,0 @@ - - - - - beforeRunningCommand - nop - command - #!/bin/bash -echo "<meta http-equiv=\"refresh\" content=\"0; http://haskell.org/hoogle/?q=$(cat)\">" - fallbackInput - word - input - selection - keyEquivalent - ^H - name - Lookup on Hoogle - output - showAsHTML - scope - source.haskell - uuid - 50D814AE-D850-4C97-AF3E-1FDE4366C6A3 - - diff --git a/vendor/grammars/haskell.tmbundle/Commands/New Module.tmCommand b/vendor/grammars/haskell.tmbundle/Commands/New Module.tmCommand deleted file mode 100644 index cc483847a3..0000000000 --- a/vendor/grammars/haskell.tmbundle/Commands/New Module.tmCommand +++ /dev/null @@ -1,34 +0,0 @@ - - - - - beforeRunningCommand - nop - command - #!/bin/bash - -NAME=${TM_FILENAME%.hs} -if [[ -z "$NAME" ]]; then - NAME="Main" -fi - -cat <<SNIPPET -module \${1:$NAME} \${2/.+/( - /m}\${2:function}\${2/.+/ -) /m}where -\$0 -SNIPPET - input - none - name - module … - output - insertAsSnippet - scope - source.haskell - tabTrigger - mod - uuid - 156D0588-A61A-4419-9C71-6E47320A4DA5 - - diff --git a/vendor/grammars/haskell.tmbundle/Commands/Run.plist b/vendor/grammars/haskell.tmbundle/Commands/Run.plist deleted file mode 100644 index 7a3fc059f8..0000000000 --- a/vendor/grammars/haskell.tmbundle/Commands/Run.plist +++ /dev/null @@ -1,55 +0,0 @@ - - - - - beforeRunningCommand - saveModifiedFiles - command - #!/usr/bin/env ruby18 -wKU -require "#{ENV["TM_SUPPORT_PATH"]}/lib/tm/save_current_document" -require "#{ENV["TM_SUPPORT_PATH"]}/lib/tm/executor" -require "#{ENV["TM_SUPPORT_PATH"]}/lib/escape" - -TextMate.save_if_untitled('hs') - -haskell = e_sh(ENV['TM_HASKELL'] || 'runhaskell') -TextMate::Executor.run(haskell, ENV['TM_FILEPATH']) - - input - document - inputFormat - text - keyEquivalent - @r - name - Run - outputCaret - afterOutput - outputFormat - html - outputLocation - newWindow - requiredCommands - - - command - runhaskell - locations - - /opt/local/bin/runhugs - /usr/local/bin/runhaskell - - variable - TM_HASKELL - - - scope - source.haskell - semanticClass - process.run.script.haskell - uuid - 3B083BE7-9812-4F06-A758-CCAD9514E797 - version - 2 - - diff --git a/vendor/grammars/haskell.tmbundle/Commands/Show Type.tmCommand b/vendor/grammars/haskell.tmbundle/Commands/Show Type.tmCommand deleted file mode 100644 index 7ad9f337e8..0000000000 --- a/vendor/grammars/haskell.tmbundle/Commands/Show Type.tmCommand +++ /dev/null @@ -1,24 +0,0 @@ - - - - - beforeRunningCommand - nop - command - haskelltype "$(cat)" - fallbackInput - word - input - selection - keyEquivalent - ^h - name - Show Type - output - showAsTooltip - scope - source.haskell - uuid - 6B723007-D4EE-476B-8282-76230C559D5A - - diff --git a/vendor/grammars/haskell.tmbundle/Preferences/Comments.tmPreferences b/vendor/grammars/haskell.tmbundle/Preferences/Comments.tmPreferences deleted file mode 100644 index 718c6e2d52..0000000000 --- a/vendor/grammars/haskell.tmbundle/Preferences/Comments.tmPreferences +++ /dev/null @@ -1,36 +0,0 @@ - - - - - name - Comments - scope - source.haskell - settings - - shellVariables - - - name - TM_COMMENT_START_2 - value - {- - - - name - TM_COMMENT_END_2 - value - -} - - - name - TM_COMMENT_START - value - -- - - - - uuid - E3994307-4D9E-44D6-832E-52C244F1CDF3 - - diff --git a/vendor/grammars/haskell.tmbundle/Preferences/Indentation.tmPreferences b/vendor/grammars/haskell.tmbundle/Preferences/Indentation.tmPreferences deleted file mode 100644 index afff2e9e59..0000000000 --- a/vendor/grammars/haskell.tmbundle/Preferences/Indentation.tmPreferences +++ /dev/null @@ -1,23 +0,0 @@ - - - - - name - Indentation - scope - source.haskell - settings - - decreaseIndentPattern - ^\s*$ - disableIndentCorrections - - increaseIndentPattern - ((^.*(=|\bdo|\bwhere|\bthen|\belse|\bof)\s*$)|(^.*\bif(?!.*\bthen\b.*\belse\b.*).*$)) - indentOnPaste - simple - - uuid - 39417FB9-B85C-4213-BB1D-C19BCDD4E487 - - diff --git a/vendor/grammars/haskell.tmbundle/Preferences/Symbol List.tmPreferences b/vendor/grammars/haskell.tmbundle/Preferences/Symbol List.tmPreferences deleted file mode 100644 index 3349a87520..0000000000 --- a/vendor/grammars/haskell.tmbundle/Preferences/Symbol List.tmPreferences +++ /dev/null @@ -1,17 +0,0 @@ - - - - - name - Symbol List - scope - source.haskell entity.name.function.infix - settings - - showInSymbolList - 0 - - uuid - 0C39B945-E2C0-4E43-8A5B-332F6FA73C67 - - diff --git a/vendor/grammars/haskell.tmbundle/Preferences/Typing Pairs.plist b/vendor/grammars/haskell.tmbundle/Preferences/Typing Pairs.plist deleted file mode 100644 index d9fff7d369..0000000000 --- a/vendor/grammars/haskell.tmbundle/Preferences/Typing Pairs.plist +++ /dev/null @@ -1,38 +0,0 @@ - - - - - name - Typing Pairs - scope - source.haskell - comment - settings - - smartTypingPairs - - - " - " - - - { - } - - - [ - ] - - - ( - ) - - - ` - ` - - - - uuid - FBF9D932-D5CE-4EC4-9162-122E511C8627 - - diff --git a/vendor/grammars/haskell.tmbundle/README.mdown b/vendor/grammars/haskell.tmbundle/README.mdown deleted file mode 100644 index 32d8f85a4c..0000000000 --- a/vendor/grammars/haskell.tmbundle/README.mdown +++ /dev/null @@ -1,20 +0,0 @@ -# Installation - -You can install this bundle in TextMate by opening the preferences and going to the bundles tab. After installation it will be automatically updated for you. - -# General - -* [Bundle Styleguide](http://kb.textmate.org/bundle_styleguide) — _before you make changes_ -* [Commit Styleguide](http://kb.textmate.org/commit_styleguide) — _before you send a pull request_ -* [Writing Bug Reports](http://kb.textmate.org/writing_bug_reports) — _before you report an issue_ - -# License - -If not otherwise specified (see below), files in this repository fall under the following license: - - Permission to copy, use, modify, sell and distribute this - software is granted. This software is provided "as is" without - express or implied warranty, and with no claim as to its - suitability for any purpose. - -An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”. \ No newline at end of file diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Definition.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Definition.tmSnippet deleted file mode 100644 index 78f19026e3..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/Definition.tmSnippet +++ /dev/null @@ -1,16 +0,0 @@ - - - - - content - ${1:name} ${2:pattern}${2/.+/ /}= ${0:definition} - name - Definition - scope - source.haskell - tabTrigger - = - uuid - 81886A7D-5EE8-438C-9FC8-6BA3B65E444A - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Function.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Function.tmSnippet deleted file mode 100644 index 1094af9da3..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/Function.tmSnippet +++ /dev/null @@ -1,17 +0,0 @@ - - - - - content - ${1:name} :: ${2:Type} -${1} ${3:pattern}${3/.+/ /}${4/.+/= /}${4:definition} - name - Function - scope - source.haskell - tabTrigger - fun - uuid - A83076A6-EC6F-418F-B8F9-9AE952964242 - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Guard.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Guard.tmSnippet deleted file mode 100644 index ccf1226999..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/Guard.tmSnippet +++ /dev/null @@ -1,16 +0,0 @@ - - - - - content - | ${1:predicate} = ${0:definition} - name - Guard - scope - source.haskell - comment - tabTrigger - | - uuid - BA1329DB-9437-4246-839A-48A49B48D31D - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Haddock Postfix.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Haddock Postfix.tmSnippet deleted file mode 100644 index 56e7e636f7..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/Haddock Postfix.tmSnippet +++ /dev/null @@ -1,16 +0,0 @@ - - - - - content - | ${0:documentation} - name - Haddock Postfix - scope - source.haskell comment.block - tabTrigger - | - uuid - 961E79B9-CC31-4843-BBE9-51F46598BC25 - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Haddock Prefix.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Haddock Prefix.tmSnippet deleted file mode 100644 index 0e1a35e894..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/Haddock Prefix.tmSnippet +++ /dev/null @@ -1,16 +0,0 @@ - - - - - content - ^ ${0:documentation} - name - Haddock Prefix - scope - source.haskell comment.block - tabTrigger - ^ - uuid - E0E613C1-0760-46BC-A51E-168E658904C5 - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Hashbang.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Hashbang.tmSnippet deleted file mode 100644 index 78ef4b3fe3..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/Hashbang.tmSnippet +++ /dev/null @@ -1,17 +0,0 @@ - - - - - content - #!/usr/bin/env ${1:runhaskell} - - name - #!/usr/bin/env… - scope - source.haskell - tabTrigger - #! - uuid - 54495635-CC26-4C14-A202-5C0CA4B078C2 - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Lambda Expression.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Lambda Expression.tmSnippet deleted file mode 100644 index 7cc131eb6d..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/Lambda Expression.tmSnippet +++ /dev/null @@ -1,16 +0,0 @@ - - - - - content - \\${1:pattern} -> ${0:expression} - name - Lambda Expression - scope - source.haskell - tabTrigger - \ - uuid - 0672CE3D-A796-44B1-AEF2-975C0FB27184 - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Left Arrow.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Left Arrow.tmSnippet deleted file mode 100644 index ab95d2e510..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/Left Arrow.tmSnippet +++ /dev/null @@ -1,18 +0,0 @@ - - - - - content - ${1:name} <- ${0:expression} - keyEquivalent - ^, - name - Left Arrow - scope - source.haskell - tabTrigger - < - uuid - 9EF1F854-442C-40B2-BED5-454A015AA26D - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/List Comprehension.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/List Comprehension.tmSnippet deleted file mode 100644 index 0ae12d1db5..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/List Comprehension.tmSnippet +++ /dev/null @@ -1,16 +0,0 @@ - - - - - content - [ ${1:expression} | ${2:name} <- ${3:expression}${4/.+/, /}${4:condition} - name - List Comprehension - scope - source.haskell constant.language.nil - tabTrigger - [ - uuid - C721BD84-71FA-423F-8460-2CED4954137F - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Main.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Main.tmSnippet deleted file mode 100644 index 6a63606438..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/Main.tmSnippet +++ /dev/null @@ -1,20 +0,0 @@ - - - - - content - module Main where - -main :: IO () -main = ${0:putStrLn "Hello World"} - - name - Main - scope - source.haskell - tabTrigger - main - uuid - A3A65891-D126-4D2D-9E6B-E20ADE2EAA88 - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Right Arrow.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Right Arrow.tmSnippet deleted file mode 100644 index 984cc37b21..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/Right Arrow.tmSnippet +++ /dev/null @@ -1,18 +0,0 @@ - - - - - content - ${1:expression} -> ${0:expression} - keyEquivalent - ^. - name - Right Arrow - scope - source.haskell - tabTrigger - > - uuid - BAF52ED4-6A5B-4260-B5BC-93D2012200C8 - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Type Constraint.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Type Constraint.tmSnippet deleted file mode 100644 index ec100d9158..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/Type Constraint.tmSnippet +++ /dev/null @@ -1,16 +0,0 @@ - - - - - content - (${1:Class}) => $0 - name - Type Constraint - scope - source.haskell meta.function.type - tabTrigger - = - uuid - 1D72833B-ED9F-4A5E-9B72-F77E4FD09CE9 - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Type Sequence.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Type Sequence.tmSnippet deleted file mode 100644 index 9f18048c66..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/Type Sequence.tmSnippet +++ /dev/null @@ -1,16 +0,0 @@ - - - - - content - ${1:Type} -> ${0:Type} - name - Type Sequence - scope - source.haskell meta.function.type - tabTrigger - - - uuid - 17FC3207-9DC4-47F8-A9B3-B38FE5F84158 - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/Type Signature.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/Type Signature.tmSnippet deleted file mode 100644 index d2131304b4..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/Type Signature.tmSnippet +++ /dev/null @@ -1,16 +0,0 @@ - - - - - content - ${1:name} :: ${0:Type} - name - Type Signature - scope - source.haskell - tabTrigger - :: - uuid - 78719987-0091-407A-B5F1-68456A67130D - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/case _ of _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/case _ of _.tmSnippet deleted file mode 100644 index 242117a287..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/case _ of _.tmSnippet +++ /dev/null @@ -1,18 +0,0 @@ - - - - - content - case ${1:expression} of - ${2:pattern} -> ${3:expression} - ${4:otherwise} -> ${5:expression} - name - case … of … - scope - source.haskell - tabTrigger - case - uuid - DD1D7C05-BC60-4E62-BC8C-9230A32C2533 - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/class _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/class _.tmSnippet deleted file mode 100644 index 600b2abefa..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/class _.tmSnippet +++ /dev/null @@ -1,17 +0,0 @@ - - - - - content - class ${1:Class} where - ${0:definition} - name - class … - scope - source.haskell - tabTrigger - cla - uuid - 23F6173A-6390-46FF-865C-F59AB70E360A - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/data _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/data _.tmSnippet deleted file mode 100644 index d9b472d152..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/data _.tmSnippet +++ /dev/null @@ -1,16 +0,0 @@ - - - - - content - data ${1:Type} = ${0:Other} - name - data … - scope - source.haskell - tabTrigger - dat - uuid - 4C5EC5BB-6AE1-4825-AB50-1CF4741285E9 - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/deriving _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/deriving _.tmSnippet deleted file mode 100644 index 661ed416c1..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/deriving _.tmSnippet +++ /dev/null @@ -1,16 +0,0 @@ - - - - - content - deriving (${0:Class}) - name - deriving … - scope - source.haskell meta.type - tabTrigger - der - uuid - 3FA57615-871F-4465-B35D-781B2EA9F5FC - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/do _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/do _.tmSnippet deleted file mode 100644 index 9a9b84b620..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/do _.tmSnippet +++ /dev/null @@ -1,17 +0,0 @@ - - - - - content - do - ${1:return ${0:expression}} - name - do … - scope - source.haskell - tabTrigger - do - uuid - 397D02C1-A10B-4A83-8C05-6EB71E50D4CF - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/if _ then _ else _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/if _ then _ else _.tmSnippet deleted file mode 100644 index 81bd3785bd..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/if _ then _ else _.tmSnippet +++ /dev/null @@ -1,18 +0,0 @@ - - - - - content - if ${1:condition} - then ${2:expression} - else ${3:expression} - name - if … then … else … - scope - source.haskell - tabTrigger - if - uuid - 5F2050D1-1347-40CE-854E-24B2BF389849 - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/import _ hiding _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/import _ hiding _.tmSnippet deleted file mode 100644 index 88f6f5c388..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/import _ hiding _.tmSnippet +++ /dev/null @@ -1,16 +0,0 @@ - - - - - content - import ${1:Module}${2/.+/ hiding (/}${2:function}${2/.+/)/}$0 - name - import … hiding … - scope - source.haskell - tabTrigger - imph - uuid - 1BA6898C-E8C4-44C9-98F4-4823608FEFD1 - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/import _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/import _.tmSnippet deleted file mode 100644 index d90706884b..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/import _.tmSnippet +++ /dev/null @@ -1,16 +0,0 @@ - - - - - content - import ${1:Module}${2/.+/ (/}${2:function}${2/.+/)/}$0 - name - import … - scope - source.haskell - tabTrigger - imp - uuid - 85150C9B-A5F1-450A-BEBF-119091146957 - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/import qualified _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/import qualified _.tmSnippet deleted file mode 100644 index 6225658fce..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/import qualified _.tmSnippet +++ /dev/null @@ -1,16 +0,0 @@ - - - - - content - import qualified ${1:Module}${2/.+/ as /}${2:Mod}${3/.+/ (/}${3:function}${3/.+/)/}$0 - name - import qualified … - scope - source.haskell - tabTrigger - impq - uuid - 32BC2D63-AF02-4DBA-8A75-6A74E334FE0C - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/instance _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/instance _.tmSnippet deleted file mode 100644 index 3f725c17c2..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/instance _.tmSnippet +++ /dev/null @@ -1,17 +0,0 @@ - - - - - content - instance ${1:Class} ${2:Type} where - ${0:definition} - name - instance … - scope - source.haskell - tabTrigger - ins - uuid - 26F8FAFE-4438-4D3C-A453-AAB72FD0F719 - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/let _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/let _.tmSnippet deleted file mode 100644 index 4eb4f3330b..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/let _.tmSnippet +++ /dev/null @@ -1,18 +0,0 @@ - - - - - content - let - ${1:name} = ${2:expression} - in ${0:expression} - name - let … - scope - source.haskell - tabTrigger - let - uuid - 88C8A6FB-B06D-4386-BA33-51E28F64AD88 - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/newtype _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/newtype _.tmSnippet deleted file mode 100644 index f729337679..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/newtype _.tmSnippet +++ /dev/null @@ -1,16 +0,0 @@ - - - - - content - newtype ${1:Type} = ${0:Other} - name - newtype … - scope - source.haskell - tabTrigger - new - uuid - EFCBAB59-D574-454D-A05A-8928CF81947F - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/type _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/type _.tmSnippet deleted file mode 100644 index 1b33fc1538..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/type _.tmSnippet +++ /dev/null @@ -1,16 +0,0 @@ - - - - - content - type ${1:Type} = ${0:Other} - name - type … - scope - source.haskell - tabTrigger - typ - uuid - 3C25C0C7-D764-4BF8-9BFF-AE6954AF106D - - diff --git a/vendor/grammars/haskell.tmbundle/Snippets/where _.tmSnippet b/vendor/grammars/haskell.tmbundle/Snippets/where _.tmSnippet deleted file mode 100644 index c65c5eb59a..0000000000 --- a/vendor/grammars/haskell.tmbundle/Snippets/where _.tmSnippet +++ /dev/null @@ -1,17 +0,0 @@ - - - - - content - where - ${0:definitions} - name - where … - scope - source.haskell - tabTrigger - where - uuid - A6FD9AB4-8E7E-47A8-B17D-D82F47A0C495 - - diff --git a/vendor/grammars/haskell.tmbundle/Support/bin/haskelltype b/vendor/grammars/haskell.tmbundle/Support/bin/haskelltype deleted file mode 100755 index 4f1ca275cf..0000000000 --- a/vendor/grammars/haskell.tmbundle/Support/bin/haskelltype +++ /dev/null @@ -1,222 +0,0 @@ -#!/usr/bin/env ruby18 -w - -word = ARGV.first - -prelude = ' -(!!) :: [a] -> Int -> a ||||| [0,1,2] !! 1 = 1 -($) :: (a -> b) -> a -> b ||||| f x $ g y = f x (g y) -($!) :: (a -> b) -> (a -> b) ||||| -(&&) :: Bool -> Bool -> Bool ||||| Boolean \'and\' -(||) :: Bool -> Bool -> Bool ||||| Boolean \'or\' -(*) :: Num a => a -> a -> a ||||| Multiplication -(**) :: Floating a => a -> a -> a ||||| Exponentiation -(+) :: Num a => a -> a -> a ||||| Addition -(++) :: [a] -> [a] -> [a] ||||| Concatonation: "abc" ++ "def" = "abcdef" -(-) :: Num a => a -> a -> a ||||| Subtraction -(.) :: (b -> c) -> (a -> b) -> a -> c ||||| Function composition -(/) :: Fractional a => a -> a -> a ||||| Division -(/=) :: Eq a => a -> a -> Bool ||||| not equal -(<) :: Ord a => a -> a -> Bool ||||| Less Than -(<=) :: Ord a => a -> a -> Bool ||||| Less Than or Equal To -(==) :: Eq a => a -> a -> Bool ||||| Equality -(=<<) :: Monad a => (a -> m b) -> m a -> m b ||||| Monadic binding -(>) :: Ord a => a -> a -> Bool ||||| Greater Than -(>=) :: Ord a => a -> a -> Bool ||||| Greater Than or Equal To -(>>) :: Monad m => m a -> m b -> m b ||||| Monadic binding -(>>=) :: Monad m => m a -> (a -> m b) -> m b ||||| Monadic binding -(^) :: (Num a, Integral b) => a -> b -> a ||||| Exponentiation -(^^) :: (Fractional a, Integral b) => a -> b -> a ||||| negative exponent allowed -abs :: Num a => a -> a ||||| Absolute Value -acos :: Floating a => a -> a ||||| Arccosine -acosh :: Floating a => a -> a ||||| Hyperbolic Arccosine -all :: (a -> Bool) -> [a] -> Bool ||||| all (/= \'a\') "cba" = False -and :: [Bool] -> Bool ||||| and [True, True, True] = True -any :: (a -> Bool) -> [a] -> Bool ||||| any (== \'c\') "abc" = True -appendFile :: FilePath -> String -> IO () ||||| Appends String to FilePath -applyM :: Monad m => (a -> m b) -> m a -> m b ||||| -asTypeOf :: a -> a -> a ||||| Sort of a type cast -asin :: Floating a => a -> a ||||| Arcsine -asinh :: Floating a => a -> a ||||| Hyperbolic Arcsine -atan :: Floating a => a -> a ||||| Arctangent -atan2 :: RealFrac a => a -> a ||||| ArcTangent -atanh :: Floating a => a -> a ||||| Hyperbolic Arctangent -break :: (a -> Bool) -> [a] -> ([a], [a]) ||||| break (<2) [1,2,3] = ([1],[2,3]) -catch :: IO a -> (IOError -> IO a) -> IO a ||||| -ceiling :: (RealFrac a, Integral b) => a -> b ||||| -compare :: Ord a => a -> a -> Ordering ||||| -concat :: MonadPlus m => [m a] -> m a ||||| concat ["a","bc","d"] = "abcd" -concatMap :: (a -> [b]) -> [a] -> [b] ||||| -const :: a -> b -> a ||||| -cos :: Floating a => a -> a ||||| -cosh :: Floating a => a -> a ||||| -curry :: ((a, b) -> c) -> a -> b -> c ||||| -cycle :: [a] -> [a] ||||| cycle "abc" = "abcabcabc... -decodeFloat :: RealFloat a => a -> (Integer, Int) ||||| -div :: Integral a => a -> a -> a ||||| -divMod :: Integral a => a -> a -> (a, a) ||||| -drop :: Int -> [a] -> [a] ||||| drop 2 "abcd" = "cd" -dropWhile :: (a -> Bool) -> [a] -> [a] ||||| dropWhile (>3) [5,3,5] = [3,5] -elem :: Eq a => a -> [a] -> Bool ||||| \'a\' \'elem\' "abc" = True -encodeFloat :: RealFloat a => Integer -> Int -> a ||||| -enumFrom :: Enum a => a -> [a] ||||| [n..] -enumFromThen :: Enum a => a -> a -> [a] ||||| [m,n..] -enumFromThenTo :: Enum a => a -> a -> a -> [a] ||||| [m,n..o] -enumFromTo :: Enum a => a -> a -> [a] ||||| [m..n] -error :: String -> a ||||| -even :: Integral a => a -> Bool ||||| -exp :: Floating a => a -> a ||||| -exponent :: RealFloat a => a -> Int ||||| -fail :: Monad m => String -> m a ||||| -filter :: (a -> Bool) -> [a] -> [a] ||||| -flip :: (a -> b -> c) -> (b -> a -> c) ||||| -floatDigits :: RealFloat a => a -> Int ||||| -floatRadix :: RealFloat a => a -> Integer ||||| -floatRange :: RealFloat a => a -> (Int, Int) ||||| -floor :: (RealFrac a, Integral b) => a -> b ||||| -fmap :: Functor f => (a -> b) -> f a -> f b ||||| -foldl :: (a -> b -> a) -> a -> [b] -> a ||||| foldl (+) 0 [a,b,c] = ((0+a)+b)+c -foldl1 :: (a -> a -> a) -> [a] -> a ||||| foldl1 (+) [a,b,c] = (a+b)+c -foldr :: (a -> b -> b) -> b -> [a] -> b ||||| foldr (+) 0 [a,b,c] = a+(b+(c+0)) -foldr1 :: (a -> a -> a) -> [a] -> a ||||| foldr1 (+) [a,b,c] = a+(b+c) -fromEnum :: Enum a => a -> Int ||||| -fromInteger :: Num a => Integer -> a ||||| -fromIntegral :: (Integral a, Num b) => a -> b ||||| -fromRational :: Fractional a => Rational -> a ||||| -fst :: (a, b) -> a ||||| -gcd :: (Integral a) => a -> a -> a ||||| -getChar :: IO Char ||||| eof generates an IOError -getContents :: IO String ||||| -getLine :: IO String ||||| eof generates an IOError -head :: [a] -> a ||||| -id :: a -> a ||||| -init :: [a] -> [a] ||||| init "abcd" = "abc" -interact :: (String -> String) -> IO () ||||| -ioError :: IOError -> IO a ||||| -isDenormalized :: RealFloat a => a -> Bool ||||| -isIEEE :: RealFloat a => a -> Bool ||||| -isInfinite :: RealFloat a => a -> Bool ||||| -isNaN :: RealFloat a => a -> Bool ||||| -isNegativeZero :: RealFloat a => a -> Bool ||||| -iterate :: (a -> a) -> a -> [a] ||||| iterate (++ " ") "" = ["", " ", " ",...] -last :: [a] -> a ||||| last "abcde" = "e" -lcm :: Integral a => a -> a -> a ||||| -length :: [a] -> Int ||||| length "Abc" = 3 -lex :: ReadS String ||||| lex "abc def" = [("abc"," def")] -lines :: String -> [String] ||||| -log :: Floating a => a -> a ||||| -logBase :: Floating a => a -> a -> a ||||| -lookup :: Eq a => a -> [(a, b)] -> Maybe b ||||| -map :: (a -> b) -> [a] -> [b] ||||| -mapM :: Monad m => (a -> m b) -> [a] -> m [b] ||||| -mapM_ :: Monad m => (a -> m b) -> [a] -> m () ||||| -max :: Ord a => a -> a -> a ||||| -maxBound :: Bounded a => a ||||| -maximum :: Ord a => [a] -> a ||||| -maybe :: b -> (a -> b) -> Maybe a -> b ||||| maybe 0 (+1) (Just 1) = 2 -min :: Ord a => a -> a -> a ||||| -minBound :: Bounded a => a ||||| -minimum :: Ord a => [a] -> a ||||| -mod :: Integral a => a -> a -> a ||||| -negate :: Num a => a -> a ||||| -not :: Bool -> Bool ||||| -notElem :: Eq a => a -> [a] -> Bool ||||| -null :: [a] -> Bool ||||| -odd :: Integral a => a -> Bool ||||| -or :: [Bool] -> Bool ||||| -otherwise :: Bool ||||| -pi :: Floating a => a ||||| -pred :: Enum a => a -> a ||||| pred True = False -print :: Show a => IO () ||||| adds a newline -product :: Num a => [a] -> a ||||| -properFraction :: (RealFrac a, Integral b) => a -> (b, a) ||||| -putChar :: Char -> IO () ||||| -putStr :: String -> IO () ||||| -putStrLn :: String -> IO () ||||| adds a newline -quot :: Integral a => a -> a -> a ||||| -quotRem :: Integral a => a -> a -> (a, a) ||||| -read :: Read a => String -> a ||||| -readFile :: FilePath -> IO String ||||| -readIO :: Read a => String -> IO a ||||| fails with IOError -readList :: Read a => ReadS [a] ||||| -readLn :: Read a => IO a ||||| -readParen :: Bool -> ReadS a -> ReadS a ||||| -reads :: Read a => ReadS a ||||| reads "1 2" :: [(Int,String)] = [(1," 2")] -readsPrec :: Read a => Int -> ReadS a ||||| -realToFrac :: (Real a, Fractional b) => a -> b ||||| -recip :: Fractional a => a -> a ||||| -rem :: Integral a => a -> a -> a ||||| -repeat :: a -> [a] ||||| repeat \'a\' = "aaaaaaaaa..." -replicate :: Int -> a -> [a] ||||| replicate 4 \'a\' = "aaaa" -return :: Monad m => a -> m a ||||| -reverse :: [a] -> [a] ||||| reverse "abc" = "cba" -round :: (RealFrac a, Integral b) => a -> b ||||| -scaleFloat :: RealFloat a => Int -> a -> a ||||| -scanl :: (a -> b -> a) -> a -> [b] -> [a] ||||| scanl (+) 0 [1,2,3] = [0,1,3,6] -scanl1 :: (a -> a -> a) -> [a] -> [a] ||||| scanl1 (+) [1,2,3] = [1,3,6] -scanr :: (a -> b -> b) -> b -> [a] -> [b] ||||| scanr (+) 0 [1,2,3] = [6,5,3,0] -scanr1 :: (a -> a -> a) -> [a] -> [a] ||||| scanr1 (+) [1,2,3] = [6,5,3] -seq :: a -> b -> b ||||| -sequence :: Monad m => [m a] -> m [a] ||||| -sequence_ :: Monad m => [m a] -> m () ||||| do operations in sequence -show :: Show a => a -> String ||||| -showChar :: Char -> ShowS ||||| -showList :: Show a => [a] -> ShowS ||||| -showParen :: Bool -> ShowS -> ShowS ||||| -showString :: String -> ShowS ||||| -shows :: Show a => a -> ShowS ||||| -showsPrec :: Show a => Int -> a -> ShowS ||||| -significand :: RealFloat a => a -> a ||||| -signum :: Num a => a -> a ||||| -sin :: Floating a => a -> a ||||| -sinh :: Floating a => a -> a ||||| -snd :: (a, b) -> b ||||| -span :: (a -> Bool) -> [a] -> ([a], [a]) ||||| span isAlpha "ab cd" = ("ab"," cd") -splitAt :: Int -> [a] -> ([a], [a]) ||||| splitAt 2 "abcdef" = ("ab","cdef") -sqrt :: Floating a => a -> a ||||| -subtract :: Num a => a -> a -> a ||||| -succ :: Enum a => a -> a ||||| succ False = True -sum :: Num a => [a] -> a ||||| sum [1,2,3] = 6 -tail :: [a] -> [a] ||||| tail "abc" = "bc" -take :: Int -> [a] -> [a] ||||| take 3 "abcde" = "abc" -takeWhile :: (a -> Bool) -> [a] -> [a] ||||| takeWhile (> 2) [3,2,1] = [3] -tan :: Floating a => a -> a ||||| -tanh :: Floating a => a -> a ||||| -toEnum :: Enum a => Int -> a ||||| toEnum 0 :: Bool = False -toInteger :: Integral a => a -> Integer ||||| -toRational :: Real a => a -> Rational ||||| -truncate :: (RealFrac a, Integral b) => a -> b ||||| -uncurry :: (a -> b -> c) -> ((a, b) -> c) ||||| -undefined :: a ||||| -unlines :: [String] -> String ||||| -until :: (a -> Bool) -> (a -> a) -> a -> a ||||| until (> 3) (+ 2) 0 = 4 -unwords :: [String] -> String ||||| -unzip :: [(a, b)] -> ([a], [b]) ||||| unzip [(\'a\',\'b\'),(\'c\',\'d\')] = ("ac",bd") -unzip3 :: [(a, b, c)] -> ([a], [b], [c]) ||||| -userError :: String -> IOError ||||| -words :: String -> [String] ||||| words "ab d as+3" = ["ab","d","as+3"] -writeFile :: FilePath -> String -> IO () ||||| -zip :: [a] -> [b] -> [(a, b)] ||||| zip "abc" "de" = [(\'a\',\'d\'), (\'b\',e\')] -zip3 :: [a] -> [b] -> [c] -> [(a, b, c)] ||||| -zipWith :: (a -> b -> c) -> [a] -> [b] -> [c] ||||| zipWith (+) [1,2] [3,4] = [4,6] -zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d] |||||' - -lookup = prelude.strip.split("\n").inject(Hash.new) { |h,l| - name, desc = l.split("::") - h[name.strip] = desc.split("|||||").map {|a| a.strip} - h -} - -if lookup[word] - puts lookup[word] -else - STDIN.each do |line| - name, desc = line.strip.split("::") - if name and desc - if name.split(",").map{|s| s.strip}.include?(word) - puts desc.strip - exit - end - end - end - puts "☿ It is a mystery ☿" -end diff --git a/vendor/grammars/haskell.tmbundle/Syntaxes/Haskell.plist b/vendor/grammars/haskell.tmbundle/Syntaxes/Haskell.plist deleted file mode 100644 index 6c8ae15127..0000000000 --- a/vendor/grammars/haskell.tmbundle/Syntaxes/Haskell.plist +++ /dev/null @@ -1,711 +0,0 @@ - - - - - fileTypes - - hs - - keyEquivalent - ^~H - name - Haskell - patterns - - - captures - - 1 - - name - punctuation.definition.entity.haskell - - 2 - - name - punctuation.definition.entity.haskell - - - comment - In case this regex seems unusual for an infix operator, note that Haskell allows any ordinary function application (elem 4 [1..10]) to be rewritten as an infix expression (4 `elem` [1..10]). - match - (`)[\p{Ll}_][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*(`) - name - keyword.operator.function.infix.haskell - - - match - \(\) - name - constant.language.unit.haskell - - - match - \[\] - name - constant.language.empty-list.haskell - - - begin - \b(module)\b - beginCaptures - - 1 - - name - keyword.other.haskell - - - end - \b(where)\b - endCaptures - - 1 - - name - keyword.other.haskell - - - name - meta.declaration.module.haskell - patterns - - - include - #module_name - - - include - #module_exports - - - match - [a-z]+ - name - invalid - - - - - begin - \b(class)\b - beginCaptures - - 1 - - name - keyword.other.haskell - - - end - \b(where)\b - endCaptures - - 1 - - name - keyword.other.haskell - - - name - meta.declaration.class.haskell - patterns - - - match - \b(Monad|Functor|Eq|Ord|Read|Show|Num|(Frac|Ra)tional|Enum|Bounded|Real(Frac|Float)?|Integral|Floating)\b - name - support.class.prelude.haskell - - - match - [\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']* - name - entity.other.inherited-class.haskell - - - match - \b[\p{Ll}_][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']* - name - variable.other.generic-type.haskell - - - - - begin - \b(instance)\b - beginCaptures - - 1 - - name - keyword.other.haskell - - - end - \b(where)\b|$ - endCaptures - - 1 - - name - keyword.other.haskell - - - name - meta.declaration.instance.haskell - patterns - - - include - #type_signature - - - - - begin - \b(import)\b - beginCaptures - - 1 - - name - keyword.other.haskell - - - end - ($|;|(?=--)) - name - meta.import.haskell - patterns - - - match - (qualified|as|hiding) - name - keyword.other.haskell - - - include - #module_name - - - include - #module_exports - - - - - begin - (deriving)\s*\( - beginCaptures - - 1 - - name - keyword.other.haskell - - - end - \) - name - meta.deriving.haskell - patterns - - - match - \b[\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']* - name - entity.other.inherited-class.haskell - - - - - match - \b(deriving|where|data|type|case|of|let|in|newtype|default)\b - name - keyword.other.haskell - - - match - \binfix[lr]?\b - name - keyword.operator.haskell - - - match - \b(do|if|then|else)\b - name - keyword.control.haskell - - - comment - Floats are always decimal - match - \b([0-9]+\.[0-9]+([eE][+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+)\b - name - constant.numeric.float.haskell - - - match - \b([0-9]+|0([xX][0-9a-fA-F]+|[oO][0-7]+))\b - name - constant.numeric.haskell - - - captures - - 1 - - name - punctuation.definition.preprocessor.c - - - comment - In addition to Haskell's "native" syntax, GHC permits the C preprocessor to be run on a source file. - match - ^\s*(#)\s*\w+ - name - meta.preprocessor.c - - - include - #pragma - - - begin - " - beginCaptures - - 0 - - name - punctuation.definition.string.begin.haskell - - - end - " - endCaptures - - 0 - - name - punctuation.definition.string.end.haskell - - - name - string.quoted.double.haskell - patterns - - - match - \\(NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\"'\&]) - name - constant.character.escape.haskell - - - match - \\o[0-7]+|\\x[0-9A-Fa-f]+|\\[0-9]+ - name - constant.character.escape.octal.haskell - - - match - \^[A-Z@\[\]\\\^_] - name - constant.character.escape.control.haskell - - - begin - \\\s - beginCaptures - - 0 - - name - constant.character.escape.begin.haskell - - - end - \\ - endCaptures - - 0 - - name - constant.character.escape.end.haskell - - - patterns - - - match - \S+ - name - invalid.illegal.character-not-allowed-here.haskell - - - - - - - captures - - 1 - - name - punctuation.definition.string.begin.haskell - - 2 - - name - constant.character.escape.haskell - - 3 - - name - constant.character.escape.octal.haskell - - 4 - - name - constant.character.escape.hexadecimal.haskell - - 5 - - name - constant.character.escape.control.haskell - - 6 - - name - punctuation.definition.string.end.haskell - - - match - (?x) - (') - (?: - [\ -\[\]-~] # Basic Char - | (\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE - |DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS - |US|SP|DEL|[abfnrtv\\\"'\&])) # Escapes - | (\\o[0-7]+) # Octal Escapes - | (\\x[0-9A-Fa-f]+) # Hexadecimal Escapes - | (\^[A-Z@\[\]\\\^_]) # Control Chars - ) - (') - - name - string.quoted.single.haskell - - - begin - ^\s*(?<fn>(?:[\p{Ll}_][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*|\((?!--+\))((?![(),;\[\]`{}_"'])[\p{S}\p{P}])+\))(?:\s*,\s*\g<fn>)?)\s*(::) - beginCaptures - - 1 - - patterns - - - match - [\p{Ll}_][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']* - name - entity.name.function.haskell - - - include - #infix_op - - - - 2 - - name - keyword.other.double-colon.haskell - - - end - $\n? - name - meta.function.type-declaration.haskell - patterns - - - include - #type_signature - - - - - match - \b(Just|Nothing|Left|Right|True|False|LT|EQ|GT|\(\)|\[\])\b - name - support.constant.haskell - - - match - \b[\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']* - name - constant.other.haskell - - - include - #comments - - - match - \b(abs|acos|acosh|all|and|any|appendFile|applyM|asTypeOf|asin|asinh|atan|atan2|atanh|break|catch|ceiling|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|div|divMod|drop|dropWhile|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromEnum|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|head|id|init|interact|ioError|isDenormalized|isIEEE|isInfinite|isNaN|isNegativeZero|iterate|last|lcm|length|lex|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|odd|or|otherwise|pi|pred|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|read|readFile|readIO|readList|readLn|readParen|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showList|showParen|showString|shows|showsPrec|significand|signum|sin|sinh|snd|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|toEnum|toInteger|toRational|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\b(?!') - name - support.function.prelude.haskell - - - include - #infix_op - - - comment - In case this regex seems overly general, note that Haskell permits the definition of new operators which can be nearly any string of punctuation characters, such as $%^&*. - match - ((?![(),;\[\]`{}_"'])[\p{S}\p{P}])+ - name - keyword.operator.haskell - - - match - , - name - punctuation.separator.comma.haskell - - - repository - - block_comment - - applyEndPatternLast - 1 - begin - \{-(?!#) - captures - - 0 - - name - punctuation.definition.comment.haskell - - - end - -\} - name - comment.block.haskell - patterns - - - include - #block_comment - - - - comments - - patterns - - - begin - (^[ \t]+)?(?=--+((?![\p{S}\p{P}])|[(),;\[\]`{}_"'])) - beginCaptures - - 1 - - name - punctuation.whitespace.comment.leading.haskell - - - comment - Operators may begin with '--' as long as they are not entirely composed of '-' characters. This means comments can't be immediately followed by an allowable operator character. - end - (?!\G) - patterns - - - begin - -- - beginCaptures - - 0 - - name - punctuation.definition.comment.haskell - - - end - \n - name - comment.line.double-dash.haskell - - - - - include - #block_comment - - - - infix_op - - comment - An operator cannot be composed entirely of '-' characters; instead, it should be matched as a comment. - match - (\((?!--+\))((?![(),;\[\]`{}_"'])[\p{S}\p{P}])+\)|\(,+\)) - name - entity.name.function.infix.haskell - - module_exports - - begin - \( - end - \) - name - meta.declaration.exports.haskell - patterns - - - match - \b[\p{Ll}_][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']* - name - entity.name.function.haskell - - - match - \b[\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']* - name - storage.type.haskell - - - match - , - name - punctuation.separator.comma.haskell - - - include - #infix_op - - - comment - So named because I don't know what to call this. - match - \(.*?\) - name - meta.other.unknown.haskell - - - - module_name - - match - (?<conid>[\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*(\.\g<conid>)?) - name - support.other.module.haskell - - pragma - - begin - \{-# - end - #-\} - name - meta.preprocessor.haskell - patterns - - - match - \b(LANGUAGE|UNPACK|INLINE)\b - name - keyword.other.preprocessor.haskell - - - - type_signature - - patterns - - - captures - - 1 - - name - entity.other.inherited-class.haskell - - 2 - - name - variable.other.generic-type.haskell - - 3 - - name - keyword.other.big-arrow.haskell - - - match - \(\s*([\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*)\s+([\p{Ll}_][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*)\)\s*(=>) - name - meta.class-constraint.haskell - - - include - #pragma - - - match - -> - name - keyword.other.arrow.haskell - - - match - => - name - keyword.other.big-arrow.haskell - - - match - \b(Int(eger)?|Maybe|Either|Bool|Float|Double|Char|String|Ordering|ShowS|ReadS|FilePath|IO(Error)?)\b - name - support.type.prelude.haskell - - - match - \b[\p{Ll}_][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']* - name - variable.other.generic-type.haskell - - - match - \b[\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']* - name - storage.type.haskell - - - match - \(\) - name - support.constant.unit.haskell - - - include - #comments - - - - - scopeName - source.haskell - uuid - 5C034675-1F6D-497E-8073-369D37E2FD7D - - diff --git a/vendor/grammars/haskell.tmbundle/Syntaxes/Literate Haskell.plist b/vendor/grammars/haskell.tmbundle/Syntaxes/Literate Haskell.plist deleted file mode 100644 index d819ef0371..0000000000 --- a/vendor/grammars/haskell.tmbundle/Syntaxes/Literate Haskell.plist +++ /dev/null @@ -1,92 +0,0 @@ - - - - - fileTypes - - lhs - - keyEquivalent - ^~H - name - Literate Haskell - patterns - - - begin - ^((\\)begin)({)code(})(\s*\n)? - captures - - 1 - - name - support.function.be.latex - - 2 - - name - punctuation.definition.function.latex - - 3 - - name - punctuation.definition.arguments.begin.latex - - 4 - - name - punctuation.definition.arguments.end.latex - - - contentName - source.haskell.embedded.latex - end - ^((\\)end)({)code(}) - name - meta.embedded.block.haskell.latex - patterns - - - include - source.haskell - - - - - begin - ^(> ) - beginCaptures - - 1 - - name - punctuation.definition.bird-track.haskell - - - comment - This breaks type signature detection for now, but it's better than having no highlighting whatsoever. - contentName - source.haskell - end - $ - name - meta.embedded.haskell - patterns - - - include - source.haskell - - - - - include - text.tex.latex - - - scopeName - text.tex.latex.haskell - uuid - 439807F5-7129-487D-B5DC-95D5272B43DD - - diff --git a/vendor/grammars/haskell.tmbundle/info.plist b/vendor/grammars/haskell.tmbundle/info.plist deleted file mode 100644 index 8b942e8fe6..0000000000 --- a/vendor/grammars/haskell.tmbundle/info.plist +++ /dev/null @@ -1,58 +0,0 @@ - - - - - contactEmailRot13 - wnzvf@37fvtanyf.pbz - contactName - Jamis Buck - description - Support for <a href="http://www.haskell.org/">Haskell</a>, a general purpose, purely functional programming language featuring static typing, higher order functions, polymorphism, type classes, and monadic effects. - mainMenu - - items - - 3B083BE7-9812-4F06-A758-CCAD9514E797 - 2242C46C-153E-4EEB-B80B-A5398559D759 - ------------------------------------ - 6B723007-D4EE-476B-8282-76230C559D5A - 50D814AE-D850-4C97-AF3E-1FDE4366C6A3 - ------------------------------------ - FA4AA254-EB7D-4B43-AC67-066AA9E8E8D9 - ------------------------------------ - A3A65891-D126-4D2D-9E6B-E20ADE2EAA88 - 21646767-DD1B-4BA9-BF3B-15968F8672AB - 18F43074-566D-4AD9-8DCE-9C26B8516B64 - CE424A97-E486-4DE7-9328-C6ADB99B4ABD - ------------------------------------ - 89248B78-C2C6-48EE-BC47-CF8E9A5EA0E7 - - submenus - - - name - Haskell - ordering - - 3B083BE7-9812-4F06-A758-CCAD9514E797 - 2242C46C-153E-4EEB-B80B-A5398559D759 - 6B723007-D4EE-476B-8282-76230C559D5A - 50D814AE-D850-4C97-AF3E-1FDE4366C6A3 - FA4AA254-EB7D-4B43-AC67-066AA9E8E8D9 - A3A65891-D126-4D2D-9E6B-E20ADE2EAA88 - 21646767-DD1B-4BA9-BF3B-15968F8672AB - 18F43074-566D-4AD9-8DCE-9C26B8516B64 - CE424A97-E486-4DE7-9328-C6ADB99B4ABD - 89248B78-C2C6-48EE-BC47-CF8E9A5EA0E7 - 4B154C05-D107-4316-9AAD-43A3DCF1860A - 5C034675-1F6D-497E-8073-369D37E2FD7D - 439807F5-7129-487D-B5DC-95D5272B43DD - E3994307-4D9E-44D6-832E-52C244F1CDF3 - 39417FB9-B85C-4213-BB1D-C19BCDD4E487 - 0C39B945-E2C0-4E43-8A5B-332F6FA73C67 - FBF9D932-D5CE-4EC4-9162-122E511C8627 - - uuid - 118557A4-4FEF-406D-A68E-BD191D9CBC83 - - diff --git a/vendor/grammars/sublime_man_page_support/.gitignore b/vendor/grammars/sublime_man_page_support/.gitignore deleted file mode 100644 index 91fa95c6c4..0000000000 --- a/vendor/grammars/sublime_man_page_support/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.cache -*.pyc diff --git a/vendor/grammars/sublime_man_page_support/LICENSE b/vendor/grammars/sublime_man_page_support/LICENSE deleted file mode 100644 index 200d1262f3..0000000000 --- a/vendor/grammars/sublime_man_page_support/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 carsonoid - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/grammars/sublime_man_page_support/Main.sublime-menu b/vendor/grammars/sublime_man_page_support/Main.sublime-menu deleted file mode 100644 index f1d0110f4f..0000000000 --- a/vendor/grammars/sublime_man_page_support/Main.sublime-menu +++ /dev/null @@ -1,23 +0,0 @@ -[ - { - "id": "tools", - "children": - [ - { - "id": "packages", - "caption": "Packages", - "children": - [ - { - "caption": "Man Page Editing", - "id": "man_page_dev", - "children": - [ - { "caption": "New Man Page", "command": "man_page_new" } - ] - } - ] - } - ] - } -] diff --git a/vendor/grammars/sublime_man_page_support/ManPage.sublime-build b/vendor/grammars/sublime_man_page_support/ManPage.sublime-build deleted file mode 100644 index 0c5c11ed5b..0000000000 --- a/vendor/grammars/sublime_man_page_support/ManPage.sublime-build +++ /dev/null @@ -1,4 +0,0 @@ -{ - "target": "man_page_preview", - "selector": "text.groff" -} diff --git a/vendor/grammars/sublime_man_page_support/ManPage.sublime-commands b/vendor/grammars/sublime_man_page_support/ManPage.sublime-commands deleted file mode 100644 index 7bfeb83d49..0000000000 --- a/vendor/grammars/sublime_man_page_support/ManPage.sublime-commands +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "caption": "Create New Man Page", - "command": "man_page_new" - }, - { - "caption": "Preview Current Man Page", - "command": "man_page_preview" - } -] diff --git a/vendor/grammars/sublime_man_page_support/README.md b/vendor/grammars/sublime_man_page_support/README.md deleted file mode 100644 index 6cf11c86a0..0000000000 --- a/vendor/grammars/sublime_man_page_support/README.md +++ /dev/null @@ -1,10 +0,0 @@ -#Sublime Man Page Support - -Sublime Text 2 Support for Unix style manual pages. - -## Includes: - - * groff syntax highlighting - * command to create a new man page skeleton - * snippet that will add useful macros to your man pages on older systems (must come before man page content) - * Preview command, build-system, and syntax diff --git a/vendor/grammars/sublime_man_page_support/groff-enhancements.sublime-snippet b/vendor/grammars/sublime_man_page_support/groff-enhancements.sublime-snippet deleted file mode 100644 index ce944f8cd7..0000000000 --- a/vendor/grammars/sublime_man_page_support/groff-enhancements.sublime-snippet +++ /dev/null @@ -1,201 +0,0 @@ - - 1 \\ -. nx -. -.\\" Check whether we are using grohtml. -.nr mH 0 -.if \\n(.g \\ -. if '\\*(.T'html' \\ -. nr mH 1 -. -. -.\\" Map mono-width fonts to standard fonts for groff's TTY device. -.if n \\{\\ -. do ftr CR R -. do ftr CI I -. do ftr CB B -.\\} -. -.\\" groff has glyph entities for angle brackets. -.ie \\n(.g \\{\\ -. ds la \\(la\\" -. ds ra \\(ra\\" -.\\} -.el \\{\\ -. ds la <\\" -. ds ra >\\" -. \\" groff's man macros control hyphenation with this register. -. nr HY 1 -.\\} -. -.nr mS 0 -. -. -.\\" Declare start of command synopsis. Sets up hanging indentation. -.de SY -. ie !\\\\n(mS \\{\\ -. nh -. nr mS 1 -. nr mA \\\\n(.j -. ad l -. nr mI \\\\n(.i -. \\} -. el \\{\\ -. br -. ns -. \\} -. -. nr mT \\w'\\fB\\\\\$1\\fP\\ ' -. HP \\\\n(mTu -. B "\\\\\$1" -.. -. -. -.\\" End of command synopsis. Restores adjustment. -.de YS -. in \\\\n(mIu -. ad \\\\n(mA -. hy \\\\n(HY -. nr mS 0 -.. -. -. -.\\" Declare optional option. -.de OP -. ie \\\\n(.\$-1 \\ -. RI "[\\fB\\\\\$1\\fP" "\\ \\\\\$2" "]" -. el \\ -. RB "[" "\\\\\$1" "]" -.. -. -. -.\\" Start URL. -.de UR -. ds m1 \\\\\$1\\" -. nh -. if \\\\n(mH \\{\\ -. \\" Start diversion in a new environment. -. do ev URL-div -. do di URL-div -. \\} -.. -. -. -.\\" End URL. -.de UE -. ie \\\\n(mH \\{\\ -. br -. di -. ev -. -. \\" Has there been one or more input lines for the link text? -. ie \\\\n(dn \\{\\ -. do HTML-NS "" -. \\" Yes, strip off final newline of diversion and emit it. -. do chop URL-div -. do URL-div -\\c -. do HTML-NS -. \\} -. el \\ -. do HTML-NS "\\\\*(m1" -\\&\\\\\$*\\" -. \\} -. el \\ -\\\\*(la\\\\*(m1\\\\*(ra\\\\\$*\\" -. -. hy \\\\n(HY -.. -. -. -.\\" Start email address. -.de MT -. ds m1 \\\\\$1\\" -. nh -. if \\\\n(mH \\{\\ -. \\" Start diversion in a new environment. -. do ev URL-div -. do di URL-div -. \\} -.. -. -. -.\\" End email address. -.de ME -. ie \\\\n(mH \\{\\ -. br -. di -. ev -. -. \\" Has there been one or more input lines for the link text? -. ie \\\\n(dn \\{\\ -. do HTML-NS "" -. \\" Yes, strip off final newline of diversion and emit it. -. do chop URL-div -. do URL-div -\\c -. do HTML-NS -. \\} -. el \\ -. do HTML-NS "\\\\*(m1" -\\&\\\\\$*\\" -. \\} -. el \\ -\\\\*(la\\\\*(m1\\\\*(ra\\\\\$*\\" -. -. hy \\\\n(HY -.. -. -. -.\\" Continuation line for .TP header. -.de TQ -. br -. ns -. TP \\\\\$1\\" no doublequotes around argument! -.. -. -. -.\\" Start example. -.de EX -. nr mE \\\\n(.f -. nf -. nh -. ft CW -.. -. -. -.\\" End example. -.de EE -. ft \\\\n(mE -. fi -. hy \\\\n(HY -.. -. -. -.\\" Start display. -.de DS -. \\" XXX to be written -.. -. -. -.\\" End display. -.de DE -. \\" XXX to be written -.. -. -.\\" EOF - -]]> - - diff --git a/vendor/grammars/sublime_man_page_support/man-groff.JSON-tmLanguage b/vendor/grammars/sublime_man_page_support/man-groff.JSON-tmLanguage deleted file mode 100644 index 70410e737f..0000000000 --- a/vendor/grammars/sublime_man_page_support/man-groff.JSON-tmLanguage +++ /dev/null @@ -1,85 +0,0 @@ -{ "name": "Man Page (groff/troff)", - "scopeName": "text.groff", - "fileTypes": ["man", "groff"], - "patterns": [ - { - "name": "comment.macro.text.groff", - "match": "^\\.\\\\\".*$", - "comment": "comments" - }, - { - "name": "uri.macro.text.groff", - "begin": "^(\\.UR)\\b(.*)$", - "beginCaptures": { - "1": { "name": "keyword.text.groff" }, - "2": { "name": "constant.other.text.groff" } - }, - "end": "^(\\.UE)", - "endCaptures": { - "1": { "name": "keyword.text.groff" } - }, - "patterns": [ - { - "name": "string.text.groff", - "match": "." - } - ], - "comment": "email address macro" - }, - { - "name": "emailaddress.macro.text.groff", - "begin": "^(\\.MT)\\b(.*)$", - "beginCaptures": { - "1": { "name": "keyword.text.groff" }, - "2": { "name": "constant.other.text.groff" } - }, - "end": "^(\\.ME)", - "endCaptures": { - "1": { "name": "keyword.text.groff" } - }, - "patterns": [ - { - "name": "string.text.groff", - "match": "." - } - ], - "comment": "email address macro" - }, - { - "name": "option.macro.text.groff", - "match": "^(\\.OP)\\s([^\\s]+)\\s?(.*)$", - "captures": { - "1": { "name": "keyword.text.groff" }, - "2": { "name": "support.constant.text.groff" }, - "3": { "name": "string.text.groff" } - }, - "comment": "text style macros" - }, - { - "name": "style.macro.text.groff", - "begin": "^(\\.SM|\\.SB|\\.BI|\\.IB|\\.RI|\\.IR|\\.BR|\\.RB|\\.B|\\.I)\\b", - "beginCaptures": { - "1": { "name": "keyword.text.groff" } - }, - "end": "$", - "patterns": [ - { - "name": "string.text.groff", - "match": ".", - "comment": "catch-all" - } - ], - "comment": "text style macros" - }, - { - "name": "macro.text.groff", - "match": "^(\\.[a-zA-Z]*\\s?)(\\s?.+)?$", - "captures": { - "1": { "name": "keyword.text.groff" }, - "2": { "name": "entity.text.groff" } - }, - "comment": "marco catch-all" - } - ], - "uuid": "9f281c08-ae81-4ccd-b910-a67b17d1952e" -} diff --git a/vendor/grammars/sublime_man_page_support/man-groff.tmLanguage b/vendor/grammars/sublime_man_page_support/man-groff.tmLanguage deleted file mode 100644 index 16b01d0d93..0000000000 --- a/vendor/grammars/sublime_man_page_support/man-groff.tmLanguage +++ /dev/null @@ -1,184 +0,0 @@ - - - - - fileTypes - - man - groff - - name - Man Page (groff/troff) - patterns - - - comment - comments - match - ^\.\\".*$ - name - comment.macro.text.groff - - - begin - ^(\.UR)\b(.*)$ - beginCaptures - - 1 - - name - keyword.text.groff - - 2 - - name - constant.other.text.groff - - - comment - email address macro - end - ^(\.UE) - endCaptures - - 1 - - name - keyword.text.groff - - - name - uri.macro.text.groff - patterns - - - match - . - name - string.text.groff - - - - - begin - ^(\.MT)\b(.*)$ - beginCaptures - - 1 - - name - keyword.text.groff - - 2 - - name - constant.other.text.groff - - - comment - email address macro - end - ^(\.ME) - endCaptures - - 1 - - name - keyword.text.groff - - - name - emailaddress.macro.text.groff - patterns - - - match - . - name - string.text.groff - - - - - captures - - 1 - - name - keyword.text.groff - - 2 - - name - support.constant.text.groff - - 3 - - name - string.text.groff - - - comment - text style macros - match - ^(\.OP)\s([^\s]+)\s?(.*)$ - name - option.macro.text.groff - - - begin - ^(\.SM|\.SB|\.BI|\.IB|\.RI|\.IR|\.BR|\.RB|\.B|\.I)\b - beginCaptures - - 1 - - name - keyword.text.groff - - - comment - text style macros - end - $ - name - style.macro.text.groff - patterns - - - comment - catch-all - match - . - name - string.text.groff - - - - - captures - - 1 - - name - keyword.text.groff - - 2 - - name - entity.text.groff - - - comment - marco catch-all - match - ^(\.[a-zA-Z]*\s?)(\s?.+)?$ - name - macro.text.groff - - - scopeName - text.groff - uuid - 9f281c08-ae81-4ccd-b910-a67b17d1952e - - diff --git a/vendor/grammars/sublime_man_page_support/man-preview.JSON-tmLanguage b/vendor/grammars/sublime_man_page_support/man-preview.JSON-tmLanguage deleted file mode 100644 index 0d9d524b0c..0000000000 --- a/vendor/grammars/sublime_man_page_support/man-preview.JSON-tmLanguage +++ /dev/null @@ -1,32 +0,0 @@ -{ "name": "Man Page Preview", - "scopeName": "source.man", - "fileTypes": ["man"], - "uuid": "f3ff3e8d-4f68-432c-af44-e00d6e15c81a", - "patterns": [ - { - "name": "string.source.man", - "match": "^(man\\((\\d+)\\))(.+)(man\\((\\d+)\\).*)$", - "captures": { - "0": { "name": "string.source.man" }, - "2": { "name": "constant.source.man" }, - "3": { "name": "keyword.source.man" }, - "5": { "name": "constant.source.man" } - } - }, - { - "name": "string.source.man", - "match": "^(\\d\\.\\d(\\.\\d)?)(.+)(man\\((\\d+)\\).*)$", - "captures": { - "1": { "name": "constant.source.man" }, - "2": { "name": "storage.source.man" }, - "3": { "name": "keyword.source.man" }, - "4": { "name": "string.source.man" }, - "5": { "name": "constant.source.man" } - } - }, - { - "name": "keyword.source.man", - "match": "^[A-Z][A-Z\\s]+\\s$" - } - ] -} \ No newline at end of file diff --git a/vendor/grammars/sublime_man_page_support/man-preview.tmLanguage b/vendor/grammars/sublime_man_page_support/man-preview.tmLanguage deleted file mode 100644 index 0d7690336d..0000000000 --- a/vendor/grammars/sublime_man_page_support/man-preview.tmLanguage +++ /dev/null @@ -1,88 +0,0 @@ - - - - - fileTypes - - man - - name - Man Page Preview - patterns - - - captures - - 0 - - name - string.source.man - - 2 - - name - constant.source.man - - 3 - - name - keyword.source.man - - 5 - - name - constant.source.man - - - match - ^(man\((\d+)\))(.+)(man\((\d+)\).*)$ - name - string.source.man - - - captures - - 1 - - name - constant.source.man - - 2 - - name - storage.source.man - - 3 - - name - keyword.source.man - - 4 - - name - string.source.man - - 5 - - name - constant.source.man - - - match - ^(\d\.\d(\.\d)?)(.+)(man\((\d+)\).*)$ - name - string.source.man - - - match - ^[A-Z][A-Z\s]+\s$ - name - keyword.source.man - - - scopeName - source.man - uuid - f3ff3e8d-4f68-432c-af44-e00d6e15c81a - - diff --git a/vendor/grammars/sublime_man_page_support/new_page.py b/vendor/grammars/sublime_man_page_support/new_page.py deleted file mode 100644 index 8a8a46ea1a..0000000000 --- a/vendor/grammars/sublime_man_page_support/new_page.py +++ /dev/null @@ -1,59 +0,0 @@ -import sublime, sublime_plugin -import os, time -import subprocess - -from sublime_lib.path import root_at_packages, get_package_name - -class ManPagePreview(sublime_plugin.WindowCommand): - def run(self): - # exit if file is dirty, we can't run a man command against a file that doesn't exist - if self.window.active_view().is_dirty(): - o = self.window.get_output_panel("manfail") - o.run_command("insert_snippet", {"contents": "Unable to preview unsaved file."}) - self.window.run_command("show_panel", {"panel": "output.manfail"}) - return - - # process document with groff - curpath = self.window.active_view().file_name() - c = subprocess.Popen(["groff", "-Tascii", "-man", curpath], stdout=subprocess.PIPE) - output, err = c.communicate() - - # run groff output through col to clean it up - col = subprocess.Popen(["col", "-bx"], stdout=subprocess.PIPE, stdin=subprocess.PIPE) - cleanout, err = col.communicate(output) - - # write clean output to new window - v = self.window.new_file() - v.settings().set('default_dir', root_at_packages('User')) - v.set_syntax_file('Packages/Man Page Support/man-preview.tmLanguage') - e = v.begin_edit() - p = v.text_point(0,0) - v.insert(e, p, cleanout) - v.end_edit(e) - -class ManPageNewCommand(sublime_plugin.WindowCommand): - def run(self): - v = self.window.new_file() - v.settings().set('default_dir', root_at_packages('User')) - v.set_syntax_file('Packages/Man Page Support/man-groff.tmLanguage') - - template = """.\\\" Manpage for ${1:}. -.\\\" Contact ${2:} to correct errors or typos. -.TH man 8 "%s" "1.0" "${1:}" -.SH NAME -${1:} -.SH SYNOPSIS -.SY -${1:} -.YS -.SH DESCRIPTION -${1:} -.SH BUGS -No known bugs. -.SH SEE ALSO -.SH AUTHOR -.MT ${2:} -${3:} -.ME -""" %(time.strftime("%B %Y")) - v.run_command("insert_snippet", {"contents": template}) From 7715254212aea161d9211883424905238418d9f0 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 24 Aug 2016 20:48:31 -0700 Subject: [PATCH 0015/1214] Moving blitzmax grammar to GitHub-hosted copy --- .gitmodules | 3 +++ grammars.yml | 4 ++-- vendor/grammars/blitzmax | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) create mode 160000 vendor/grammars/blitzmax diff --git a/.gitmodules b/.gitmodules index a25c28a6ea..8f01152bf3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -764,3 +764,6 @@ url = https://github.com/austinwagner/sublime-sourcepawn [submodule "vendor/grammars/sublime-rexx"] path = vendor/grammars/sublime-rexx url = https://github.com/mblocker/rexx-sublime +[submodule "vendor/grammars/blitzmax"] + path = vendor/grammars/blitzmax + url = https://github.com/textmate/blitzmax.tmbundle diff --git a/grammars.yml b/grammars.yml index 7289d71f70..9c1a22c18e 100755 --- a/grammars.yml +++ b/grammars.yml @@ -1,8 +1,6 @@ --- http://svn.edgewall.org/repos/genshi/contrib/textmate/Genshi.tmbundle/Syntaxes/Markup%20Template%20%28XML%29.tmLanguage: - text.xml.genshi -http://svn.textmate.org/trunk/Review/Bundles/BlitzMax.tmbundle: -- source.blitzmax http://svn.textmate.org/trunk/Review/Bundles/Cython.tmbundle: - source.cython http://svn.textmate.org/trunk/Review/Bundles/Forth.tmbundle: @@ -204,6 +202,8 @@ vendor/grammars/awk-sublime: - source.awk vendor/grammars/bison.tmbundle: - source.bison +vendor/grammars/blitzmax: +- source.blitzmax vendor/grammars/boo/: - source.boo vendor/grammars/bro-sublime: diff --git a/vendor/grammars/blitzmax b/vendor/grammars/blitzmax new file mode 160000 index 0000000000..7ee210811a --- /dev/null +++ b/vendor/grammars/blitzmax @@ -0,0 +1 @@ +Subproject commit 7ee210811a19436f978c272266c484bbc5e36d95 From 17fc3d0640d79aa75008fc4e876d3900a3d29839 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 24 Aug 2016 22:31:08 -0700 Subject: [PATCH 0016/1214] Blitzmax license --- vendor/licenses/grammar/blitzmax.txt | 15 +++++++++++ .../grammar/sublime_man_page_support.txt | 25 ------------------- 2 files changed, 15 insertions(+), 25 deletions(-) create mode 100644 vendor/licenses/grammar/blitzmax.txt delete mode 100644 vendor/licenses/grammar/sublime_man_page_support.txt diff --git a/vendor/licenses/grammar/blitzmax.txt b/vendor/licenses/grammar/blitzmax.txt new file mode 100644 index 0000000000..179be3f17a --- /dev/null +++ b/vendor/licenses/grammar/blitzmax.txt @@ -0,0 +1,15 @@ +--- +type: grammar +name: blitzmax +license: permissive +curated: true +--- + +If not otherwise specified (see below), files in this repository fall under the following license: + + Permission to copy, use, modify, sell and distribute this + software is granted. This software is provided "as is" without + express or implied warranty, and with no claim as to its + suitability for any purpose. + +An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”. diff --git a/vendor/licenses/grammar/sublime_man_page_support.txt b/vendor/licenses/grammar/sublime_man_page_support.txt deleted file mode 100644 index f39a2a4e0c..0000000000 --- a/vendor/licenses/grammar/sublime_man_page_support.txt +++ /dev/null @@ -1,25 +0,0 @@ ---- -type: grammar -name: sublime_man_page_support -license: mit ---- -The MIT License (MIT) - -Copyright (c) 2013 carsonoid - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. From 4204078b199961cd55506ddb8329b1e657735d7a Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 24 Aug 2016 22:40:08 -0700 Subject: [PATCH 0017/1214] Updating location of Cython grammar --- .gitmodules | 3 +++ grammars.yml | 4 ++-- vendor/grammars/cython | 1 + vendor/licenses/grammar/cython.txt | 15 +++++++++++++++ 4 files changed, 21 insertions(+), 2 deletions(-) create mode 160000 vendor/grammars/cython create mode 100644 vendor/licenses/grammar/cython.txt diff --git a/.gitmodules b/.gitmodules index 8f01152bf3..ea7b7ec177 100644 --- a/.gitmodules +++ b/.gitmodules @@ -767,3 +767,6 @@ url = https://github.com/austinwagner/sublime-sourcepawn [submodule "vendor/grammars/blitzmax"] path = vendor/grammars/blitzmax url = https://github.com/textmate/blitzmax.tmbundle +[submodule "vendor/grammars/cython"] + path = vendor/grammars/cython + url = https://github.com/textmate/cython.tmbundle diff --git a/grammars.yml b/grammars.yml index 9c1a22c18e..8087a018e6 100755 --- a/grammars.yml +++ b/grammars.yml @@ -1,8 +1,6 @@ --- http://svn.edgewall.org/repos/genshi/contrib/textmate/Genshi.tmbundle/Syntaxes/Markup%20Template%20%28XML%29.tmLanguage: - text.xml.genshi -http://svn.textmate.org/trunk/Review/Bundles/Cython.tmbundle: -- source.cython http://svn.textmate.org/trunk/Review/Bundles/Forth.tmbundle: - source.forth http://svn.textmate.org/trunk/Review/Bundles/Parrot.tmbundle: @@ -236,6 +234,8 @@ vendor/grammars/css.tmbundle: vendor/grammars/cucumber-tmbundle: - source.ruby.rspec.cucumber.steps - text.gherkin.feature +vendor/grammars/cython: +- source.cython vendor/grammars/d.tmbundle: - source.d vendor/grammars/dart-sublime-bundle: diff --git a/vendor/grammars/cython b/vendor/grammars/cython new file mode 160000 index 0000000000..e9f4d3a1e4 --- /dev/null +++ b/vendor/grammars/cython @@ -0,0 +1 @@ +Subproject commit e9f4d3a1e44a14df8f245f98591f62df34fbabd8 diff --git a/vendor/licenses/grammar/cython.txt b/vendor/licenses/grammar/cython.txt new file mode 100644 index 0000000000..31515e2fed --- /dev/null +++ b/vendor/licenses/grammar/cython.txt @@ -0,0 +1,15 @@ +--- +type: grammar +name: cython +license: permissive +curated: true +--- + +If not otherwise specified (see below), files in this repository fall under the following license: + + Permission to copy, use, modify, sell and distribute this + software is granted. This software is provided "as is" without + express or implied warranty, and with no claim as to its + suitability for any purpose. + +An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”. From c13e384e187735c5e41bddd658d4e528db0c9498 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 24 Aug 2016 22:44:36 -0700 Subject: [PATCH 0018/1214] Updating location of Forth grammar --- .gitmodules | 3 +++ grammars.yml | 4 ++-- vendor/grammars/forth | 1 + vendor/licenses/grammar/forth.txt | 14 ++++++++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) create mode 160000 vendor/grammars/forth create mode 100644 vendor/licenses/grammar/forth.txt diff --git a/.gitmodules b/.gitmodules index ea7b7ec177..0e1e0f61f6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -770,3 +770,6 @@ url = https://github.com/austinwagner/sublime-sourcepawn [submodule "vendor/grammars/cython"] path = vendor/grammars/cython url = https://github.com/textmate/cython.tmbundle +[submodule "vendor/grammars/forth"] + path = vendor/grammars/forth + url = https://github.com/textmate/forth.tmbundle diff --git a/grammars.yml b/grammars.yml index 8087a018e6..376f82cdc2 100755 --- a/grammars.yml +++ b/grammars.yml @@ -1,8 +1,6 @@ --- http://svn.edgewall.org/repos/genshi/contrib/textmate/Genshi.tmbundle/Syntaxes/Markup%20Template%20%28XML%29.tmLanguage: - text.xml.genshi -http://svn.textmate.org/trunk/Review/Bundles/Forth.tmbundle: -- source.forth http://svn.textmate.org/trunk/Review/Bundles/Parrot.tmbundle: - source.parrot.pir http://svn.textmate.org/trunk/Review/Bundles/SecondLife%20LSL.tmbundle: @@ -273,6 +271,8 @@ vendor/grammars/fancy-tmbundle: - source.fancy vendor/grammars/fish-tmbundle: - source.fish +vendor/grammars/forth: +- source.forth vendor/grammars/fortran.tmbundle: - source.fortran - source.fortran.modern diff --git a/vendor/grammars/forth b/vendor/grammars/forth new file mode 160000 index 0000000000..0cf0ec91f6 --- /dev/null +++ b/vendor/grammars/forth @@ -0,0 +1 @@ +Subproject commit 0cf0ec91f65717903b41ea6cd62f6cd17788f0d0 diff --git a/vendor/licenses/grammar/forth.txt b/vendor/licenses/grammar/forth.txt new file mode 100644 index 0000000000..ec9c0253fb --- /dev/null +++ b/vendor/licenses/grammar/forth.txt @@ -0,0 +1,14 @@ +--- +type: grammar +name: forth +license: permissive +curated: true +--- +If not otherwise specified (see below), files in this repository fall under the following license: + + Permission to copy, use, modify, sell and distribute this + software is granted. This software is provided "as is" without + express or implied warranty, and with no claim as to its + suitability for any purpose. + +An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”. From e8a700e4e36677c6b09af3d204d782583d26bf4c Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 24 Aug 2016 22:48:10 -0700 Subject: [PATCH 0019/1214] Updating location of Parrot grammar --- .gitmodules | 3 +++ grammars.yml | 4 ++-- vendor/grammars/parrot | 1 + vendor/licenses/grammar/parrot.txt | 14 ++++++++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) create mode 160000 vendor/grammars/parrot create mode 100644 vendor/licenses/grammar/parrot.txt diff --git a/.gitmodules b/.gitmodules index 0e1e0f61f6..3ca715d082 100644 --- a/.gitmodules +++ b/.gitmodules @@ -773,3 +773,6 @@ url = https://github.com/austinwagner/sublime-sourcepawn [submodule "vendor/grammars/forth"] path = vendor/grammars/forth url = https://github.com/textmate/forth.tmbundle +[submodule "vendor/grammars/parrot"] + path = vendor/grammars/parrot + url = https://github.com/textmate/parrot.tmbundle diff --git a/grammars.yml b/grammars.yml index 376f82cdc2..8b53c1d69c 100755 --- a/grammars.yml +++ b/grammars.yml @@ -1,8 +1,6 @@ --- http://svn.edgewall.org/repos/genshi/contrib/textmate/Genshi.tmbundle/Syntaxes/Markup%20Template%20%28XML%29.tmLanguage: - text.xml.genshi -http://svn.textmate.org/trunk/Review/Bundles/Parrot.tmbundle: -- source.parrot.pir http://svn.textmate.org/trunk/Review/Bundles/SecondLife%20LSL.tmbundle: - source.lsl http://svn.textmate.org/trunk/Review/Bundles/VHDL.tmbundle: @@ -488,6 +486,8 @@ vendor/grammars/opa.tmbundle: - source.opa vendor/grammars/oz-tmbundle/Syntaxes/Oz.tmLanguage: - source.oz +vendor/grammars/parrot: +- source.parrot.pir vendor/grammars/pascal.tmbundle: - source.pascal vendor/grammars/pawn-sublime-language/: diff --git a/vendor/grammars/parrot b/vendor/grammars/parrot new file mode 160000 index 0000000000..b56e84139f --- /dev/null +++ b/vendor/grammars/parrot @@ -0,0 +1 @@ +Subproject commit b56e84139f2a8b75aa199a990d340b9a0463de16 diff --git a/vendor/licenses/grammar/parrot.txt b/vendor/licenses/grammar/parrot.txt new file mode 100644 index 0000000000..4175c715c3 --- /dev/null +++ b/vendor/licenses/grammar/parrot.txt @@ -0,0 +1,14 @@ +--- +type: grammar +name: parrot +license: permissive +curated: true +--- +If not otherwise specified (see below), files in this repository fall under the following license: + + Permission to copy, use, modify, sell and distribute this + software is granted. This software is provided "as is" without + express or implied warranty, and with no claim as to its + suitability for any purpose. + +An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”. From 510abc7ceec83fa498e5c135d1a9a34159141a0c Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 24 Aug 2016 22:51:13 -0700 Subject: [PATCH 0020/1214] Updating location of SecondLife LSL grammar --- .gitmodules | 3 +++ grammars.yml | 4 ++-- vendor/grammars/secondlife-lsl | 1 + vendor/licenses/grammar/secondlife-lsl.txt | 14 ++++++++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) create mode 160000 vendor/grammars/secondlife-lsl create mode 100644 vendor/licenses/grammar/secondlife-lsl.txt diff --git a/.gitmodules b/.gitmodules index 3ca715d082..8be4b81416 100644 --- a/.gitmodules +++ b/.gitmodules @@ -776,3 +776,6 @@ url = https://github.com/austinwagner/sublime-sourcepawn [submodule "vendor/grammars/parrot"] path = vendor/grammars/parrot url = https://github.com/textmate/parrot.tmbundle +[submodule "vendor/grammars/secondlife-lsl"] + path = vendor/grammars/secondlife-lsl + url = https://github.com/textmate/secondlife-lsl.tmbundle diff --git a/grammars.yml b/grammars.yml index 8b53c1d69c..458722f6db 100755 --- a/grammars.yml +++ b/grammars.yml @@ -1,8 +1,6 @@ --- http://svn.edgewall.org/repos/genshi/contrib/textmate/Genshi.tmbundle/Syntaxes/Markup%20Template%20%28XML%29.tmLanguage: - text.xml.genshi -http://svn.textmate.org/trunk/Review/Bundles/SecondLife%20LSL.tmbundle: -- source.lsl http://svn.textmate.org/trunk/Review/Bundles/VHDL.tmbundle: - source.vhdl http://svn.textmate.org/trunk/Review/Bundles/XQuery.tmbundle: @@ -540,6 +538,8 @@ vendor/grammars/scheme.tmbundle: - source.scheme vendor/grammars/scilab.tmbundle: - source.scilab +vendor/grammars/secondlife-lsl: +- source.lsl vendor/grammars/smali-sublime/smali.tmLanguage: - source.smali vendor/grammars/smalltalk-tmbundle: diff --git a/vendor/grammars/secondlife-lsl b/vendor/grammars/secondlife-lsl new file mode 160000 index 0000000000..ee359d634c --- /dev/null +++ b/vendor/grammars/secondlife-lsl @@ -0,0 +1 @@ +Subproject commit ee359d634c9d31f1d66bac416db626ddd11d39ed diff --git a/vendor/licenses/grammar/secondlife-lsl.txt b/vendor/licenses/grammar/secondlife-lsl.txt new file mode 100644 index 0000000000..cf255ab9ba --- /dev/null +++ b/vendor/licenses/grammar/secondlife-lsl.txt @@ -0,0 +1,14 @@ +--- +type: grammar +name: secondlife-lsl +license: permissive +curated: true +--- +If not otherwise specified (see below), files in this repository fall under the following license: + + Permission to copy, use, modify, sell and distribute this + software is granted. This software is provided "as is" without + express or implied warranty, and with no claim as to its + suitability for any purpose. + +An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”. From ae10395b3a9b9baf12fc1a9f849045328a3d3acf Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 24 Aug 2016 22:53:49 -0700 Subject: [PATCH 0021/1214] Updating location of VHDL grammar --- .gitmodules | 3 +++ grammars.yml | 4 ++-- vendor/grammars/vhdl | 1 + vendor/licenses/grammar/vhdl.txt | 14 ++++++++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) create mode 160000 vendor/grammars/vhdl create mode 100644 vendor/licenses/grammar/vhdl.txt diff --git a/.gitmodules b/.gitmodules index 8be4b81416..6e59891e97 100644 --- a/.gitmodules +++ b/.gitmodules @@ -779,3 +779,6 @@ url = https://github.com/austinwagner/sublime-sourcepawn [submodule "vendor/grammars/secondlife-lsl"] path = vendor/grammars/secondlife-lsl url = https://github.com/textmate/secondlife-lsl.tmbundle +[submodule "vendor/grammars/vhdl"] + path = vendor/grammars/vhdl + url = https://github.com/textmate/vhdl.tmbundle diff --git a/grammars.yml b/grammars.yml index 458722f6db..f6bd0dc092 100755 --- a/grammars.yml +++ b/grammars.yml @@ -1,8 +1,6 @@ --- http://svn.edgewall.org/repos/genshi/contrib/textmate/Genshi.tmbundle/Syntaxes/Markup%20Template%20%28XML%29.tmLanguage: - text.xml.genshi -http://svn.textmate.org/trunk/Review/Bundles/VHDL.tmbundle: -- source.vhdl http://svn.textmate.org/trunk/Review/Bundles/XQuery.tmbundle: - source.xquery https://bitbucket.org/Clams/sublimesystemverilog/get/default.tar.gz: @@ -630,6 +628,8 @@ vendor/grammars/turtle.tmbundle: - source.turtle vendor/grammars/verilog.tmbundle: - source.verilog +vendor/grammars/vhdl: +- source.vhdl vendor/grammars/vue-syntax-highlight: - text.html.vue vendor/grammars/xc.tmbundle/: diff --git a/vendor/grammars/vhdl b/vendor/grammars/vhdl new file mode 160000 index 0000000000..e88be21845 --- /dev/null +++ b/vendor/grammars/vhdl @@ -0,0 +1 @@ +Subproject commit e88be21845912df5622854747117930b302df8fd diff --git a/vendor/licenses/grammar/vhdl.txt b/vendor/licenses/grammar/vhdl.txt new file mode 100644 index 0000000000..36b8e6df6a --- /dev/null +++ b/vendor/licenses/grammar/vhdl.txt @@ -0,0 +1,14 @@ +--- +type: grammar +name: vhdl +license: permissive +curated: true +--- +If not otherwise specified (see below), files in this repository fall under the following license: + + Permission to copy, use, modify, sell and distribute this + software is granted. This software is provided "as is" without + express or implied warranty, and with no claim as to its + suitability for any purpose. + +An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”. From 6a2cebea7d4a579ad626779374eb880fa4b16602 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 24 Aug 2016 22:56:17 -0700 Subject: [PATCH 0022/1214] Updating location of XQuery grammar --- .gitmodules | 3 +++ grammars.yml | 4 ++-- vendor/grammars/xquery | 1 + vendor/licenses/grammar/xquery.txt | 14 ++++++++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) create mode 160000 vendor/grammars/xquery create mode 100644 vendor/licenses/grammar/xquery.txt diff --git a/.gitmodules b/.gitmodules index 6e59891e97..f245c920ea 100644 --- a/.gitmodules +++ b/.gitmodules @@ -782,3 +782,6 @@ url = https://github.com/austinwagner/sublime-sourcepawn [submodule "vendor/grammars/vhdl"] path = vendor/grammars/vhdl url = https://github.com/textmate/vhdl.tmbundle +[submodule "vendor/grammars/xquery"] + path = vendor/grammars/xquery + url = https://github.com/textmate/xquery.tmbundle diff --git a/grammars.yml b/grammars.yml index f6bd0dc092..6ef725cd8e 100755 --- a/grammars.yml +++ b/grammars.yml @@ -1,8 +1,6 @@ --- http://svn.edgewall.org/repos/genshi/contrib/textmate/Genshi.tmbundle/Syntaxes/Markup%20Template%20%28XML%29.tmLanguage: - text.xml.genshi -http://svn.textmate.org/trunk/Review/Bundles/XQuery.tmbundle: -- source.xquery https://bitbucket.org/Clams/sublimesystemverilog/get/default.tar.gz: - source.systemverilog - source.ucfconstraints @@ -637,5 +635,7 @@ vendor/grammars/xc.tmbundle/: vendor/grammars/xml.tmbundle: - text.xml - text.xml.xsl +vendor/grammar/xquery: +- source.xquery vendor/grammars/zephir-sublime: - source.php.zephir diff --git a/vendor/grammars/xquery b/vendor/grammars/xquery new file mode 160000 index 0000000000..1908094946 --- /dev/null +++ b/vendor/grammars/xquery @@ -0,0 +1 @@ +Subproject commit 19080949463e8eb6fca5ac94d597007a7c3605f8 diff --git a/vendor/licenses/grammar/xquery.txt b/vendor/licenses/grammar/xquery.txt new file mode 100644 index 0000000000..ce491a41c7 --- /dev/null +++ b/vendor/licenses/grammar/xquery.txt @@ -0,0 +1,14 @@ +--- +type: grammar +name: xquery +license: permissive +curated: true +--- +If not otherwise specified (see below), files in this repository fall under the following license: + + Permission to copy, use, modify, sell and distribute this + software is granted. This software is provided "as is" without + express or implied warranty, and with no claim as to its + suitability for any purpose. + +An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”. From 8d0a2d9dc1be3745335144b3f0718d17ff85019c Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 24 Aug 2016 22:59:42 -0700 Subject: [PATCH 0023/1214] Grammar re-ordering --- grammars.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grammars.yml b/grammars.yml index 6ef725cd8e..bcc9ef63f2 100755 --- a/grammars.yml +++ b/grammars.yml @@ -632,10 +632,10 @@ vendor/grammars/vue-syntax-highlight: - text.html.vue vendor/grammars/xc.tmbundle/: - source.xc +vendor/grammar/xquery: +- source.xquery vendor/grammars/xml.tmbundle: - text.xml - text.xml.xsl -vendor/grammar/xquery: -- source.xquery vendor/grammars/zephir-sublime: - source.php.zephir From 4da04637686e90d0d5f366cea58c8db1df20c802 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 24 Aug 2016 23:01:25 -0700 Subject: [PATCH 0024/1214] Typo fix --- grammars.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grammars.yml b/grammars.yml index bcc9ef63f2..f8a5f37cab 100755 --- a/grammars.yml +++ b/grammars.yml @@ -632,7 +632,7 @@ vendor/grammars/vue-syntax-highlight: - text.html.vue vendor/grammars/xc.tmbundle/: - source.xc -vendor/grammar/xquery: +vendor/grammars/xquery: - source.xquery vendor/grammars/xml.tmbundle: - text.xml From 9171ee602b3280ae434d730e29068890f5b9e661 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 24 Aug 2016 23:02:54 -0700 Subject: [PATCH 0025/1214] Ordering --- grammars.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grammars.yml b/grammars.yml index f8a5f37cab..de649f3b5a 100755 --- a/grammars.yml +++ b/grammars.yml @@ -632,10 +632,10 @@ vendor/grammars/vue-syntax-highlight: - text.html.vue vendor/grammars/xc.tmbundle/: - source.xc -vendor/grammars/xquery: -- source.xquery vendor/grammars/xml.tmbundle: - text.xml - text.xml.xsl +vendor/grammars/xquery: +- source.xquery vendor/grammars/zephir-sublime: - source.php.zephir From cb5bc91fe3550f6332c94e19bc74b0a2489bfb27 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Thu, 25 Aug 2016 09:22:13 -0700 Subject: [PATCH 0026/1214] Grammar update --- grammars.yml | 2 ++ vendor/grammars/Handlebars | 2 +- vendor/grammars/MagicPython | 2 +- vendor/grammars/NimLime | 2 +- vendor/grammars/PHP-Twig.tmbundle | 2 +- vendor/grammars/Sublime-SQF-Language | 2 +- vendor/grammars/Sublime-VimL | 2 +- vendor/grammars/SublimeGDB | 2 +- vendor/grammars/TLA | 2 +- vendor/grammars/applescript.tmbundle | 2 +- vendor/grammars/atom-language-purescript | 2 +- vendor/grammars/atom-language-stan | 2 +- vendor/grammars/c.tmbundle | 2 +- vendor/grammars/css.tmbundle | 2 +- vendor/grammars/d.tmbundle | 2 +- vendor/grammars/elixir-tmbundle | 2 +- vendor/grammars/java.tmbundle | 2 +- vendor/grammars/json.tmbundle | 2 +- vendor/grammars/language-babel | 2 +- vendor/grammars/language-blade | 2 +- vendor/grammars/language-clojure | 2 +- vendor/grammars/language-coffee-script | 2 +- vendor/grammars/language-crystal | 2 +- vendor/grammars/language-csharp | 2 +- vendor/grammars/language-csound | 2 +- vendor/grammars/language-gfm | 2 +- vendor/grammars/language-graphql | 2 +- vendor/grammars/language-haskell | 2 +- vendor/grammars/language-javascript | 2 +- vendor/grammars/language-less | 2 +- vendor/grammars/language-python | 2 +- vendor/grammars/language-renpy | 2 +- vendor/grammars/language-restructuredtext | 2 +- vendor/grammars/language-roff | 2 +- vendor/grammars/language-shellscript | 2 +- vendor/grammars/language-toc-wow | 2 +- vendor/grammars/language-yaml | 2 +- vendor/grammars/latex.tmbundle | 2 +- vendor/grammars/objective-c.tmbundle | 2 +- vendor/grammars/pawn-sublime-language | 2 +- vendor/grammars/ruby-slim.tmbundle | 2 +- vendor/grammars/sas.tmbundle | 2 +- vendor/grammars/smali-sublime | 2 +- vendor/grammars/sublime-autoit | 2 +- vendor/grammars/sublime-rust | 2 +- vendor/grammars/sublime-typescript | 2 +- vendor/grammars/swift.tmbundle | 2 +- vendor/grammars/vue-syntax-highlight | 2 +- 48 files changed, 49 insertions(+), 47 deletions(-) diff --git a/grammars.yml b/grammars.yml index de649f3b5a..72c5b42292 100755 --- a/grammars.yml +++ b/grammars.yml @@ -394,6 +394,8 @@ vendor/grammars/language-renpy: vendor/grammars/language-restructuredtext: - text.restructuredtext vendor/grammars/language-roff: +- source.ideal +- source.pic - text.roff - text.runoff vendor/grammars/language-shellscript: diff --git a/vendor/grammars/Handlebars b/vendor/grammars/Handlebars index 94ef9439d8..c07f986ae7 160000 --- a/vendor/grammars/Handlebars +++ b/vendor/grammars/Handlebars @@ -1 +1 @@ -Subproject commit 94ef9439d81d41a193487dda835d742b584659f4 +Subproject commit c07f986ae74c2a1eb96d856cf147ba94b8eefc90 diff --git a/vendor/grammars/MagicPython b/vendor/grammars/MagicPython index 820a9310f6..f4ff7de27f 160000 --- a/vendor/grammars/MagicPython +++ b/vendor/grammars/MagicPython @@ -1 +1 @@ -Subproject commit 820a9310f67b452257c45332fd16433b5f63296a +Subproject commit f4ff7de27f6ff9a4f1d8e0decd3cc7145dde2fa9 diff --git a/vendor/grammars/NimLime b/vendor/grammars/NimLime index 5089ecab59..2f5ec25fe6 160000 --- a/vendor/grammars/NimLime +++ b/vendor/grammars/NimLime @@ -1 +1 @@ -Subproject commit 5089ecab59ed3211aa482c0fb4c5881f7f7c4e9d +Subproject commit 2f5ec25fe648fb5260b0e5d845d3d88bd109b37d diff --git a/vendor/grammars/PHP-Twig.tmbundle b/vendor/grammars/PHP-Twig.tmbundle index f4f7529ac2..9e802d525e 160000 --- a/vendor/grammars/PHP-Twig.tmbundle +++ b/vendor/grammars/PHP-Twig.tmbundle @@ -1 +1 @@ -Subproject commit f4f7529ac2a07527caa7c9154b87c96d17e18aa1 +Subproject commit 9e802d525ed87a90ec7ff842f44c0c992fd56521 diff --git a/vendor/grammars/Sublime-SQF-Language b/vendor/grammars/Sublime-SQF-Language index 777931999d..984606e146 160000 --- a/vendor/grammars/Sublime-SQF-Language +++ b/vendor/grammars/Sublime-SQF-Language @@ -1 +1 @@ -Subproject commit 777931999d391173c509018fd38e4d124063f13d +Subproject commit 984606e146b4ef96753db7f3a16adeee2b152e24 diff --git a/vendor/grammars/Sublime-VimL b/vendor/grammars/Sublime-VimL index 4b23352ce5..b453aff6f7 160000 --- a/vendor/grammars/Sublime-VimL +++ b/vendor/grammars/Sublime-VimL @@ -1 +1 @@ -Subproject commit 4b23352ce5e48a191d55d61883a9478211df91fd +Subproject commit b453aff6f783769b6b895986da605a2db0db7379 diff --git a/vendor/grammars/SublimeGDB b/vendor/grammars/SublimeGDB index 0afb64f273..d9a512da6e 160000 --- a/vendor/grammars/SublimeGDB +++ b/vendor/grammars/SublimeGDB @@ -1 +1 @@ -Subproject commit 0afb64f2732bfb01af97f593d4f8c977a28dc510 +Subproject commit d9a512da6eb23b8193a8696a6fc1afd77f310d6e diff --git a/vendor/grammars/TLA b/vendor/grammars/TLA index 7e351a9cdf..5dc130cab3 160000 --- a/vendor/grammars/TLA +++ b/vendor/grammars/TLA @@ -1 +1 @@ -Subproject commit 7e351a9cdf6fbf3132e35246ce190bad237fb39c +Subproject commit 5dc130cab32ba6cf8c53e3378cd58740728f3c17 diff --git a/vendor/grammars/applescript.tmbundle b/vendor/grammars/applescript.tmbundle index bfb426974d..5067ef67a5 160000 --- a/vendor/grammars/applescript.tmbundle +++ b/vendor/grammars/applescript.tmbundle @@ -1 +1 @@ -Subproject commit bfb426974dd4ec9adcee4094f32a14a484b2e1f3 +Subproject commit 5067ef67a58f6f56a54460be1390d921bb400d45 diff --git a/vendor/grammars/atom-language-purescript b/vendor/grammars/atom-language-purescript index 83d188103f..fc8b0bf9da 160000 --- a/vendor/grammars/atom-language-purescript +++ b/vendor/grammars/atom-language-purescript @@ -1 +1 @@ -Subproject commit 83d188103fa2544fe037e3634c26ab6bbeb85b3e +Subproject commit fc8b0bf9da61886c6e3973c2d37e6aef88fabfb2 diff --git a/vendor/grammars/atom-language-stan b/vendor/grammars/atom-language-stan index 2fa2745da7..0a79d383b7 160000 --- a/vendor/grammars/atom-language-stan +++ b/vendor/grammars/atom-language-stan @@ -1 +1 @@ -Subproject commit 2fa2745da7ab9de0ba42a9743d1942becb5e4c32 +Subproject commit 0a79d383b7e94fefb242e967d708e054faf656cd diff --git a/vendor/grammars/c.tmbundle b/vendor/grammars/c.tmbundle index d26c35164a..fa4b7e2114 160000 --- a/vendor/grammars/c.tmbundle +++ b/vendor/grammars/c.tmbundle @@ -1 +1 @@ -Subproject commit d26c35164a4d496fd2c0b4ea0c1aeed64d704702 +Subproject commit fa4b7e211463973328b5334d55d0b10dafa27122 diff --git a/vendor/grammars/css.tmbundle b/vendor/grammars/css.tmbundle index 94f7111c29..d79e9c0137 160000 --- a/vendor/grammars/css.tmbundle +++ b/vendor/grammars/css.tmbundle @@ -1 +1 @@ -Subproject commit 94f7111c2953ac7b4cc42d313d9ad9b8701b8468 +Subproject commit d79e9c013769386a765198f7fb0f9dce39da829b diff --git a/vendor/grammars/d.tmbundle b/vendor/grammars/d.tmbundle index e4beff2ce5..8763c4c5f2 160000 --- a/vendor/grammars/d.tmbundle +++ b/vendor/grammars/d.tmbundle @@ -1 +1 @@ -Subproject commit e4beff2ce50afecab1438f0013977fadf89f8a39 +Subproject commit 8763c4c5f2169d48d725d946838428f50abe12a5 diff --git a/vendor/grammars/elixir-tmbundle b/vendor/grammars/elixir-tmbundle index 6ee8051a75..6d0417e8eb 160000 --- a/vendor/grammars/elixir-tmbundle +++ b/vendor/grammars/elixir-tmbundle @@ -1 +1 @@ -Subproject commit 6ee8051a75cd9bc7f20e08f2fde4475e95e9c67a +Subproject commit 6d0417e8eb7e182810755214d0a8cd6421146c01 diff --git a/vendor/grammars/java.tmbundle b/vendor/grammars/java.tmbundle index 64294ae0b6..faffa518d0 160000 --- a/vendor/grammars/java.tmbundle +++ b/vendor/grammars/java.tmbundle @@ -1 +1 @@ -Subproject commit 64294ae0b62b64b1183c401e3803679eaddb4946 +Subproject commit faffa518d0b22b68b4e5e6b4c939722522b97d40 diff --git a/vendor/grammars/json.tmbundle b/vendor/grammars/json.tmbundle index 0762cbdcb3..563b6f629b 160000 --- a/vendor/grammars/json.tmbundle +++ b/vendor/grammars/json.tmbundle @@ -1 +1 @@ -Subproject commit 0762cbdcb34dd98801b6323e75332cd4c9dbc07e +Subproject commit 563b6f629bcf2c77d239b03fa768f869a4cba368 diff --git a/vendor/grammars/language-babel b/vendor/grammars/language-babel index 0d093e8ffe..c9d6dbf463 160000 --- a/vendor/grammars/language-babel +++ b/vendor/grammars/language-babel @@ -1 +1 @@ -Subproject commit 0d093e8ffeaa80602c6f3ae86fade6a3b5f56e4d +Subproject commit c9d6dbf4637c0c703aa9ada87afdca5a9cfb3e30 diff --git a/vendor/grammars/language-blade b/vendor/grammars/language-blade index 50dcfb72af..fcbe2c2022 160000 --- a/vendor/grammars/language-blade +++ b/vendor/grammars/language-blade @@ -1 +1 @@ -Subproject commit 50dcfb72af30b267c4397f21742d79e4d564642f +Subproject commit fcbe2c202295ba1b3f3d2156b64a82999f51374d diff --git a/vendor/grammars/language-clojure b/vendor/grammars/language-clojure index d41af28800..bc86668c40 160000 --- a/vendor/grammars/language-clojure +++ b/vendor/grammars/language-clojure @@ -1 +1 @@ -Subproject commit d41af288008c6857198a3734d9f27e4f2f6650c5 +Subproject commit bc86668c40817aefbba2164032fcd24c2438b576 diff --git a/vendor/grammars/language-coffee-script b/vendor/grammars/language-coffee-script index 9ebf474016..8f001efe73 160000 --- a/vendor/grammars/language-coffee-script +++ b/vendor/grammars/language-coffee-script @@ -1 +1 @@ -Subproject commit 9ebf474016d7e984bfe40e36d7f5ea774dc1e4b9 +Subproject commit 8f001efe73422d0f7a0c16121588c34e0bd5fe8c diff --git a/vendor/grammars/language-crystal b/vendor/grammars/language-crystal index ec1e4991e6..0d7ac572e4 160000 --- a/vendor/grammars/language-crystal +++ b/vendor/grammars/language-crystal @@ -1 +1 @@ -Subproject commit ec1e4991e6647da9ca2c5337b795700c1f6ee7e4 +Subproject commit 0d7ac572e4628adf5206b03af9fc45cdd815476a diff --git a/vendor/grammars/language-csharp b/vendor/grammars/language-csharp index b3f1130b1a..c97c4bf74d 160000 --- a/vendor/grammars/language-csharp +++ b/vendor/grammars/language-csharp @@ -1 +1 @@ -Subproject commit b3f1130b1ae7f0bab2763d45926033aba92fb48c +Subproject commit c97c4bf74d74502c0b78901b12aab09186dc0eba diff --git a/vendor/grammars/language-csound b/vendor/grammars/language-csound index f5c603ac11..29d8eca1a8 160000 --- a/vendor/grammars/language-csound +++ b/vendor/grammars/language-csound @@ -1 +1 @@ -Subproject commit f5c603ac1168972d252a60edac2fab5dd3470b40 +Subproject commit 29d8eca1a8366295b9c7f052cbc667983d337a75 diff --git a/vendor/grammars/language-gfm b/vendor/grammars/language-gfm index 5435923521..a55c18c3dc 160000 --- a/vendor/grammars/language-gfm +++ b/vendor/grammars/language-gfm @@ -1 +1 @@ -Subproject commit 54359235212c921d4e09ed38575a9e9eb95635b8 +Subproject commit a55c18c3dc4d3fa9e5fb87fab0b0976b87526cbd diff --git a/vendor/grammars/language-graphql b/vendor/grammars/language-graphql index 037e5d46ea..d88cbb73e2 160000 --- a/vendor/grammars/language-graphql +++ b/vendor/grammars/language-graphql @@ -1 +1 @@ -Subproject commit 037e5d46ea7c5eeeac412192ab8a3cf72157be2d +Subproject commit d88cbb73e2e90f290911cf707550e2c0011140f9 diff --git a/vendor/grammars/language-haskell b/vendor/grammars/language-haskell index 16e6122e17..296a7e94df 160000 --- a/vendor/grammars/language-haskell +++ b/vendor/grammars/language-haskell @@ -1 +1 @@ -Subproject commit 16e6122e17ac5705dd18a1680142f29d059a4724 +Subproject commit 296a7e94df6b3c89c5247510b7ba4eb71f14c55f diff --git a/vendor/grammars/language-javascript b/vendor/grammars/language-javascript index 83f9e51bc9..e7b00e4d15 160000 --- a/vendor/grammars/language-javascript +++ b/vendor/grammars/language-javascript @@ -1 +1 @@ -Subproject commit 83f9e51bc96b56d392e603c6efbbfba453e7c4a7 +Subproject commit e7b00e4d15f1d11842ca9f5d61fdc02d4719bf6b diff --git a/vendor/grammars/language-less b/vendor/grammars/language-less index 234fd8a37b..d4f5db5fba 160000 --- a/vendor/grammars/language-less +++ b/vendor/grammars/language-less @@ -1 +1 @@ -Subproject commit 234fd8a37be054209a7e1726c29923f4171a2f90 +Subproject commit d4f5db5fba671244c1f2085752d1ea9ce34f8bad diff --git a/vendor/grammars/language-python b/vendor/grammars/language-python index d5ae69749b..bc20450849 160000 --- a/vendor/grammars/language-python +++ b/vendor/grammars/language-python @@ -1 +1 @@ -Subproject commit d5ae69749bde41cc9da8020786106958f376ef5b +Subproject commit bc204508498b1695a4448bd2cf9a3d31c1cdaf5e diff --git a/vendor/grammars/language-renpy b/vendor/grammars/language-renpy index 883f51f4ef..a3b9bbed66 160000 --- a/vendor/grammars/language-renpy +++ b/vendor/grammars/language-renpy @@ -1 +1 @@ -Subproject commit 883f51f4ef5d310121e45d30205f96d3ade4c248 +Subproject commit a3b9bbed668137ab8db5dbafea4d5611957e68ee diff --git a/vendor/grammars/language-restructuredtext b/vendor/grammars/language-restructuredtext index 7133612568..f4f931ab7f 160000 --- a/vendor/grammars/language-restructuredtext +++ b/vendor/grammars/language-restructuredtext @@ -1 +1 @@ -Subproject commit 71336125686fc61e26da1f0b6642930295b467de +Subproject commit f4f931ab7fd2ee4c07db35d3b884c14585da6e3f diff --git a/vendor/grammars/language-roff b/vendor/grammars/language-roff index 8c0b327560..bef4485150 160000 --- a/vendor/grammars/language-roff +++ b/vendor/grammars/language-roff @@ -1 +1 @@ -Subproject commit 8c0b327560f9e2225a6be9817ab20f84ad4f37b3 +Subproject commit bef448515021f7112d42403c0a3d5814a13b193f diff --git a/vendor/grammars/language-shellscript b/vendor/grammars/language-shellscript index 8019ad833c..6b936daeca 160000 --- a/vendor/grammars/language-shellscript +++ b/vendor/grammars/language-shellscript @@ -1 +1 @@ -Subproject commit 8019ad833cc55cec04e8fd89d492b66702c6884f +Subproject commit 6b936daeca50d0551a44b0d014e9debbf02516e9 diff --git a/vendor/grammars/language-toc-wow b/vendor/grammars/language-toc-wow index f538862fdd..03e7c2a02f 160000 --- a/vendor/grammars/language-toc-wow +++ b/vendor/grammars/language-toc-wow @@ -1 +1 @@ -Subproject commit f538862fdd122f249c414d4d5b76f3c8d3b4d94d +Subproject commit 03e7c2a02f2c3b2b0101929547768af5a88a7ddf diff --git a/vendor/grammars/language-yaml b/vendor/grammars/language-yaml index 9f55beb635..784cecc64f 160000 --- a/vendor/grammars/language-yaml +++ b/vendor/grammars/language-yaml @@ -1 +1 @@ -Subproject commit 9f55beb63517483971d256d521e30a7fb0b2bcc0 +Subproject commit 784cecc64ffdb891f6a7fbba62e476b0c833e66f diff --git a/vendor/grammars/latex.tmbundle b/vendor/grammars/latex.tmbundle index a5c14e1ce9..cb0c75906c 160000 --- a/vendor/grammars/latex.tmbundle +++ b/vendor/grammars/latex.tmbundle @@ -1 +1 @@ -Subproject commit a5c14e1ce9f29ceac4efd6578e03a12fe99e8cf8 +Subproject commit cb0c75906cdead220f45acc27225245dd966ef55 diff --git a/vendor/grammars/objective-c.tmbundle b/vendor/grammars/objective-c.tmbundle index fdcedb95de..583d31f673 160000 --- a/vendor/grammars/objective-c.tmbundle +++ b/vendor/grammars/objective-c.tmbundle @@ -1 +1 @@ -Subproject commit fdcedb95de8846220c49f769fee91045188767d9 +Subproject commit 583d31f6734589a6ea1e2da1be9da57cf25a63f9 diff --git a/vendor/grammars/pawn-sublime-language b/vendor/grammars/pawn-sublime-language index 879fae6157..1916b03ba0 160000 --- a/vendor/grammars/pawn-sublime-language +++ b/vendor/grammars/pawn-sublime-language @@ -1 +1 @@ -Subproject commit 879fae615707c5b0073d6ac9a28b701eb14a57b1 +Subproject commit 1916b03ba0f61f488637310c7608b3244fc80c0e diff --git a/vendor/grammars/ruby-slim.tmbundle b/vendor/grammars/ruby-slim.tmbundle index 7452b27ea4..2016357d9c 160000 --- a/vendor/grammars/ruby-slim.tmbundle +++ b/vendor/grammars/ruby-slim.tmbundle @@ -1 +1 @@ -Subproject commit 7452b27ea4aa8cbe19d99bd92aa40ac3560c6a93 +Subproject commit 2016357d9ca16b8c3e8c2aa9ac0a48ed46f27adb diff --git a/vendor/grammars/sas.tmbundle b/vendor/grammars/sas.tmbundle index 012368ab93..776b54772b 160000 --- a/vendor/grammars/sas.tmbundle +++ b/vendor/grammars/sas.tmbundle @@ -1 +1 @@ -Subproject commit 012368ab93235a4e4ff70785aaf2cbf5017e13fe +Subproject commit 776b54772b27f6f30be714fbabf9eb9abba3d013 diff --git a/vendor/grammars/smali-sublime b/vendor/grammars/smali-sublime index 60a1fdb344..5bcea806cf 160000 --- a/vendor/grammars/smali-sublime +++ b/vendor/grammars/smali-sublime @@ -1 +1 @@ -Subproject commit 60a1fdb3442cd7082036f1a02e403a5f725ed837 +Subproject commit 5bcea806cf69a6ebce799b0995bdfd4d7865989e diff --git a/vendor/grammars/sublime-autoit b/vendor/grammars/sublime-autoit index d4e742a73a..eeca503056 160000 --- a/vendor/grammars/sublime-autoit +++ b/vendor/grammars/sublime-autoit @@ -1 +1 @@ -Subproject commit d4e742a73afc8eb249f64736c43cb4976cafe9c8 +Subproject commit eeca5030567213210108fb24d123399575fd94ae diff --git a/vendor/grammars/sublime-rust b/vendor/grammars/sublime-rust index 167018cc0f..d3c63dec57 160000 --- a/vendor/grammars/sublime-rust +++ b/vendor/grammars/sublime-rust @@ -1 +1 @@ -Subproject commit 167018cc0f76f51e3911c40af8faf914cb48f66f +Subproject commit d3c63dec579be852b1d8006dc58a9a6f2a9e6cdc diff --git a/vendor/grammars/sublime-typescript b/vendor/grammars/sublime-typescript index 0d538fc748..27529a651f 160000 --- a/vendor/grammars/sublime-typescript +++ b/vendor/grammars/sublime-typescript @@ -1 +1 @@ -Subproject commit 0d538fc74884c812eece814acbe32e9bd8e28a3f +Subproject commit 27529a651f1aea441c3a8c809b0858d0900d82aa diff --git a/vendor/grammars/swift.tmbundle b/vendor/grammars/swift.tmbundle index 662fd22bf8..b3cb4372f2 160000 --- a/vendor/grammars/swift.tmbundle +++ b/vendor/grammars/swift.tmbundle @@ -1 +1 @@ -Subproject commit 662fd22bf8e6d2ed1dfcb5881c23838bad620404 +Subproject commit b3cb4372f2e63175c72eaa6e94af2eb52bb6a9db diff --git a/vendor/grammars/vue-syntax-highlight b/vendor/grammars/vue-syntax-highlight index a29a875bf3..8e729750bc 160000 --- a/vendor/grammars/vue-syntax-highlight +++ b/vendor/grammars/vue-syntax-highlight @@ -1 +1 @@ -Subproject commit a29a875bf3e81f780e905c223a96261c04732659 +Subproject commit 8e729750bc181d3d05d5e74cf7cb8f8c4c19627d From 6763b73d9ca5d88be2e67e6dcccd45f64eb65b8f Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Sat, 27 Aug 2016 21:01:58 +0200 Subject: [PATCH 0027/1214] Fix .ts heuristic rule (#3171) Use the opening TS tag instead of the closing tag since the closing tag might be at the end of the file, after the max number of lines we read with a LazyBlob --- lib/linguist/heuristics.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index 28d14cb48e..48b7e54f5d 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -430,7 +430,7 @@ def call(data) end disambiguate ".ts" do |data| - if data.include?("") + if data.include?(" Date: Mon, 29 Aug 2016 00:25:33 +1000 Subject: [PATCH 0028/1214] Add RPM Spec files to languages list --- .gitmodules | 3 +++ grammars.yml | 3 +++ lib/linguist/languages.yml | 9 +++++++ vendor/grammars/language-rpm-spec | 1 + vendor/licenses/grammar/language-rpm-spec.txt | 25 +++++++++++++++++++ 5 files changed, 41 insertions(+) create mode 160000 vendor/grammars/language-rpm-spec create mode 100644 vendor/licenses/grammar/language-rpm-spec.txt diff --git a/.gitmodules b/.gitmodules index f245c920ea..4d51363737 100644 --- a/.gitmodules +++ b/.gitmodules @@ -785,3 +785,6 @@ url = https://github.com/austinwagner/sublime-sourcepawn [submodule "vendor/grammars/xquery"] path = vendor/grammars/xquery url = https://github.com/textmate/xquery.tmbundle +[submodule "vendor/grammars/language-rpm-spec"] + path = vendor/grammars/language-rpm-spec + url = https://github.com/waveclaw/language-rpm-spec diff --git a/grammars.yml b/grammars.yml index 72c5b42292..1bb974900a 100755 --- a/grammars.yml +++ b/grammars.yml @@ -398,6 +398,9 @@ vendor/grammars/language-roff: - source.pic - text.roff - text.runoff +vendor/grammars/language-rpm-spec: +- source.changelogs.rpm-spec +- source.rpm-spec vendor/grammars/language-shellscript: - source.shell - text.shell-session diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index f8e97318c8..7c6461054e 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3195,6 +3195,15 @@ RMarkdown: - .rmd tm_scope: source.gfm +RPM Spec: + type: data + tm_scope: source.rpm-spec + extensions: + - .spec + aliases: + - specfile + ace_mode: text + RUNOFF: type: markup color: "#665a4e" diff --git a/vendor/grammars/language-rpm-spec b/vendor/grammars/language-rpm-spec new file mode 160000 index 0000000000..549b424107 --- /dev/null +++ b/vendor/grammars/language-rpm-spec @@ -0,0 +1 @@ +Subproject commit 549b4241074bfb81557173377efb6681673648ac diff --git a/vendor/licenses/grammar/language-rpm-spec.txt b/vendor/licenses/grammar/language-rpm-spec.txt new file mode 100644 index 0000000000..533fb6fa81 --- /dev/null +++ b/vendor/licenses/grammar/language-rpm-spec.txt @@ -0,0 +1,25 @@ +--- +type: grammar +name: language-rpm-spec +license: mit +--- +Copyright (c) 2015 Jeremiah Powell + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. From ed718556122d62882346befb1ac9766b5220332a Mon Sep 17 00:00:00 2001 From: Alhadis Date: Mon, 29 Aug 2016 00:28:18 +1000 Subject: [PATCH 0029/1214] Add sample .spec files --- samples/RPM Spec/apache.spec | 673 +++++++++++++++++++++++++++ samples/RPM Spec/erlang-erlydtl.spec | 62 +++ samples/RPM Spec/manos.spec | 46 ++ 3 files changed, 781 insertions(+) create mode 100644 samples/RPM Spec/apache.spec create mode 100644 samples/RPM Spec/erlang-erlydtl.spec create mode 100644 samples/RPM Spec/manos.spec diff --git a/samples/RPM Spec/apache.spec b/samples/RPM Spec/apache.spec new file mode 100644 index 0000000000..6e34ba9873 --- /dev/null +++ b/samples/RPM Spec/apache.spec @@ -0,0 +1,673 @@ +%define _prefix /usr/local +%define _mandir /usr/local/man +%define _sysconfdir /etc + +%define apache_ver 1.3.42 +%define mod_ssl_ver 2.8.31 +%define mod_perl_ver 1.31 +%define libapreq_ver 1.34 + + +%define aname apache +%define pname httpd13 +%define contentdir %{_var}/www +%define suexec_caller apache + +Summary: The 1.x Apache webserver (with static mod_perl, mod_ssl) +Name: apache +Version: %{apache_ver} +Release: 4%{?dist} +License: Apache Software License 2.0 +URL: http://httpd.apache.org/ +Group: System Environment/Daemons + +Requires: initscripts >= 3.25 +Requires: openssl >= 0.9.6 + +BuildRequires: openssl-devel mm-devel krb5-devel pkgconfig +BuildRequires: perl-ExtUtils-MakeMaker perl-libwww-perl perl-HTML-Parser perl-ExtUtils-Embed +BuildRequires: gdbm-devel flex +Requires: /sbin/chkconfig /bin/mktemp /usr/sbin/useradd +Requires: findutils procps + +Provides: webserver +Provides: mod_perl = %{mod_perl_ver} +Provides: perl(mod_perl) = %{mod_perl_ver} +Provides: mod_ssl = %{mod_ssl_ver} +Provides: apache = %{apache_ver} + +Source0: http://httpd.apache.org/dist/apache_%{apache_ver}.tar.bz2 +Source1: http://www.modssl.org/source/mod_ssl-%{mod_ssl_ver}-%{apache_ver}.tar.gz +Source2: http://perl.apache.org/dist/mod_perl-%{mod_perl_ver}.tar.gz +Source3: httpd.init +Source4: apache.logrotate +Source5: SSL-Certificate-Creation +Source6: ftp://ftp.cpan.org/authors/id/J/JO/JOESUF/libapreq-%{libapreq_ver}.tar.gz + +Patch0: sslcfg.patch +Patch1: apache_1.3.39-config.patch +Patch3: apache_1.3.39-Makefile.patch +Patch5: apache_1.3.20-apachectl-init.patch +Patch11: mod_ssl-2.8.4-openssl.patch +Patch12: apache_1.3.42-db.patch +Patch13: apache-1.3.39-gcc44.patch +Patch14: mod_ssl-2.8.31-STACK.patch +Patch15: apache_1.3.39-ap_getline.patch +Patch16: mod_ssl-openssl-x86_64.patch +Patch17: mp1+perl5.14.diff +Patch18: apache_1.3.42-64bits.patch + + +%description +This package contains a powerful, full-featured, efficient, and +freely-available Web server based on work done by the Apache Software +Foundation. It is also the most popular Web server on the Internet. + +------------------------------------------------------------------------------ +This package is a custom release containing the httpd server (v%{apache_ver}) +bundled with: mod_perl v.%{mod_ssl_ver}, +and mod_ssl v%{mod_ssl_ver}, all BUILT-IN. +------------------------------------------------------------------------------ + + The Apache/Perl integration project brings together the full power +of the Perl programming language and the Apache HTTP server. + With mod_perl it is possible to write Apache modules entirely in Perl. +In addition, the persistent interpreter embedded in the server avoids the +overhead of starting an external interpreter and the penalty of Perl +start-up time. + Mod_SSL provides strong cryptography for the Apache 1.3 webserver +via the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security +(TLSv1) protocols by the help of the Open Source SSL/TLS toolkit OpenSSL. + + +%package devel +Group: Development/Libraries +Summary: Module development tools for apache-mod_ssl +Provides: eapi = %{mod_ssl_ver} +Requires: %{name} = %{version} +Provides: mod_perl-devel = %{mod_perl_ver} +Provides: mod_ssl-devel = %{mod_ssl_ver} +Provides: apache-devel = %{apache_ver} + +%description devel +The apache-devel package contains the APXS binary and other files +that you need to build Dynamic Shared Objects (DSOs) for Apache. +If you are installing the Apache Web server and you want to be able +to compile or develop additional modules for Apache, you need to install +this package. + + +%package manual +Group: Documentation +Summary: Documentation for the Apache Web server + +%description manual +The apache-manual package contains the complete manual and reference +guide for the Apache Web server. +It also contains the basic web content (icons, default welcome messages, +etc) provided with Apache's HTTPD distribution. + + +%prep +%setup -q -c -T -n %{name}-%{version} -a 0 +%setup -q -c -T -D -n %{name}-%{version} -a 1 +%setup -q -c -T -D -n %{name}-%{version} -a 2 +%setup -q -c -T -D -n %{name}-%{version} -a 6 + +pushd %{aname}_%{apache_ver} +%patch0 -p0 -b .sslcfg +%patch1 -p1 -b .config +%patch3 -p0 -b .make +%patch5 -p1 -b .apachectl-init +%ifarch x86_64 +%patch18 -p1 -b .apache-x86_64 +%endif + +#patch12 -p1 -b .dbmdb +%patch13 -p1 -b .compile +%patch15 -p0 -b .ap_getline + + +patch -p0 < ../libapreq-%{libapreq_ver}/patches/apache-1.3+apreq.patch +cp ../libapreq-%{libapreq_ver}/c/*.[ch] src/lib/apreq/ +popd + +pushd mod_ssl-%{mod_ssl_ver}-%{apache_ver} +%patch11 -p1 -b .openssl +%patch14 -p0 -b .stack +%ifarch x86_64 +%patch16 -p1 -b .openssl-x86_64 +%endif +popd + +pushd mod_perl-%{mod_perl_ver} +%patch17 -p1 -b .mp1+perl5.14.diff +popd + +# Substitute values to match the configuration. The first two are +# for the default httpd.conf file, the rest is for the mod_ssl +# additions. +pushd %{aname}_%{apache_ver} +sed -e 's,@@ServerRoot@@,%{_sysconfdir}/%{pname},g' \ + -e 's,@@ContentRoot@@,%{contentdir},g' \ + -e 's,^DocumentRoot "@@ContentRoot@@",#DocumentRoot "%{_sysconfdir}/%{pname}/htdocs",g' \ + -e 's,^,,g' \ + -e 's,^ServerName new.host.name,#ServerName new.host.name,g' \ + -e 's,^ServerAdmin you@your.address,#ServerAdmin you@your.address,g' \ + -e 's,^SSLCipherSuite,#SSLCipherSuite,g' \ + -e 's,^SSLLogLevel info,SSLLogLevel error,g' \ + -e 's,^SSLSessionCache dbm:logs/ssl_scache,SSLSessionCache shm:logs/ssl_scache(512000),g' \ + conf/httpd.conf-dist > conf/httpd.conf +popd + +cp %{SOURCE5} . + +#cp %{_tmppath}/rpm-tmp* /tmp/01prep.sh + +%build +export CFLAGS="$RPM_OPT_FLAGS -fPIC $(pkg-config --cflags openssl)" +export LIBS="-lpthread" +export EAPI_MM=SYSTEM + +############################################### +echo mod_perl ... +pushd mod_perl-%{mod_perl_ver} + perl Makefile.PL CCFLAGS="$RPM_OPT_FLAGS -fPIC" \ + APACHE_SRC=../%{aname}_%{apache_ver}/src \ + DO_HTTPD=1 USE_APACI=1 PREP_HTTPD=1 EVERYTHING=1 + make %{?_smp_mflags} + ## put mod_perl docs in a safe place ;-]~ + mkdir mod_perl-doc + cp -a eg/ faq/ mod_perl-doc/ + cp {CREDITS,LICENSE,README,SUPPORT,STATUS,Changes,INSTALL*} mod_perl-doc/ + cp *.{pod,html,gif} mod_perl-doc/ + find mod_perl-doc -type f -exec chmod 644 {} \; +popd + +############################################### +echo mod_ssl ... +export SSL_COMPAT=yes +export SSL_EXPERIMENTAL=yes +pushd mod_ssl-%{mod_ssl_ver}-%{apache_ver} + ./configure --with-apache=../apache_%{apache_ver} \ + --with-mm=SYSTEM --force +popd + +############################################### +echo apache ... +pushd %{aname}_%{apache_ver} + ./configure \ + --prefix=%{_prefix} \ + --exec-prefix=%{_prefix} \ + --bindir=%{_bindir} \ + --sbindir=%{_sbindir} \ + --mandir=%{_mandir} \ + --sysconfdir=%{_sysconfdir}/%{pname}/conf \ + --libexecdir=%{_libdir}/apache \ + --datadir=%{contentdir} \ + --iconsdir=%{contentdir}/icons \ + --htdocsdir=%{contentdir}/html \ + --manualdir=%{contentdir}/html/manual \ + --cgidir=%{contentdir}/cgi-bin \ + --localstatedir=%{_localstatedir} \ + --runtimedir=%{_sysconfdir}/%{pname}/run \ + --logfiledir=logs \ + --proxycachedir=%{_localstatedir}/cache/%{pname} \ + --with-perl=%{__perl} \ + --enable-rule=EAPI \ + --enable-rule=SSL_COMPAT \ + --enable-rule=SSL_EXPERIMENTAL \ + --disable-rule=SSL_VENDOR \ + --disable-rule=WANTHSREGEX \ + --disable-rule=EXPAT \ + %{?_with_backtrace:--activate-module=src/modules/experimental/mod_backtrace.c} \ + %{?_with_whatkilledus:--activate-module=src/modules/experimental/mod_whatkilledus.c} \ + --activate-module=src/modules/perl/libperl.a \ + --enable-module=auth_dbm \ + --enable-module=ssl \ + --enable-module=all \ + --enable-shared=max \ + --disable-shared=perl \ + --disable-shared=ssl \ + --disable-module=example \ + --disable-module=auth_db \ + --without-execstrip \ + %{?_with_suexec:--enable-suexec --suexec-docroot=%{contentdir}} \ + %{?_with_suexec:--suexec-uidmin=300 --suexec-gidmin=300} \ + %{?_with_suexec:--suexec-umask=022 --suexec-caller=%{suexec_caller}} + + make %{?_smp_mflags} + +popd +#cp %{_tmppath}/rpm-tmp* /tmp/02build.sh + +%install +############################################################################### +### install basic apache stuff +pushd apache_%{apache_ver} + make install root="$RPM_BUILD_ROOT" +popd + +### rename +mv $RPM_BUILD_ROOT%{_sbindir}/httpd $RPM_BUILD_ROOT%{_sbindir}/%{pname} + +### install SYSV init stuff +mkdir -p $RPM_BUILD_ROOT%{_initrddir} +install -m755 %{SOURCE3} $RPM_BUILD_ROOT%{_initrddir}/%{pname} + +### install log rotation stuff +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d +install -m644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/apache + +### default rootdir links +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{pname} +pushd $RPM_BUILD_ROOT%{_sysconfdir}/%{pname} + ln -s %{_localstatedir}/log/%{pname} logs + ln -s %{_libdir}/%{aname} modules + ln -s %{_localstatedir}/run run +popd + +### replace Apache's default config file with our patched version +install -m644 apache_%{apache_ver}/conf/httpd.conf \ + $RPM_BUILD_ROOT%{_sysconfdir}/%{pname}/conf/httpd.conf + +# fix up apxs so that it doesn't think it's in the build root +perl -pi -e "s^$RPM_BUILD_ROOT^^g" $RPM_BUILD_ROOT%{_sbindir}/apxs + +# fixup the documentation file naming +find $RPM_BUILD_ROOT%{contentdir} -name "*.html.html" | xargs rename .html.html .html + +############################################################################### +### install mod_perl files +pushd mod_perl-%{mod_perl_ver} + export PERL_INSTALL_ROOT=$RPM_BUILD_ROOT + make pure_install PREFIX=/usr INSTALLDIRS=vendor + + # convert man pages to UTF-8 + recode() { + iconv -f "$2" -t utf-8 < "$1" > "${1}_" + %{__mv} -f "${1}_" "$1" + } + pushd $RPM_BUILD_ROOT/usr/share/man/man3/ + for i in * ; do + recode "${i}" iso-8859-1 + done + popd + + # fix files mod + find $RPM_BUILD_ROOT%{perl_vendorarch} -iname '*.pm' -exec chmod 0644 {} \; + + # bake web docs... + mkdir -p $RPM_BUILD_ROOT%{contentdir}/html/manual/mod/mod_perl + install -c -m 644 htdocs/manual/mod/mod_perl.html \ + $RPM_BUILD_ROOT%{contentdir}/html/manual/mod/mod_perl/ + make -C faq + rm -f faq/pod2htm* + install -m644 faq/*.html \ + $RPM_BUILD_ROOT%{contentdir}/html/manual/mod/mod_perl/ + +popd + +# remove special perl files this is specific for rpms , already have in own .packlist +find $RPM_BUILD_ROOT%{perl_vendorarch}/.. -name perllocal.pod -o -name .packlist \ + -o -name '*.bs' | xargs -r -i rm -f {} + +### ssl leftovers +# point to the right makefile. +ln -sf ../../../etc/pki/tls/certs/Makefile $RPM_BUILD_ROOT%{_sysconfdir}/%{pname}/conf +# create a prototype session cache +touch $RPM_BUILD_ROOT%{_localstatedir}/cache/ssl_gcache_data.{dir,pag,sem} + +# drop shellbang from .exp files +for exp in $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Apache/mod_perl.exp $RPM_BUILD_ROOT%{_libdir}/%{aname}/httpd.exp +do + sed -i '/^#!/ d' $exp +done + +#cp %{_tmppath}/rpm-tmp* /tmp/03install.sh + +%post +/sbin/chkconfig --add %{pname} +/sbin/ldconfig + +# safely build a test certificate +umask 077 +if [ ! -f %{_sysconfdir}/%{pname}/conf/ssl.key/server.key ] ; then +openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > %{_sysconfdir}/%{pname}/conf/ssl.key/server.key 2> /dev/null +fi + +if [ ! -f %{_sysconfdir}/%{pname}/conf/ssl.crt/server.crt ] ; then +cat << EOF | openssl req -new -key %{_sysconfdir}/%{pname}/conf/ssl.key/server.key -x509 -days 365 -out %{_sysconfdir}/%{pname}/conf/ssl.crt/server.crt 2>/dev/null +-- +SomeState +SomeCity +SomeOrganization +SomeOrganizationalUnit +localhost.localdomain +root@localhost.localdomain +EOF +fi + +# safely add .htm to mime types if it is not already there +[ -f %{_sysconfdir}/mime.types ] || exit 0 +TEMPTYPES=`/bin/mktemp /tmp/mimetypes.XXXXXX` +[ -z "$TEMPTYPES" ] && { + echo "could not make temporary file, htm not added to %{_sysconfdir}/mime.types" >&2 + exit 1 +} +( grep -v "^text/html" %{_sysconfdir}/mime.types + types=$(grep "^text/html" %{_sysconfdir}/mime.types | cut -f2-) + echo -en "text/html\t\t\t" + for val in $types ; do + if [ "$val" = "htm" ] ; then + continue + fi + echo -n "$val " + done + echo "htm" +) > $TEMPTYPES +cat $TEMPTYPES > %{_sysconfdir}/mime.types && /bin/rm -f $TEMPTYPES + +cp %{_tmppath}/rpm-tmp* /tmp/04post.sh + +%pre +# Add the "apache" user +/usr/sbin/useradd -c "Apache" -u 48 \ + -s /sbin/nologin -r -d "%{contentdir}" apache 2> /dev/null || : + +%preun +if [ $1 = 0 ]; then + if [ -f /var/lock/subsys/%{pname} ]; then + %{_initrddir}/%{pname} stop + fi + if [ -f %{_initrddir}/%{pname} ]; then + /sbin/chkconfig --del %{pname} + fi +fi + +%files +%defattr(-,root,root) +%dir %{_sysconfdir}/%{pname} +%dir %{_sysconfdir}/%{pname}/conf +%config(noreplace) %{_sysconfdir}/%{pname}/conf/*.conf +%config(noreplace) %{_sysconfdir}/%{pname}/conf/Makefile +%config(noreplace) %{_sysconfdir}/%{pname}/conf/magic +%config(noreplace) %{_sysconfdir}/%{pname}/conf/mime.types +%config(noreplace) %{_sysconfdir}/logrotate.d/* +%config(noreplace) %{_sysconfdir}/%{pname}/conf/ssl.* +%doc %{_sysconfdir}/%{pname}/conf/*.default +%attr(755,root,root) %{_initrddir}/* +%{_sysconfdir}/%{pname}/logs +%{_sysconfdir}/%{pname}/modules +%{_sysconfdir}/%{pname}/run +%{_libdir}/%{aname} +%{perl_vendorarch}/Apache +%{perl_vendorarch}/Bundle +%{perl_vendorarch}/*.pm +%{perl_vendorarch}/*.PL +%dir %{perl_vendorarch}/auto/Apache +%{perl_vendorarch}/auto/Apache/Leak +%{perl_vendorarch}/auto/Apache/Symbol +%{perl_vendorarch}/auto/Apache/mod_perl.exp +%{perl_vendorarch}/auto/Apache/typemap +%attr(0755,root,root) %{_bindir}/* +%attr(0755,root,root) %{_sbindir}/ab +%attr(0755,root,root) %{_sbindir}/apachectl +%attr(0755,root,root) %{_sbindir}/httpd13 +%attr(0755,root,root) %{_sbindir}/logresolve +%attr(0755,root,root) %{_sbindir}/rotatelogs +%{?_with_suexec:%attr(4710,root,%{suexec_caller}) %{_sbindir}/suexec} +%{_mandir}/man1*/* +%{_mandir}/man8/ab.8* +%{_mandir}/man8/apachectl.8* +%{_mandir}/man8/httpd.8* +%{_mandir}/man8/logresolve.8* +%{_mandir}/man8/rotatelogs.8* +%{?_with_suexec:%{_mandir}/man8/suexec.8*} +%attr(0755,apache,root) %dir %{_localstatedir}/cache/%{pname} +%attr(0640,apache,root) %{_localstatedir}/cache/ssl_* +%attr(0750,root,apache) %dir %{_localstatedir}/log/%{pname} + + +%files devel +%defattr(-,root,root) +%{_includedir} +%attr(0755,root,root) %{_sbindir}/apxs +%{_mandir}/man8/apxs.8* +%doc %{perl_vendorarch}/*.pod +%{perl_vendorarch}/auto/Apache/include + +%files manual +%defattr(-,root,root) +%doc apache_%{apache_ver}/cgi-bin +%dir %{contentdir} +%dir %{contentdir}/cgi-bin +%config(noreplace) %{contentdir}/cgi-bin/* +%dir %{contentdir}/html +%config(noreplace) %{contentdir}/html/*.html* +%config(noreplace) %{contentdir}/html/*.gif +%dir %{contentdir}/icons +%dir %{contentdir}/icons/small +%config(noreplace) %{contentdir}/icons/*.* +%config(noreplace) %{contentdir}/icons/small/*.* +%doc %{contentdir}/icons/README + +%doc apache_%{apache_ver}/{ABOUT_APACHE,LICENSE*,NOTICE,README*,cgi-bin} +%doc apache_%{apache_ver}/src/{CHANGES,README}* +%doc mod_ssl-%{mod_ssl_ver}-%{apache_ver}/README.* +%doc mod_ssl-%{mod_ssl_ver}-%{apache_ver}/NEWS +%doc mod_perl-%{mod_perl_ver}/mod_perl-doc +%doc SSL-Certificate-Creation + +%doc %{contentdir}/html/manual +%exclude %{contentdir}/html/manual/mod/mod_ssl/ssl_cover.wml +#man3 conflicts with mod_perl2 +/usr/share/man/man3*/* + + +%changelog +* Sun May 13 2012 Sérgio Basto - 1.3.42-4 +- Many improvements on defaults directories +- Separate libapreq in other package, to compile libapreq is need other sources installed. +- more cleanups. + +* Wed Nov 16 2011 Sérgio Basto +- build for F16 +- mp1+perl5.14.diff (mod_perl1 + perl5.14) +- many improvents. + +* Sat Oct 29 2011 Sérgio Basto +- mock build add many buildrequires +- many improvemts on confs + +* Tue Oct 16 2007 Sérgio Basto +- UNDROPPED CONFIGURATION COMPLETELY: rpm it suposed do all alone. +- rename httpd to http13 to work independently of apache 2.2 +- add patch to Makefile.tmp, resolve all problems at once +- change server port number to run out of the box. +- Update link to certs/Makefile. + +* Tue Sep 11 2007 Marius FERARU - 1.3.39-1.n0i.23.MPSSL +- apache 1.3.39 +- mod_ssl 2.8.29 + +* Mon Apr 02 2007 Marius FERARU - 1.3.37-3.n0i.22.MPSSL +- mod_perl 1.30 +- initscript: use a "$pidfile" variable for all operations +- initscript: added a dummy "alias" for "reload" (will do a 'restart'!) +- initscript: added missing "fullstatus" option (will run through "apachectl") +- dropped shellbang from .exp files +- dropped 2 explicit provides (mod_perl and Apache::Constants) + +* Fri Sep 08 2006 Marius FERARU - 1.3.37-2.n0i.21.MPSSL +- BR: gdbm-devel, db4-devel + +* Mon Aug 21 2006 Marius FERARU - 1.3.37-1.n0i.20.MPSSL +- apache 1.3.37 +- mod_ssl 2.8.28 +- Dist macro +- URL update +- updated description +- spec cleanups +- use "--with backtrace" to activate "mod_backtrace" +- use "--with whatkilledus" to activate "mod_whatkilledus" +- use "--with suexec" to activate suexec functionality +- moved default web content into documentation package + +* Tue Jun 06 2006 Marius FERARU - 1.3.36-2.n0i.19.MPSSL +- changed "runtimedir" and "logfiledir" to relative paths, + letting users run apache on their own + +* Tue Jun 06 2006 Marius FERARU - 1.3.36-1.n0i.19.MPSSL +- apache 1.3.36 +- mod_ssl version 2.8.27 +- spec cleanups + +* Mon Mar 13 2006 Marius FERARU - 1.3.34-2.n0i.18.MPSSL +- rebuild + +* Thu Nov 24 2005 Marius FERARU 1.3.34-1.n0i.17.MPSSL +- apache 1.3.34 +- mod_ssl version 2.8.25 + +* Tue Sep 20 2005 Marius FERARU 1.3.33-5.n0i.16.MPSSL +- mod_ssl version 2.8.24 + +* Fri Sep 02 2005 Marius FERARU 1.3.33-4.n0i.15.MPSSL +- rebuild +- dropped more requirements (which Fedora considers to "always have") + +* Sat Jul 23 2005 Marius FERARU 1.3.33-3.n0i.14.MPSSL +- dropped Epoch +- changed Summary and Description +- rebuild (perl 5.8.7) + +* Tue Jan 04 2005 Marius FERARU 1.3.33-2.n0i.13.MPSSL +- libapreq version 1.33 + +* Mon Dec 06 2004 Marius FERARU 1.3.33-1.n0i.12.MPSSL +- apache version 1.3.33 +- mod_ssl version 2.8.22 +- description update + +* Tue Aug 17 2004 Marius FERARU 1.3.31-5.n0i.11.MPSSL +- mod_ssl version 2.8.19 + +* Thu Jul 15 2004 Marius FERARU 1.3.31-4.n0i.10.MPSSL +- mod_ssl version 2.8.18 + +* Tue Jul 13 2004 Marius FERARU 1.3.31-3.n0i.9.MPSSL +- tweaked rotatelog's build: drop linking with apache libs + +* Tue Jul 13 2004 Marius FERARU 1.3.31-2.n0i.8.MPSSL +- applied some fixing patches from current CVS version + +* Thu May 13 2004 Marius FERARU 1.3.31-1.n0i.7.MPSSL +- apache version 1.3.31 +- mod_ssl version 2.8.17 +- updated apxs patch +- slight spec tweaks +- enabled backtrace experimental module +- updated config patch + +* Fri Apr 30 2004 Marius Feraru 1.3.29-6.n0i.6.MPSSL +- automatic rebuild + +* Thu Apr 22 2004 Marius FERARU 1.3.29-5.n0i.5.MPSSL +- rebuild (perl 5.8.4) + +* Tue Feb 10 2004 Marius FERARU 1.3.29-4.n0i.4.MPSSL +- fixed the shameful bugs from my httpd.init script + +* Fri Jan 23 2004 Marius FERARU 1.3.29-3.n0i.3.MPSSL +- rebuild (perl 5.8.3) + +* Fri Jan 16 2004 Marius FERARU 1.3.29-2.n0i.2.MPSSL +- rebuilt on perl 5.8.2 / Fedora 1 Devel (tobe FC2) +- finally clearly enabled modperl.c in apache_1.3.23-config.patch +as many helpless people seem to use this dumb default configuration file :( +- also updated the same patch to properly define SSL too :) +- added a lame "MPSSL" extra tag in release to make people understand this +is a !SPECIAL! apache + mod_perl + mod_ssl + libapreq package suite!!! +- updated init script to do "real" server shutdown (in squid style) and to NOT +shutdown all the apache servers, just the one started with /var/run/httpd.pid +- added USE_MODULEARGS=[yes/no] and SHUTDOWN_TIMEOUT=[seconds] configuration +parameters to init script + +* Thu Nov 13 2003 Marius FERARU 1.3.29-1.n0i.1 +- apache 1.3.29 +- modssl 2.8.16 +- dropped zombie patch +- dropped fderr patch +- dropped for good thttpd conflict note as THERE IS NO CONFLICT!!! In fact +we really use them both for long time without a problem :)) +- added more Prereq stuff +- more Fedora style spec updates + +* Thu Oct 16 2003 Marius FERARU 1.3.28-2.n0i +- mod_perl 1.29 +- libapreq 1.3 +- replaced ALL direct 'etc' occurences to macros (some for other stuff) +- perl %%files are now more properly quested. +- switched krb5-config to pkg-config +- switched textutils to coreutils +- using mm 1.3 +- disabled internal expat linking +- added the 'zombie' patch +- added the 'file descriptors are erroneously closed' patch + +* Mon Jul 28 2003 Marius FERARU 1.3.28-1.n0i +- mod_perl 1.28 +- added builtin libapreq + +* Fri Jul 25 2003 Marius FERARU 1.3.28-0.n0i +- apache version 1.3.28 +- mod_ssl version 2.8.15 +- switched the old dbm-gdbm patch with a more elegant one (apache_1.3.27-db); +yet, more tests are to be done on other systems before dropping the old one +from our src.rpm +- disabled suexec SSL env support patch as Apache ppl changed their code heavily +and I do not yet have time to update this patch +- moved mod_perl header files into apache-devel (are they needed by someone?!) +- dropped using RPM_SOURCE_DIR/ stuff. +- disabled auth_db module (db4 API changes?!) + +* Mon Apr 21 2003 Marius FERARU 1.3.27-2.n0i +- automatic rebuild on RHL9 + +* Wed Mar 26 2003 Marius FERARU 1.3.27-1.n0i +- mod_ssl version 2.8.14 +- dropped thttpd conflict note as THERE IS NO CONFLICT!!! In fact we really +use them both :)) + +* Fri Oct 18 2002 Marius Feraru +- apache version 1.3.27 +- mod_ssl version 2.8.11 +- eliminated db4 patch +- disabled thttpd conflict flag + +* Tue Sep 24 2002 Marius Feraru +- automatic rebuild (to conform with the openssl update) + +* Wed Sep 4 2002 Marius Feraru +- some spec cleanups (rpm 4.1.x compatibility) + +* Tue Jul 23 2002 Marius FERARU +- apache 1.3.26 +- mod_perl 1.27 +- mod_ssl 2.8.10 +- lots of new tweaks to the spec file (hopefully it will be easier now for others to +rebuild this package =] ) + + +* Sat Sep 1 2001 Marius FERARU +- updated apache to 1.3.22 +- reparsed and tweaked all RedHat patches +- lots of spec file tweaks: optimisations, + file location/integration/modes fixes... + +* Sat Sep 1 2001 Marius FERARU +- updated mod_perl to version 1.26 +- based on apache-1.3.20-15.src.rpm from Red Hat RawHide +- used apache_modperl-1.3.19-1.24-1.src.rpm from + perl.apache.org as example spec. diff --git a/samples/RPM Spec/erlang-erlydtl.spec b/samples/RPM Spec/erlang-erlydtl.spec new file mode 100644 index 0000000000..eea3fb2b3e --- /dev/null +++ b/samples/RPM Spec/erlang-erlydtl.spec @@ -0,0 +1,62 @@ +%global debug_package %{nil} + +Name: erlang-erlydtl +Version: 0.6.0 +Release: 1%{?dist} +Summary: Erlang implementation of the Django Template Language. + +Group: Development/Libraries +License: MIT +URL: http://code.google.com/p/erlydtl/ +Source0: http://erlydtl.googlecode.com/files/erlydtl-0.6.0.tar.gz +Patch0: erlang-erlydtl-0.6.0-tests.patch +Patch1: erlang-erlydtl-0.6.0-r14a.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +Provides: ErlyDTL = %{version}-%{release} +BuildRequires: erlang +Requires: erlang + +%description +ErlyDTL is an Erlang implementation of the Django Template Language. The +erlydtl module compiles Django Template source code into Erlang bytecode. The +compiled template has a "render" function that takes a list of variables and +returns a fully rendered document + +%prep +%setup -q -n erlydtl-%{version} +find examples/ -type f -executable -exec chmod -x {} \; + +%patch0 -p0 +%patch1 -p0 + +%build +make %{?_smp_mflags} + +%check +make test + + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/erlang/lib/erlydtl-%{version}/ +cp -r ebin %{buildroot}/%{_libdir}/erlang/lib/erlydtl-%{version}/ +cp -r bin %{buildroot}/%{_libdir}/erlang/lib/erlydtl-%{version}/ +cp -r priv %{buildroot}/%{_libdir}/erlang/lib/erlydtl-%{version}/ + + +%clean +rm -rf %{buildroot} + + +%files +%defattr(-,root,root,-) +%dir %{_libdir}/erlang/lib/erlydtl-%{version} +%{_libdir}/erlang/lib/erlydtl-%{version}/* +%doc README +%doc examples + + +%changelog +* Sun Aug 1 2010 Ilia Cheishvili - 0.6.0-1 +- Initial Package diff --git a/samples/RPM Spec/manos.spec b/samples/RPM Spec/manos.spec new file mode 100644 index 0000000000..5674d3ce6c --- /dev/null +++ b/samples/RPM Spec/manos.spec @@ -0,0 +1,46 @@ +# +# spec file for package manos +# +# Copyright (c) 2010 Jackson Harper (jackson@novell.com) +# +# + +Name: manos-devel +Version: 0.1.1 +Release: 1 +License: MIT/X11 +BuildRoot: %{_tmppath}/manos-%{version}-build +BuildRequires: mono-devel >= 2.6 +BuildRequires: mono-nunit >= 2.6 +Source0: manos-%{version}.tar.bz2 +Source1: rpmlintrc +Summary: The Manos Web Application Framework +Group: Development/Web/Servers +BuildArch: noarch + +%description +Manos is an easy to use, easy to test, high performance web application framework that stays out of your way and makes your life ridiculously simple. + +%files +%defattr(-, root, root) +%{_prefix}/lib/manos +%{_bindir}/manos +%{_datadir}/manos +%{_prefix}/lib/pkgconfig/manos.pc +%{_datadir}/man/man1/manos.1.gz + +%prep +%setup -q -n manos-%{version} + + +%build +./configure --prefix=%{buildroot}%{_prefix} --install-prefix=%{_prefix} +make + +%install +make install + +%clean +rm -rf %{buildroot} + +%changelog \ No newline at end of file From 51d7c8f905e3d3cd803628e94da6116e4a98dbb9 Mon Sep 17 00:00:00 2001 From: Alhadis Date: Mon, 29 Aug 2016 00:52:15 +1000 Subject: [PATCH 0030/1214] Use a dedicated grammar to highlight Emacs Lisp --- .gitmodules | 3 +++ grammars.yml | 2 ++ lib/linguist/languages.yml | 2 +- vendor/grammars/language-emacs-lisp | 1 + .../licenses/grammar/language-emacs-lisp.txt | 18 ++++++++++++++++++ 5 files changed, 25 insertions(+), 1 deletion(-) create mode 160000 vendor/grammars/language-emacs-lisp create mode 100644 vendor/licenses/grammar/language-emacs-lisp.txt diff --git a/.gitmodules b/.gitmodules index f245c920ea..ea5847d731 100644 --- a/.gitmodules +++ b/.gitmodules @@ -785,3 +785,6 @@ url = https://github.com/austinwagner/sublime-sourcepawn [submodule "vendor/grammars/xquery"] path = vendor/grammars/xquery url = https://github.com/textmate/xquery.tmbundle +[submodule "vendor/grammars/language-emacs-lisp"] + path = vendor/grammars/language-emacs-lisp + url = https://github.com/Alhadis/language-emacs-lisp diff --git a/grammars.yml b/grammars.yml index 72c5b42292..fb258563b9 100755 --- a/grammars.yml +++ b/grammars.yml @@ -354,6 +354,8 @@ vendor/grammars/language-csound: - source.csound - source.csound-document - source.csound-score +vendor/grammars/language-emacs-lisp: +- source.emacs.lisp vendor/grammars/language-gfm: - source.gfm vendor/grammars/language-graphql: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index f8e97318c8..928a4f14a6 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1027,7 +1027,7 @@ Elm: Emacs Lisp: type: programming - tm_scope: source.lisp + tm_scope: source.emacs.lisp color: "#c065db" aliases: - elisp diff --git a/vendor/grammars/language-emacs-lisp b/vendor/grammars/language-emacs-lisp new file mode 160000 index 0000000000..76ec86a3eb --- /dev/null +++ b/vendor/grammars/language-emacs-lisp @@ -0,0 +1 @@ +Subproject commit 76ec86a3eb1bc819a4f19de7295a19602a935c09 diff --git a/vendor/licenses/grammar/language-emacs-lisp.txt b/vendor/licenses/grammar/language-emacs-lisp.txt new file mode 100644 index 0000000000..46603bd34d --- /dev/null +++ b/vendor/licenses/grammar/language-emacs-lisp.txt @@ -0,0 +1,18 @@ +--- +type: grammar +name: language-emacs-lisp +license: isc +--- +Copyright (c) 2016, John Gardner + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. From 5ddccaac83bb1a498c6f6c1ec9f9284fc379a9bc Mon Sep 17 00:00:00 2001 From: Alhadis Date: Mon, 29 Aug 2016 01:08:10 +1000 Subject: [PATCH 0031/1214] Add ".spacemacs" as a recognised filename --- lib/linguist/languages.yml | 1 + samples/Emacs Lisp/filenames/.spacemacs | 197 ++++++++++++++++++++++++ 2 files changed, 198 insertions(+) create mode 100644 samples/Emacs Lisp/filenames/.spacemacs diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 928a4f14a6..90ebc59f3f 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1035,6 +1035,7 @@ Emacs Lisp: filenames: - .emacs - .emacs.desktop + - .spacemacs extensions: - .el - .emacs diff --git a/samples/Emacs Lisp/filenames/.spacemacs b/samples/Emacs Lisp/filenames/.spacemacs new file mode 100644 index 0000000000..a646eba097 --- /dev/null +++ b/samples/Emacs Lisp/filenames/.spacemacs @@ -0,0 +1,197 @@ +;; -*- mode: emacs-lisp -*- +;; This file is loaded by Spacemacs at startup. +;; It must be stored in your home directory. + +(defun dotspacemacs/layers () + "Configuration Layers declaration." + (setq-default + ;; List of additional paths where to look for configuration layers. + ;; Paths must have a trailing slash (i.e. `~/.mycontribs/') + dotspacemacs-configuration-layer-path '() + ;; List of configuration layers to load. If it is the symbol `all' instead + ;; of a list then all discovered layers will be installed. + dotspacemacs-configuration-layers + '( + ;; ---------------------------------------------------------------- + ;; Example of useful layers you may want to use right away. + ;; Uncomment some layer names and press (Vim style) or + ;; (Emacs style) to install them. + ;; ---------------------------------------------------------------- + emacs-lisp + charlock_holmes + escape_utils + mime-types + rugged + minitest + mocha + plist + pry + rake + yajl-ruby + colour-proximity + licensed + licensee + ;; List of additional packages that will be installed without being + ;; wrapped in a layer. If you need some configuration for these + ;; packages then consider to create a layer, you can also put the + ;; configuration in `dotspacemacs/config'. + dotspacemacs-additional-packages '() + ;; A list of packages and/or extensions that will not be install and loaded. + dotspacemacs-excluded-packages '() + ;; If non-nil spacemacs will delete any orphan packages, i.e. packages that + ;; are declared in a layer which is not a member of + ;; the list `dotspacemacs-configuration-layers' + dotspacemacs-delete-orphan-packages t)) + +(defun dotspacemacs/init () + "Initialization function. +This function is called at the very startup of Spacemacs initialization +before layers configuration." + ;; This setq-default sexp is an exhaustive list of all the supported + ;; spacemacs settings. + (setq-default + ;; Either `vim' or `emacs'. Evil is always enabled but if the variable + ;; is `emacs' then the `holy-mode' is enabled at startup. + dotspacemacs-editing-style 'vim + ;; If non nil output loading progress in `*Messages*' buffer. + dotspacemacs-verbose-loading nil + ;; Specify the startup banner. Default value is `official', it displays + ;; the official spacemacs logo. An integer value is the index of text + ;; banner, `random' chooses a random text banner in `core/banners' + ;; directory. A string value must be a path to an image format supported + ;; by your Emacs build. + ;; If the value is nil then no banner is displayed. + dotspacemacs-startup-banner 'official + ;; List of items to show in the startup buffer. If nil it is disabled. + ;; Possible values are: `recents' `bookmarks' `projects'." + dotspacemacs-startup-lists '(bookmarks projects recents) + ;; List of themes, the first of the list is loaded when spacemacs starts. + ;; Press T n to cycle to the next theme in the list (works great + ;; with 2 themes variants, one dark and one light) + dotspacemacs-themes '( + spacemacs-dark + spacemacs-light + solarized-dark + solarized-light + atom-light-ui + atom-dark-ui + atom-material-ui + zenburn + ;; If non nil the cursor colour matches the state colour. + dotspacemacs-colorize-cursor-according-to-state t + ;; Default font. `powerline-scale' allows to quickly tweak the mode-line + ;; size to make separators look not too crappy. + dotspacemacs-default-font '("Menloco" + :size 11 + :weight normal + :width normal + :powerline-scale 1.1) + ;; The leader key + dotspacemacs-leader-key "SPC" + ;; The leader key accessible in `emacs state' and `insert state' + dotspacemacs-emacs-leader-key "M-m" + ;; Major mode leader key is a shortcut key which is the equivalent of + ;; pressing ` m`. Set it to `nil` to disable it. + dotspacemacs-major-mode-leader-key "," + ;; Major mode leader key accessible in `emacs state' and `insert state' + dotspacemacs-major-mode-emacs-leader-key "C-M-m" + ;; The command key used for Evil commands (ex-commands) and + ;; Emacs commands (M-x). + ;; By default the command key is `:' so ex-commands are executed like in Vim + ;; with `:' and Emacs commands are executed with ` :'. + dotspacemacs-command-key ":" + ;; Location where to auto-save files. Possible values are `original' to + ;; auto-save the file in-place, `cache' to auto-save the file to another + ;; file stored in the cache directory and `nil' to disable auto-saving. + ;; Default value is `cache'. + dotspacemacs-auto-save-file-location 'cache + ;; If non nil then `ido' replaces `helm' for some commands. For now only + ;; `find-files' (SPC f f) is replaced. + dotspacemacs-use-ido nil + ;; If non nil the paste micro-state is enabled. When enabled pressing `p` + ;; several times cycle between the kill ring content. + dotspacemacs-enable-paste-micro-state nil + ;; Guide-key delay in seconds. The Guide-key is the popup buffer listing + ;; the commands bound to the current keystrokes. + dotspacemacs-guide-key-delay 0.4 + ;; If non nil a progress bar is displayed when spacemacs is loading. This + ;; may increase the boot time on some systems and emacs builds, set it to + ;; nil ;; to boost the loading time. + dotspacemacs-loading-progress-bar t + ;; If non nil the frame is fullscreen when Emacs starts up. + ;; (Emacs 24.4+ only) + dotspacemacs-fullscreen-at-startup nil + ;; If non nil `spacemacs/toggle-fullscreen' will not use native fullscreen. + ;; Use to disable fullscreen animations in OSX." + dotspacemacs-fullscreen-use-non-native nil + ;; If non nil the frame is maximized when Emacs starts up. + ;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil. + ;; (Emacs 24.4+ only) + dotspacemacs-maximized-at-startup nil + ;; A value from the range (0..100), in increasing opacity, which describes + ;; the transparency level of a frame when it's active or selected. + ;; Transparency can be toggled through `toggle-transparency'. + dotspacemacs-active-transparency 90 + ;; A value from the range (0..100), in increasing opacity, which describes + ;; the transparency level of a frame when it's inactive or deselected. + ;; Transparency can be toggled through `toggle-transparency'. + dotspacemacs-inactive-transparency 90 + ;; If non nil unicode symbols are displayed in the mode line. + dotspacemacs-mode-line-unicode-symbols t + ;; If non nil smooth scrolling (native-scrolling) is enabled. Smooth + ;; scrolling overrides the default behavior of Emacs which recenters the + ;; point when it reaches the top or bottom of the screen. + dotspacemacs-smooth-scrolling t + ;; If non-nil smartparens-strict-mode will be enabled in programming modes. + dotspacemacs-smartparens-strict-mode nil + ;; Select a scope to highlight delimiters. Possible value is `all', + ;; `current' or `nil'. Default is `all' + dotspacemacs-highlight-delimiters 'all + ;; If non nil advises quit functions to keep server open when quitting. + dotspacemacs-persistent-server nil + ;; List of search tool executable names. Spacemacs uses the first installed + ;; tool of the list. Supported tools are `ag', `pt', `ack' and `grep'. + dotspacemacs-search-tools '("ag" "pt" "ack" "grep") + ;; The default package repository used if no explicit repository has been + ;; specified with an installed package. + ;; Not used for now. + dotspacemacs-default-package-repository nil + + ;; If non nil line numbers are turned on in all `prog-mode' and `text-mode' + ;; derivatives. If set to `relative', also turns on relative line numbers. + ;; (default nil) + dotspacemacs-line-numbers 'relative + + ;; Delete whitespace while saving buffer. Possible values are `all', + ;; `trailing', `changed' or `nil'. Default is `changed' (cleanup whitespace + ;; on changed lines) (default 'changed) + dotspacemacs-whitespace-cleanup 'changed + ) + ;; User initialization goes here + ) + +(defun dotspacemacs/user-config () + "Configuration function. + This function is called at the very end of Spacemacs initialization after +layers configuration." + (add-hook 'alchemist-mode-hook 'company-mode) + + (add-hook 'projectile-mode-hook 'projectile-rails-on) + (setq ruby-insert-encoding-magic-comment nil) + + (setq web-mode-markup-indent-offset 2) + (setq web-mode-code-indent-offset 2) + + (spacemacs/toggle-golden-ratio-on) + (spacemacs/toggle-indent-guide-globally-on) + (spacemacs/toggle-centered-point-globally-on) +) + +;; Do not write anything past this comment. This is where Emacs will +;; auto-generate custom variable definitions. +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. +) From f95365946c3f25cf236e9d96fdf2bb54dbdd29d7 Mon Sep 17 00:00:00 2001 From: Alhadis Date: Mon, 29 Aug 2016 01:43:44 +1000 Subject: [PATCH 0032/1214] Separate CSON from CoffeeScript --- lib/linguist/languages.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index f8e97318c8..ad13c8f9e0 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -526,6 +526,15 @@ COLLADA: tm_scope: text.xml ace_mode: xml +CSON: + type: data + group: CoffeeScript + tm_scope: source.coffee + ace_mode: coffee + searchable: false + extensions: + - .cson + CSS: type: markup tm_scope: source.css @@ -648,7 +657,6 @@ CoffeeScript: - ._coffee - .cake - .cjsx - - .cson - .iced filenames: - Cakefile From 48b64c2d31831ff1039fd5e190b8162aa2473c5c Mon Sep 17 00:00:00 2001 From: Alhadis Date: Mon, 29 Aug 2016 01:57:32 +1000 Subject: [PATCH 0033/1214] Add CSON samples --- samples/CSON/base.cson | 72 +++++++++++++++++++++ samples/CSON/config.cson | 59 +++++++++++++++++ samples/CSON/ff-sfd.cson | 108 +++++++++++++++++++++++++++++++ samples/CSON/wercker-status.cson | 11 ++++ 4 files changed, 250 insertions(+) create mode 100644 samples/CSON/base.cson create mode 100644 samples/CSON/config.cson create mode 100644 samples/CSON/ff-sfd.cson create mode 100644 samples/CSON/wercker-status.cson diff --git a/samples/CSON/base.cson b/samples/CSON/base.cson new file mode 100644 index 0000000000..d9941643c9 --- /dev/null +++ b/samples/CSON/base.cson @@ -0,0 +1,72 @@ +'atom-text-editor': + # Platform Bindings + 'home': 'editor:move-to-first-character-of-line' + 'end': 'editor:move-to-end-of-screen-line' + 'shift-home': 'editor:select-to-first-character-of-line' + 'shift-end': 'editor:select-to-end-of-line' + +'atom-text-editor:not([mini])': + # Atom Specific + 'ctrl-C': 'editor:copy-path' + + # Sublime Parity + 'tab': 'editor:indent' + 'enter': 'editor:newline' + 'shift-tab': 'editor:outdent-selected-rows' + 'ctrl-K': 'editor:delete-line' + +'.select-list atom-text-editor[mini]': + 'enter': 'core:confirm' + +'.tool-panel.panel-left, .tool-panel.panel-right': + 'escape': 'tool-panel:unfocus' + +'atom-text-editor !important, atom-text-editor[mini] !important': + 'escape': 'editor:consolidate-selections' + +# allow standard input fields to work correctly +'body .native-key-bindings': + 'tab': 'core:focus-next' + 'shift-tab': 'core:focus-previous' + 'enter': 'native!' + 'backspace': 'native!' + 'shift-backspace': 'native!' + 'delete': 'native!' + 'up': 'native!' + 'down': 'native!' + 'shift-up': 'native!' + 'shift-down': 'native!' + 'alt-up': 'native!' + 'alt-down': 'native!' + 'alt-shift-up': 'native!' + 'alt-shift-down': 'native!' + 'cmd-up': 'native!' + 'cmd-down': 'native!' + 'cmd-shift-up': 'native!' + 'cmd-shift-down': 'native!' + 'ctrl-up': 'native!' + 'ctrl-down': 'native!' + 'ctrl-shift-up': 'native!' + 'ctrl-shift-down': 'native!' + 'left': 'native!' + 'right': 'native!' + 'shift-left': 'native!' + 'shift-right': 'native!' + 'alt-left': 'native!' + 'alt-right': 'native!' + 'alt-shift-left': 'native!' + 'alt-shift-right': 'native!' + 'cmd-left': 'native!' + 'cmd-right': 'native!' + 'cmd-shift-left': 'native!' + 'cmd-shift-right': 'native!' + 'ctrl-left': 'native!' + 'ctrl-right': 'native!' + 'ctrl-shift-left': 'native!' + 'ctrl-shift-right': 'native!' + 'ctrl-b': 'native!' + 'ctrl-f': 'native!' + 'ctrl-F': 'native!' + 'ctrl-B': 'native!' + 'ctrl-h': 'native!' + 'ctrl-d': 'native!' diff --git a/samples/CSON/config.cson b/samples/CSON/config.cson new file mode 100644 index 0000000000..5b0415b2c2 --- /dev/null +++ b/samples/CSON/config.cson @@ -0,0 +1,59 @@ +directoryIcons: + + Atom: + icon: "atom" + match: /^\.atom$/ + colour: "dark-green" + + Bower: + icon: "bower" + match: /^bower[-_]components$/ + colour: "bower" + + Dropbox: + icon: "dropbox" + match: /^(?:Dropbox|\.dropbox\.cache)$/ + colour: "medium-blue" + + Git: + icon: "git" + match: /^\.git$/ + + GitHub: + icon: "github" + match: /^\.github$/ + + Meteor: + icon: "meteor" + match: /^\.meteor$/ + + NodeJS: + icon: "node" + match: /^node_modules$/ + colour: "medium-green" + + Package: + icon: "package" + match: /^\.bundle$/i + + TextMate: + icon: "textmate" + match: ".tmBundle" + + +fileIcons: + + ABAP: + icon: "abap" + scope: "abp" + match: ".abap" + colour: "medium-orange" + + ActionScript: # Or Flash-related + icon: "as" + match: [ + [".swf", "medium-blue"] + [".as", "medium-red", scope: /\.(?:flex-config|actionscript(?:\.\d+)?)$/i, alias: /ActionScript\s?3|as3/i] + [".jsfl", "auto-yellow"] + [".swc", "dark-red"] + ] diff --git a/samples/CSON/ff-sfd.cson b/samples/CSON/ff-sfd.cson new file mode 100644 index 0000000000..409d5caaa4 --- /dev/null +++ b/samples/CSON/ff-sfd.cson @@ -0,0 +1,108 @@ +name: "Spline Font Database" +scopeName: "text.sfd" +fileTypes: ["sfd"] +firstLineMatch: "^SplineFontDB: [\\d.]+" +patterns: [include: "#main"] + +repository: + main: + patterns: [ + {include: "#punctuation"} + {include: "#private"} + {include: "#image"} + {include: "#pickleData"} + {include: "#sections"} + {include: "#copyright"} + {include: "#property"} + {include: "#control"} + {include: "#address"} + {include: "#encoding"} + {include: "source.fontforge#shared"} + {include: "#colour"} + ] + + punctuation: + patterns: [ + {match: "<|>", name: "punctuation.definition.brackets.angle.sfd"} + {match: "[{}]", name: "punctuation.definition.brackets.curly.sfd"} + ] + + private: + name: "meta.section.private.sfd" + begin: "^BeginPrivate(?=:)" + end: "^EndPrivate\\b" + beginCaptures: 0: name: "keyword.control.begin.private.sfd" + endCaptures: 0: name: "keyword.control.end.private.sfd" + patterns: [ + {match: "^\\S+", name: "entity.name.private.property.sfd"} + {include: "$self"} + ] + + image: + name: "meta.image.sfd" + begin: "^(Image)(?=:)(.+)$" + end: "^(EndImage)\\b" + contentName: "string.unquoted.raw.data.sfd" + beginCaptures: + 1: name: "keyword.control.begin.image.sfd" + 2: patterns: [include: "$self"] + endCaptures: + 1: name: "keyword.control.end.image.sfd" + + pickleData: + name: "meta.pickle-data.sfd" + begin: "^(PickledData)(:)\\s*(\")" + end: '"' + beginCaptures: + 1: name: "entity.name.property.sfd" + 2: name: "punctuation.separator.dictionary.key-value.sfd" + 3: name: "punctuation.definition.string.begin.sfd" + endCaptures: + 0: name: "punctuation.definition.string.end.sfd" + patterns: [match: "\\\\.", name: "constant.character.escape.sfd"] + + sections: + name: "meta.section.${2:/downcase}.sfd" + begin: "^(Start|Begin)([A-Z]\\w+)(?=:)" + end: "^(End\\2)\\b" + beginCaptures: 0: name: "keyword.control.begin.${2:/downcase}.sfd" + endCaptures: 0: name: "keyword.control.end.${2:/downcase}.sfd" + patterns: [include: "$self"] + + control: + name: "keyword.control.${1:/downcase}.sfd" + match: "\\b(Fore|Back|SplineSet|^End\\w+)\\b" + + colour: + name: "constant.other.hex.colour.sfd" + match: "(#)[A-Fa-f0-9]{3,}|(?<=\\s)[A-Fa-f0-9]{6,8}" + captures: + 1: name: "punctuation.definition.colour.sfd" + + encoding: + name: "constant.language.encoding.sfd" + match: "(?i)\\b(ISO[-\\w]+)(?<=\\d)(?=\\s|$)" + + # Don't highlight numbers in freeform strings (years/version strings) + copyright: + name: "meta.${1:/downcase}-string.sfd" + begin: "^(Copyright|U?Comments?|\\w+Name)(:)" + end: "$" + beginCaptures: + 1: name: "entity.name.property.sfd" + 2: name: "punctuation.separator.dictionary.key-value.sfd" + patterns: [include: "source.fontforge#stringEscapes"] + + # No idea what this is, but it looks distracting without a fix + # Assuming it's referring to a memory register or something. + address: + match: "\\d+[xX][A-Fa-f0-9]+" + name: "constant.numeric.hexadecimal.sfd" + + property: + match: "^([^:]+)(:)" + name: "meta.dictionary.key-value.sfd" + captures: + 1: name: "entity.name.property.sfd" + 2: name: "punctuation.separator.dictionary.key-value.sfd" + diff --git a/samples/CSON/wercker-status.cson b/samples/CSON/wercker-status.cson new file mode 100644 index 0000000000..f4572b7ae4 --- /dev/null +++ b/samples/CSON/wercker-status.cson @@ -0,0 +1,11 @@ +'menu': [ + { + 'label': 'Packages' + 'submenu': [ + 'label': 'Wercker Status' + 'submenu': [ + { 'label': 'Check now!', 'command': 'wercker-status:checknow' } + ] + ] + } +] From e930ee1a8e0672e1053c8bd7bd1a102f1d707054 Mon Sep 17 00:00:00 2001 From: Alhadis Date: Mon, 29 Aug 2016 02:24:21 +1000 Subject: [PATCH 0034/1214] Fix typos --- bin/git-linguist | 4 ++-- lib/linguist/languages.yml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/git-linguist b/bin/git-linguist index 9e525bb5b0..d390530e84 100755 --- a/bin/git-linguist +++ b/bin/git-linguist @@ -23,7 +23,7 @@ class GitLinguist if @incremental && stats = load_language_stats old_commit_oid, old_stats = stats - # A cache with NULL oid means that we want to froze + # A cache with NULL oid means that we want to freeze # these language stats in place and stop computing # them (for performance reasons) return old_stats if old_commit_oid == NULL_OID @@ -111,7 +111,7 @@ def git_linguist(args) parser.parse!(args) git_dir = `git rev-parse --git-dir`.strip - raise "git-linguist must be ran in a Git repository (#{Dir.pwd})" unless $?.success? + raise "git-linguist must be run in a Git repository (#{Dir.pwd})" unless $?.success? wrapper = GitLinguist.new(git_dir, commit, incremental) case args.pop diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index f8e97318c8..90aa13f623 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -12,7 +12,7 @@ # listed alphabetically) # interpreters - An Array of associated interpreters # searchable - Boolean flag to enable searching (defaults to true) -# search_term - Deprecated: Some languages maybe indexed under a +# search_term - Deprecated: Some languages may be indexed under a # different alias. Avoid defining new exceptions. # color - CSS hex color to represent the language. # tm_scope - The TextMate scope that represents this programming @@ -23,9 +23,9 @@ # in the statistics as the parent language. # # Any additions or modifications (even trivial) should have corresponding -# test change in `test/test_blob.rb`. +# test changes in `test/test_blob.rb`. # -# Please keep this list alphabetized. Capitalization comes before lower case. +# Please keep this list alphabetized. Capitalization comes before lowercase. 1C Enterprise: type: programming From 00647be11339df96198b6003b946386cb438bd0a Mon Sep 17 00:00:00 2001 From: Adrian Sieber Date: Wed, 31 Aug 2016 14:56:07 +0000 Subject: [PATCH 0035/1214] Exclude "dist" directory from language statistics --- lib/linguist/vendor.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/linguist/vendor.yml b/lib/linguist/vendor.yml index 6b8c7364af..5f9d6bcccb 100644 --- a/lib/linguist/vendor.yml +++ b/lib/linguist/vendor.yml @@ -15,6 +15,9 @@ # Dependencies - ^[Dd]ependencies/ +# Distributions +- (^|/)dist/ + # C deps # https://github.com/joyent/node - ^deps/ From 50bd2cc3c8e8f391168aedb0e88eeeee997deba8 Mon Sep 17 00:00:00 2001 From: Shaun Akhtar Date: Wed, 31 Aug 2016 12:56:02 -0400 Subject: [PATCH 0036/1214] Add support for Schematron XML validation files (.sch) Update languages.yml and add three public domain sample documents. --- lib/linguist/languages.yml | 1 + samples/XML/HITSP_C32.sch | 207 +++++++++++++++++++++++++++++++ samples/XML/namespace-strict.sch | 84 +++++++++++++ samples/XML/oasis-table.sch | 151 ++++++++++++++++++++++ 4 files changed, 443 insertions(+) create mode 100644 samples/XML/HITSP_C32.sch create mode 100644 samples/XML/namespace-strict.sch create mode 100644 samples/XML/oasis-table.sch diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index f8e97318c8..189778737e 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -4139,6 +4139,7 @@ XML: - .rdf - .resx - .rss + - .sch - .scxml - .sfproj - .srdf diff --git a/samples/XML/HITSP_C32.sch b/samples/XML/HITSP_C32.sch new file mode 100644 index 0000000000..62750fddff --- /dev/null +++ b/samples/XML/HITSP_C32.sch @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + + + + + + + + +]> + + + HITSP_C32 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + &ent-2.16.840.1.113883.3.88.11.32.1; + + + + + &ent-2.16.840.1.113883.3.88.11.32.2; + + + + + &ent-2.16.840.1.113883.3.88.11.32.3; + + + + + &ent-2.16.840.1.113883.3.88.11.32.4; + + + + + &ent-2.16.840.1.113883.3.88.11.32.5; + + + + + &ent-2.16.840.1.113883.3.88.11.32.6; + + + + + &ent-2.16.840.1.113883.3.88.11.32.7; + + + + + &ent-2.16.840.1.113883.3.88.11.32.8; + + + + + &ent-2.16.840.1.113883.3.88.11.32.9; + + + + + &ent-2.16.840.1.113883.3.88.11.32.10; + + + + + &ent-2.16.840.1.113883.3.88.11.32.11; + + + + + &ent-2.16.840.1.113883.3.88.11.32.12; + + + + + &ent-2.16.840.1.113883.3.88.11.32.13; + + + + + &ent-2.16.840.1.113883.3.88.11.32.14; + + + + + &ent-2.16.840.1.113883.3.88.11.32.15; + + + + + &ent-2.16.840.1.113883.3.88.11.32.16; + + + + + &ent-2.16.840.1.113883.3.88.11.32.17; + + diff --git a/samples/XML/namespace-strict.sch b/samples/XML/namespace-strict.sch new file mode 100644 index 0000000000..f55a5143f0 --- /dev/null +++ b/samples/XML/namespace-strict.sch @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + > + + + + + + + + + + + + + Unrecognized namespace prefix: + + + + Unrecognized namespace URI: + + + + + + Prefix + assigned incorrectly: + + + + + + + Namespace may not be declared here. + + + Namespace may not be undeclared here. + + + + + + + + + + \ No newline at end of file diff --git a/samples/XML/oasis-table.sch b/samples/XML/oasis-table.sch new file mode 100644 index 0000000000..c947aeb256 --- /dev/null +++ b/samples/XML/oasis-table.sch @@ -0,0 +1,151 @@ + + + + + + + + + OASIS/CALS table validation + + + + + + + + + + + + + + + + tgroup/@cols is not given + @cols should be a natural number + (integer greater than zero). + The tgroup has + colspec, + but its @cols is given as ''. + tgroup/@cols is given as + , but all rows have entr. + + Without assigning @char or @charoff to everything, + assigning @align='char' to tgroup only aligns contents to right of center. + + + + + Malformed @colwidth. + @colwidth unit + () is not consistent with the + units on other colspecs. + + @colwidth must be positive + The same unit of measure should be used on every + colspec/@colwidth. + + @colnum + '' does not correspond to + the column's actual number () + The same @colname is assigned to more than + one colspec. + @align='char', but no @char is given. + @char is given, but alignment is not 'char'. + @charoff is given, but alignment is not 'char'. + + + + + + + + The row doesn't have enough entries ( + expected; + given). + + + + + No colspec is + named . + Entry's end + column () must follow its start column + (). + No colspec is + named . + No colspec is + named . + Entry is assigned an end + column () but not a start column. + Entry is assigned to column , + so it can't start at column . + + + + Entry must be assigned to a free column (after its preceding entries). + + + This entry doesn't fit into + its . + + + A row in which this entry appears has too many entries. + + + + Entry does not fit in row. ( are allowed; entry + is in column .) + + + + @char is given, but alignment is not 'char'. + @charoff is given, but alignment is not 'char'. + @charoff must be a whole number between 0 and 100. + + Entry is designated for character alignment, but no character (@char) is given on it or its colspec. + + + Entry is assigned an alignment character () + different from its column's (). + With @align='char', markup of + entry contents () will be ignored. + + + \ No newline at end of file From a8719f3e8242d23be06ed1415950db17b9135ded Mon Sep 17 00:00:00 2001 From: Alhadis Date: Tue, 6 Sep 2016 23:05:27 +1000 Subject: [PATCH 0037/1214] Add script to generate grammars-list in Markdown --- script/list-grammars | 69 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100755 script/list-grammars diff --git a/script/list-grammars b/script/list-grammars new file mode 100755 index 0000000000..d58f9ef26a --- /dev/null +++ b/script/list-grammars @@ -0,0 +1,69 @@ +#!/usr/bin/env ruby + +require "linguist" +require "json" +require "yaml" + +root = File.expand_path "../../", __FILE__ + +language_names = Linguist::Language.all.map(&:name).sort { |a, b| a.downcase() <=> b.downcase() } + + +# Shorten a repository URL +def shorten(url) + if url =~ /^https?:\/\/(?:www\.)?github\.com\/([^\/]+\/[^\/]+)/i + $1 + elsif url =~ /^https?:\/\/(?:www\.)?(bitbucket|gitlab)\.(?:com|org)\/([^\/]+\/[^\/]+)/i + "#{$1.downcase()}:#{$2}" + else + url.replace(/^https?:\/\/(?:www\.)?/i, "") + end +end + +# Load .gitmodules +submodules = {} +submodule_file = File.read("#{root}/.gitmodules") +pattern = /^\[submodule\s*"([^"]+)"\]$\n((?:^(?!\[).+(?:\n|$))+)/is +submodule_file.scan(pattern) do |id, attr| + submod = {} + submod[:path] = $1 if attr =~ /^\s*path\s*=\s*(.+)$/ + submod[:url] = $1 if attr =~ /^\s*url\s*=\s*(.+)$/ + submod[:url].gsub!(/\.git$/, "") + submod[:short] = shorten(submod[:url]) + submodules["#{id}"] = submod +end + +# Load grammars.yml +submodules_by_scope = {} +grammars = YAML.load_file("#{root}/grammars.yml") +grammars.each do |path, scopes| + scopes.each { |scope| submodules_by_scope[scope] = path } +end + + +# Markdown: Generate grammar list +markdown = "" +language_names.each do |item| + lang = Linguist::Language["#{item}"] + scope = lang.tm_scope + next if scope == "none" + path = submodules_by_scope[scope] || scope + case path + when "https://bitbucket.org/Clams/sublimesystemverilog/get/default.tar.gz" + short_url = "bitbucket:Clams/sublimesystemverilog" + long_url = "https://bitbucket.org/Clams/sublimesystemverilog" + when "http://svn.edgewall.org/repos/genshi/contrib/textmate/Genshi.tmbundle/Syntaxes/Markup%20Template%20%28XML%29.tmLanguage" + short_url = "genshi.edgewall.org/query" + long_url = "https://genshi.edgewall.org/query" + when "vendor/grammars/oz-tmbundle/Syntaxes/Oz.tmLanguage" + short_url = "eregon/oz-tmbundle" + long_url = "https://github.com/eregon/oz-tmbundle" + else + submodule = submodules[submodules_by_scope[scope]] + short_url = submodule[:short] + long_url = submodule[:url] + end + markdown += "- **#{item}:** [#{short_url}](#{long_url})\n" +end + +puts markdown From 49e9ee48d0f7207587ca23ec37f7e5354015cd3e Mon Sep 17 00:00:00 2001 From: Alhadis Date: Wed, 7 Sep 2016 00:09:24 +1000 Subject: [PATCH 0038/1214] Make grammar-listing code more modular --- script/list-grammars | 145 ++++++++++++++++++++++++++----------------- 1 file changed, 88 insertions(+), 57 deletions(-) diff --git a/script/list-grammars b/script/list-grammars index d58f9ef26a..16a7ef859a 100755 --- a/script/list-grammars +++ b/script/list-grammars @@ -4,66 +4,97 @@ require "linguist" require "json" require "yaml" -root = File.expand_path "../../", __FILE__ -language_names = Linguist::Language.all.map(&:name).sort { |a, b| a.downcase() <=> b.downcase() } - - -# Shorten a repository URL -def shorten(url) - if url =~ /^https?:\/\/(?:www\.)?github\.com\/([^\/]+\/[^\/]+)/i - $1 - elsif url =~ /^https?:\/\/(?:www\.)?(bitbucket|gitlab)\.(?:com|org)\/([^\/]+\/[^\/]+)/i - "#{$1.downcase()}:#{$2}" - else - url.replace(/^https?:\/\/(?:www\.)?/i, "") +class GrammarList + + ROOT = File.expand_path "../../", __FILE__ + + def initialize + @submodules = load_submodules() + @sources = load_sources() + @language_names = load_languages() end -end - -# Load .gitmodules -submodules = {} -submodule_file = File.read("#{root}/.gitmodules") -pattern = /^\[submodule\s*"([^"]+)"\]$\n((?:^(?!\[).+(?:\n|$))+)/is -submodule_file.scan(pattern) do |id, attr| - submod = {} - submod[:path] = $1 if attr =~ /^\s*path\s*=\s*(.+)$/ - submod[:url] = $1 if attr =~ /^\s*url\s*=\s*(.+)$/ - submod[:url].gsub!(/\.git$/, "") - submod[:short] = shorten(submod[:url]) - submodules["#{id}"] = submod -end - -# Load grammars.yml -submodules_by_scope = {} -grammars = YAML.load_file("#{root}/grammars.yml") -grammars.each do |path, scopes| - scopes.each { |scope| submodules_by_scope[scope] = path } -end - + + + # Load .gitmodules + def load_submodules + submodules = {} + submodule_file = File.read("#{ROOT}/.gitmodules") + pattern = /^\[submodule\s*"([^"]+)"\]$\n((?:^(?!\[).+(?:\n|$))+)/is + submodule_file.scan(pattern) do |id, attr| + submod = {} + submod[:path] = $1 if attr =~ /^\s*path\s*=\s*(.+)$/ + submod[:url] = $1 if attr =~ /^\s*url\s*=\s*(.+)$/ + submod[:url].gsub!(/\.git$/, "") + submod[:short] = shorten(submod[:url]) + submodules["#{id}"] = submod + end + submodules + end + + + # Grab the name of each language, sorted case-insensitively + def load_languages + Linguist::Language.all.map(&:name).sort do |a, b| + a.downcase() <=> b.downcase() + end + end + + + # Load grammars.yml + def load_sources + sources = {} + grammars = YAML.load_file("#{ROOT}/grammars.yml") + grammars.each do |path, scopes| + scopes.each { |scope| sources[scope] = path } + end + sources + end + + + # Shorten a repository URL + def shorten(url) + if url =~ /^https?:\/\/(?:www\.)?github\.com\/([^\/]+\/[^\/]+)/i + $1 + elsif url =~ /^https?:\/\/(?:www\.)?(bitbucket|gitlab)\.(?:com|org)\/([^\/]+\/[^\/]+)/i + "#{$1.downcase()}:#{$2}" + else + url.replace(/^https?:\/\/(?:www\.)?/i, "") + end + end + + + # Markdown: Generate grammar list + def to_markdown + markdown = "" + @language_names.each do |item| + lang = Linguist::Language["#{item}"] + scope = lang.tm_scope + next if scope == "none" + path = @sources[scope] || scope + case path + when "https://bitbucket.org/Clams/sublimesystemverilog/get/default.tar.gz" + short_url = "bitbucket:Clams/sublimesystemverilog" + long_url = "https://bitbucket.org/Clams/sublimesystemverilog" + when "http://svn.edgewall.org/repos/genshi/contrib/textmate/Genshi.tmbundle/Syntaxes/Markup%20Template%20%28XML%29.tmLanguage" + short_url = "genshi.edgewall.org/query" + long_url = "https://genshi.edgewall.org/query" + when "vendor/grammars/oz-tmbundle/Syntaxes/Oz.tmLanguage" + short_url = "eregon/oz-tmbundle" + long_url = "https://github.com/eregon/oz-tmbundle" + else + submodule = @submodules[@sources[scope]] + next unless submodule + short_url = submodule[:short] + long_url = submodule[:url] + end + markdown += "- **#{item}:** [#{short_url}](#{long_url})\n" + end -# Markdown: Generate grammar list -markdown = "" -language_names.each do |item| - lang = Linguist::Language["#{item}"] - scope = lang.tm_scope - next if scope == "none" - path = submodules_by_scope[scope] || scope - case path - when "https://bitbucket.org/Clams/sublimesystemverilog/get/default.tar.gz" - short_url = "bitbucket:Clams/sublimesystemverilog" - long_url = "https://bitbucket.org/Clams/sublimesystemverilog" - when "http://svn.edgewall.org/repos/genshi/contrib/textmate/Genshi.tmbundle/Syntaxes/Markup%20Template%20%28XML%29.tmLanguage" - short_url = "genshi.edgewall.org/query" - long_url = "https://genshi.edgewall.org/query" - when "vendor/grammars/oz-tmbundle/Syntaxes/Oz.tmLanguage" - short_url = "eregon/oz-tmbundle" - long_url = "https://github.com/eregon/oz-tmbundle" - else - submodule = submodules[submodules_by_scope[scope]] - short_url = submodule[:short] - long_url = submodule[:url] + markdown end - markdown += "- **#{item}:** [#{short_url}](#{long_url})\n" end -puts markdown + +list = GrammarList.new +puts list.to_markdown() From 09612ae42ec2ea111011324480e3b33476e1b207 Mon Sep 17 00:00:00 2001 From: Alhadis Date: Wed, 7 Sep 2016 00:21:05 +1000 Subject: [PATCH 0039/1214] Add logic to update Markdown file --- script/list-grammars | 11 +- vendor/README.md | 307 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 317 insertions(+), 1 deletion(-) create mode 100644 vendor/README.md diff --git a/script/list-grammars b/script/list-grammars index 16a7ef859a..d9cb033240 100755 --- a/script/list-grammars +++ b/script/list-grammars @@ -93,8 +93,17 @@ class GrammarList markdown end + + + # Update the file displaying the reader-friendly list of grammar repos + def update_readme + readme = "#{ROOT}/vendor/README.md" + preamble = File.read(readme).match(/\A.+?\n/ms) + list = self.to_markdown + File.write(readme, preamble.to_s + list) + end end list = GrammarList.new -puts list.to_markdown() +puts list.update_readme() diff --git a/vendor/README.md b/vendor/README.md new file mode 100644 index 0000000000..aa3e492f10 --- /dev/null +++ b/vendor/README.md @@ -0,0 +1,307 @@ +Grammar index +============= + +This is a list of grammars that Linguist selects to provide syntax highlighting on GitHub. + +If you've encountered an error with highlighting, please report it to the appropriate repository. + + + +- **1C Enterprise:** [xDrivenDevelopment/atom-language-1c-bsl](https://github.com/xDrivenDevelopment/atom-language-1c-bsl) +- **ABAP:** [pvl/abap.tmbundle](https://github.com/pvl/abap.tmbundle) +- **ActionScript:** [honzabrecka/actionscript3-tmbundle](https://github.com/honzabrecka/actionscript3-tmbundle) +- **Ada:** [textmate/ada.tmbundle](https://github.com/textmate/ada.tmbundle) +- **Agda:** [mokus0/Agda.tmbundle](https://github.com/mokus0/Agda.tmbundle) +- **AGS Script:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) +- **Alloy:** [macekond/Alloy.tmbundle](https://github.com/macekond/Alloy.tmbundle) +- **Alpine Abuild:** [atom/language-shellscript](https://github.com/atom/language-shellscript) +- **AMPL:** [ampl/sublime-ampl](https://github.com/ampl/sublime-ampl) +- **Ant Build System:** [textmate/ant.tmbundle](https://github.com/textmate/ant.tmbundle) +- **ANTLR:** [textmate/antlr.tmbundle](https://github.com/textmate/antlr.tmbundle) +- **ApacheConf:** [textmate/apache.tmbundle](https://github.com/textmate/apache.tmbundle) +- **Apex:** [textmate/java.tmbundle](https://github.com/textmate/java.tmbundle) +- **APL:** [Alhadis/language-apl](https://github.com/Alhadis/language-apl) +- **Apollo Guidance Computer:** [Alhadis/language-agc](https://github.com/Alhadis/language-agc) +- **AppleScript:** [textmate/applescript.tmbundle](https://github.com/textmate/applescript.tmbundle) +- **Arduino:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) +- **ASN.1:** [ajLangley12/language-asn1](https://github.com/ajLangley12/language-asn1) +- **ASP:** [textmate/asp.tmbundle](https://github.com/textmate/asp.tmbundle) +- **ATS:** [steinwaywhw/ats-mode-sublimetext](https://github.com/steinwaywhw/ats-mode-sublimetext) +- **Awk:** [JohnNilsson/awk-sublime](https://github.com/JohnNilsson/awk-sublime) +- **Befunge:** [johanasplund/sublime-befunge](https://github.com/johanasplund/sublime-befunge) +- **Bison:** [textmate/bison.tmbundle](https://github.com/textmate/bison.tmbundle) +- **BlitzBasic:** [textmate/blitzmax.tmbundle](https://github.com/textmate/blitzmax.tmbundle) +- **BlitzMax:** [textmate/blitzmax.tmbundle](https://github.com/textmate/blitzmax.tmbundle) +- **Bluespec:** [thotypous/sublime-bsv](https://github.com/thotypous/sublime-bsv) +- **Brainfuck:** [Drako/SublimeBrainfuck](https://github.com/Drako/SublimeBrainfuck) +- **Bro:** [bro/bro-sublime](https://github.com/bro/bro-sublime) +- **C:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) +- **C#:** [atom/language-csharp](https://github.com/atom/language-csharp) +- **C++:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) +- **C2hs Haskell:** [atom-haskell/language-haskell](https://github.com/atom-haskell/language-haskell) +- **Cap'n Proto:** [textmate/capnproto.tmbundle](https://github.com/textmate/capnproto.tmbundle) +- **CartoCSS:** [yohanboniface/carto-atom](https://github.com/yohanboniface/carto-atom) +- **Ceylon:** [jeancharles-roger/ceylon-sublimetext](https://github.com/jeancharles-roger/ceylon-sublimetext) +- **Chapel:** [chapel-lang/chapel-tmbundle](https://github.com/chapel-lang/chapel-tmbundle) +- **ChucK:** [textmate/java.tmbundle](https://github.com/textmate/java.tmbundle) +- **Cirru:** [Cirru/sublime-cirru](https://github.com/Cirru/sublime-cirru) +- **Clean:** [timjs/atom-language-clean](https://github.com/timjs/atom-language-clean) +- **Clojure:** [atom/language-clojure](https://github.com/atom/language-clojure) +- **CMake:** [textmate/cmake.tmbundle](https://github.com/textmate/cmake.tmbundle) +- **COBOL:** [bitbucket:bitlang/sublime_cobol](https://bitbucket.org/bitlang/sublime_cobol) +- **CoffeeScript:** [atom/language-coffee-script](https://github.com/atom/language-coffee-script) +- **ColdFusion:** [SublimeText/ColdFusion](https://github.com/SublimeText/ColdFusion) +- **ColdFusion CFC:** [SublimeText/ColdFusion](https://github.com/SublimeText/ColdFusion) +- **COLLADA:** [textmate/xml.tmbundle](https://github.com/textmate/xml.tmbundle) +- **Common Lisp:** [textmate/lisp.tmbundle](https://github.com/textmate/lisp.tmbundle) +- **Component Pascal:** [textmate/pascal.tmbundle](https://github.com/textmate/pascal.tmbundle) +- **Cool:** [anunayk/cool-tmbundle](https://github.com/anunayk/cool-tmbundle) +- **Coq:** [mkolosick/Sublime-Coq](https://github.com/mkolosick/Sublime-Coq) +- **Crystal:** [atom-crystal/language-crystal](https://github.com/atom-crystal/language-crystal) +- **Csound:** [nwhetsell/language-csound](https://github.com/nwhetsell/language-csound) +- **Csound Document:** [nwhetsell/language-csound](https://github.com/nwhetsell/language-csound) +- **Csound Score:** [nwhetsell/language-csound](https://github.com/nwhetsell/language-csound) +- **CSS:** [textmate/css.tmbundle](https://github.com/textmate/css.tmbundle) +- **Cucumber:** [cucumber/cucumber-tmbundle](https://github.com/cucumber/cucumber-tmbundle) +- **Cuda:** [harrism/sublimetext-cuda-cpp](https://github.com/harrism/sublimetext-cuda-cpp) +- **Cycript:** [atom/language-javascript](https://github.com/atom/language-javascript) +- **Cython:** [textmate/cython.tmbundle](https://github.com/textmate/cython.tmbundle) +- **D:** [textmate/d.tmbundle](https://github.com/textmate/d.tmbundle) +- **Dart:** [guillermooo/dart-sublime-bundle](https://github.com/guillermooo/dart-sublime-bundle) +- **desktop:** [Mailaender/desktop.tmbundle](https://github.com/Mailaender/desktop.tmbundle) +- **Diff:** [textmate/diff.tmbundle](https://github.com/textmate/diff.tmbundle) +- **DNS Zone:** [sixty4k/st2-zonefile](https://github.com/sixty4k/st2-zonefile) +- **Dockerfile:** [asbjornenge/Docker.tmbundle](https://github.com/asbjornenge/Docker.tmbundle) +- **DTrace:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) +- **Dylan:** [textmate/dylan.tmbundle](https://github.com/textmate/dylan.tmbundle) +- **Eagle:** [textmate/xml.tmbundle](https://github.com/textmate/xml.tmbundle) +- **Ecere Projects:** [textmate/json.tmbundle](https://github.com/textmate/json.tmbundle) +- **edn:** [atom/language-clojure](https://github.com/atom/language-clojure) +- **Eiffel:** [textmate/eiffel.tmbundle](https://github.com/textmate/eiffel.tmbundle) +- **EJS:** [gregory-m/ejs-tmbundle](https://github.com/gregory-m/ejs-tmbundle) +- **Elixir:** [elixir-lang/elixir-tmbundle](https://github.com/elixir-lang/elixir-tmbundle) +- **Emacs Lisp:** [Alhadis/language-emacs-lisp](https://github.com/Alhadis/language-emacs-lisp) +- **EmberScript:** [atom/language-coffee-script](https://github.com/atom/language-coffee-script) +- **EQ:** [atom/language-csharp](https://github.com/atom/language-csharp) +- **Erlang:** [textmate/erlang.tmbundle](https://github.com/textmate/erlang.tmbundle) +- **Factor:** [slavapestov/factor](https://github.com/slavapestov/factor) +- **Fancy:** [fancy-lang/fancy-tmbundle](https://github.com/fancy-lang/fancy-tmbundle) +- **fish:** [l15n/fish-tmbundle](https://github.com/l15n/fish-tmbundle) +- **Forth:** [textmate/forth.tmbundle](https://github.com/textmate/forth.tmbundle) +- **FORTRAN:** [textmate/fortran.tmbundle](https://github.com/textmate/fortran.tmbundle) +- **FreeMarker:** [freemarker/FreeMarker.tmbundle](https://github.com/freemarker/FreeMarker.tmbundle) +- **Frege:** [atom-haskell/language-haskell](https://github.com/atom-haskell/language-haskell) +- **Game Maker Language:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) +- **GCC Machine Description:** [textmate/lisp.tmbundle](https://github.com/textmate/lisp.tmbundle) +- **Genshi:** [genshi.edgewall.org/query](https://genshi.edgewall.org/query) +- **Gentoo Ebuild:** [atom/language-shellscript](https://github.com/atom/language-shellscript) +- **Gentoo Eclass:** [atom/language-shellscript](https://github.com/atom/language-shellscript) +- **Gettext Catalog:** [textmate/gettext.tmbundle](https://github.com/textmate/gettext.tmbundle) +- **GLSL:** [euler0/sublime-glsl](https://github.com/euler0/sublime-glsl) +- **Glyph:** [textmate/tcl.tmbundle](https://github.com/textmate/tcl.tmbundle) +- **Gnuplot:** [mattfoster/gnuplot-tmbundle](https://github.com/mattfoster/gnuplot-tmbundle) +- **Go:** [AlanQuatermain/go-tmbundle](https://github.com/AlanQuatermain/go-tmbundle) +- **Gosu:** [jpcamara/Textmate-Gosu-Bundle](https://github.com/jpcamara/Textmate-Gosu-Bundle) +- **Grace:** [zmthy/grace-tmbundle](https://github.com/zmthy/grace-tmbundle) +- **Gradle:** [alkemist/gradle.tmbundle](https://github.com/alkemist/gradle.tmbundle) +- **Grammatical Framework:** [atom-haskell/language-haskell](https://github.com/atom-haskell/language-haskell) +- **GraphQL:** [rmosolgo/language-graphql](https://github.com/rmosolgo/language-graphql) +- **Graphviz (DOT):** [textmate/graphviz.tmbundle](https://github.com/textmate/graphviz.tmbundle) +- **Groff:** [Alhadis/language-roff](https://github.com/Alhadis/language-roff) +- **Groovy:** [textmate/groovy.tmbundle](https://github.com/textmate/groovy.tmbundle) +- **Groovy Server Pages:** [textmate/java.tmbundle](https://github.com/textmate/java.tmbundle) +- **Hack:** [textmate/php.tmbundle](https://github.com/textmate/php.tmbundle) +- **Haml:** [textmate/ruby-haml.tmbundle](https://github.com/textmate/ruby-haml.tmbundle) +- **Handlebars:** [daaain/Handlebars](https://github.com/daaain/Handlebars) +- **Harbour:** [hernad/atom-language-harbour](https://github.com/hernad/atom-language-harbour) +- **Haskell:** [atom-haskell/language-haskell](https://github.com/atom-haskell/language-haskell) +- **Haxe:** [clemos/haxe-sublime-bundle](https://github.com/clemos/haxe-sublime-bundle) +- **HCL:** [aroben/ruby.tmbundle](https://github.com/aroben/ruby.tmbundle) +- **HTML:** [textmate/html.tmbundle](https://github.com/textmate/html.tmbundle) +- **HTML+Django:** [textmate/python-django.tmbundle](https://github.com/textmate/python-django.tmbundle) +- **HTML+ECR:** [atom-crystal/language-crystal](https://github.com/atom-crystal/language-crystal) +- **HTML+EEX:** [elixir-lang/elixir-tmbundle](https://github.com/elixir-lang/elixir-tmbundle) +- **HTML+ERB:** [aroben/ruby.tmbundle](https://github.com/aroben/ruby.tmbundle) +- **HTML+PHP:** [textmate/php.tmbundle](https://github.com/textmate/php.tmbundle) +- **HTTP:** [httpspec/sublime-highlighting](https://github.com/httpspec/sublime-highlighting) +- **Hy:** [rwtolbert/language-hy](https://github.com/rwtolbert/language-hy) +- **IDL:** [mgalloy/idl.tmbundle](https://github.com/mgalloy/idl.tmbundle) +- **Inform 7:** [erkyrath/language-inform7](https://github.com/erkyrath/language-inform7) +- **INI:** [textmate/ini.tmbundle](https://github.com/textmate/ini.tmbundle) +- **Io:** [textmate/io.tmbundle](https://github.com/textmate/io.tmbundle) +- **Ioke:** [vic/ioke-outdated](https://github.com/vic/ioke-outdated) +- **Isabelle:** [lsf37/Isabelle.tmbundle](https://github.com/lsf37/Isabelle.tmbundle) +- **Isabelle ROOT:** [lsf37/Isabelle.tmbundle](https://github.com/lsf37/Isabelle.tmbundle) +- **Jade:** [davidrios/jade-tmbundle](https://github.com/davidrios/jade-tmbundle) +- **Jasmin:** [atmarksharp/jasmin-sublime](https://github.com/atmarksharp/jasmin-sublime) +- **Java:** [textmate/java.tmbundle](https://github.com/textmate/java.tmbundle) +- **Java Server Pages:** [textmate/java.tmbundle](https://github.com/textmate/java.tmbundle) +- **JavaScript:** [atom/language-javascript](https://github.com/atom/language-javascript) +- **JFlex:** [jflex-de/jflex.tmbundle](https://github.com/jflex-de/jflex.tmbundle) +- **JSON:** [textmate/json.tmbundle](https://github.com/textmate/json.tmbundle) +- **JSON5:** [atom/language-javascript](https://github.com/atom/language-javascript) +- **JSONLD:** [atom/language-javascript](https://github.com/atom/language-javascript) +- **Julia:** [nanoant/Julia.tmbundle](https://github.com/nanoant/Julia.tmbundle) +- **Jupyter Notebook:** [textmate/json.tmbundle](https://github.com/textmate/json.tmbundle) +- **Kit:** [textmate/html.tmbundle](https://github.com/textmate/html.tmbundle) +- **Kotlin:** [vkostyukov/kotlin-sublime-package](https://github.com/vkostyukov/kotlin-sublime-package) +- **LabVIEW:** [textmate/xml.tmbundle](https://github.com/textmate/xml.tmbundle) +- **Lasso:** [bfad/Sublime-Lasso](https://github.com/bfad/Sublime-Lasso) +- **Latte:** [textmate/php-smarty.tmbundle](https://github.com/textmate/php-smarty.tmbundle) +- **Lean:** [leanprover/Lean.tmbundle](https://github.com/leanprover/Lean.tmbundle) +- **LFE:** [textmate/lisp.tmbundle](https://github.com/textmate/lisp.tmbundle) +- **LilyPond:** [textmate/lilypond.tmbundle](https://github.com/textmate/lilypond.tmbundle) +- **Liquid:** [bastilian/validcode-textmate-bundles](https://github.com/bastilian/validcode-textmate-bundles) +- **Literate CoffeeScript:** [atom/language-coffee-script](https://github.com/atom/language-coffee-script) +- **Literate Haskell:** [atom-haskell/language-haskell](https://github.com/atom-haskell/language-haskell) +- **LiveScript:** [paulmillr/LiveScript.tmbundle](https://github.com/paulmillr/LiveScript.tmbundle) +- **LLVM:** [whitequark/llvm.tmbundle](https://github.com/whitequark/llvm.tmbundle) +- **Logos:** [Cykey/Sublime-Logos](https://github.com/Cykey/Sublime-Logos) +- **Logtalk:** [textmate/logtalk.tmbundle](https://github.com/textmate/logtalk.tmbundle) +- **LookML:** [atom/language-yaml](https://github.com/atom/language-yaml) +- **LoomScript:** [ambethia/Sublime-Loom](https://github.com/ambethia/Sublime-Loom) +- **LSL:** [textmate/secondlife-lsl.tmbundle](https://github.com/textmate/secondlife-lsl.tmbundle) +- **Lua:** [textmate/lua.tmbundle](https://github.com/textmate/lua.tmbundle) +- **M:** [textmate/lisp.tmbundle](https://github.com/textmate/lisp.tmbundle) +- **Makefile:** [textmate/make.tmbundle](https://github.com/textmate/make.tmbundle) +- **Mako:** [marconi/mako-tmbundle](https://github.com/marconi/mako-tmbundle) +- **Markdown:** [atom/language-gfm](https://github.com/atom/language-gfm) +- **Mask:** [tenbits/sublime-mask](https://github.com/tenbits/sublime-mask) +- **Mathematica:** [shadanan/mathematica-tmbundle](https://github.com/shadanan/mathematica-tmbundle) +- **Matlab:** [textmate/matlab.tmbundle](https://github.com/textmate/matlab.tmbundle) +- **Maven POM:** [textmate/maven.tmbundle](https://github.com/textmate/maven.tmbundle) +- **Max:** [textmate/json.tmbundle](https://github.com/textmate/json.tmbundle) +- **MAXScript:** [Alhadis/language-maxscript](https://github.com/Alhadis/language-maxscript) +- **Mercury:** [sebgod/mercury-tmlanguage](https://github.com/sebgod/mercury-tmlanguage) +- **Metal:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) +- **Mirah:** [aroben/ruby.tmbundle](https://github.com/aroben/ruby.tmbundle) +- **MoonScript:** [leafo/moonscript-tmbundle](https://github.com/leafo/moonscript-tmbundle) +- **MTML:** [textmate/html.tmbundle](https://github.com/textmate/html.tmbundle) +- **mupad:** [ccreutzig/sublime-MuPAD](https://github.com/ccreutzig/sublime-MuPAD) +- **NCL:** [rpavlick/language-ncl](https://github.com/rpavlick/language-ncl) +- **Nemerle:** [textmate/nemerle.tmbundle](https://github.com/textmate/nemerle.tmbundle) +- **nesC:** [cdwilson/nesC.tmbundle](https://github.com/cdwilson/nesC.tmbundle) +- **NetLinx:** [amclain/sublime-netlinx](https://github.com/amclain/sublime-netlinx) +- **NetLinx+ERB:** [amclain/sublime-netlinx](https://github.com/amclain/sublime-netlinx) +- **NetLogo:** [textmate/lisp.tmbundle](https://github.com/textmate/lisp.tmbundle) +- **NewLisp:** [textmate/lisp.tmbundle](https://github.com/textmate/lisp.tmbundle) +- **Nginx:** [brandonwamboldt/sublime-nginx](https://github.com/brandonwamboldt/sublime-nginx) +- **Nimrod:** [Varriount/NimLime](https://github.com/Varriount/NimLime) +- **Ninja:** [textmate/ninja.tmbundle](https://github.com/textmate/ninja.tmbundle) +- **Nit:** [R4PaSs/Sublime-Nit](https://github.com/R4PaSs/Sublime-Nit) +- **Nix:** [wmertens/sublime-nix](https://github.com/wmertens/sublime-nix) +- **NSIS:** [SublimeText/NSIS](https://github.com/SublimeText/NSIS) +- **Nu:** [jsallis/nu.tmbundle](https://github.com/jsallis/nu.tmbundle) +- **Objective-C:** [textmate/objective-c.tmbundle](https://github.com/textmate/objective-c.tmbundle) +- **Objective-C++:** [textmate/objective-c.tmbundle](https://github.com/textmate/objective-c.tmbundle) +- **Objective-J:** [textmate/javascript-objective-j.tmbundle](https://github.com/textmate/javascript-objective-j.tmbundle) +- **OCaml:** [textmate/ocaml.tmbundle](https://github.com/textmate/ocaml.tmbundle) +- **ooc:** [nilium/ooc.tmbundle](https://github.com/nilium/ooc.tmbundle) +- **Opa:** [mads379/opa.tmbundle](https://github.com/mads379/opa.tmbundle) +- **OpenCL:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) +- **OpenEdge ABL:** [jfairbank/Sublime-Text-2-OpenEdge-ABL](https://github.com/jfairbank/Sublime-Text-2-OpenEdge-ABL) +- **OpenRC runscript:** [atom/language-shellscript](https://github.com/atom/language-shellscript) +- **Oz:** [eregon/oz-tmbundle](https://github.com/eregon/oz-tmbundle) +- **Parrot Internal Representation:** [textmate/parrot.tmbundle](https://github.com/textmate/parrot.tmbundle) +- **Pascal:** [textmate/pascal.tmbundle](https://github.com/textmate/pascal.tmbundle) +- **Perl6:** [MadcapJake/language-perl6fe](https://github.com/MadcapJake/language-perl6fe) +- **PHP:** [textmate/php.tmbundle](https://github.com/textmate/php.tmbundle) +- **PicoLisp:** [textmate/lisp.tmbundle](https://github.com/textmate/lisp.tmbundle) +- **Pike:** [hww3/pike-textmate](https://github.com/hww3/pike-textmate) +- **PLpgSQL:** [textmate/sql.tmbundle](https://github.com/textmate/sql.tmbundle) +- **Pony:** [CausalityLtd/sublime-pony](https://github.com/CausalityLtd/sublime-pony) +- **PostScript:** [textmate/postscript.tmbundle](https://github.com/textmate/postscript.tmbundle) +- **POV-Ray SDL:** [c-lipka/language-povray](https://github.com/c-lipka/language-povray) +- **PowerShell:** [SublimeText/PowerShell](https://github.com/SublimeText/PowerShell) +- **Processing:** [textmate/processing.tmbundle](https://github.com/textmate/processing.tmbundle) +- **Protocol Buffer:** [michaeledgar/protobuf-tmbundle](https://github.com/michaeledgar/protobuf-tmbundle) +- **Python:** [MagicStack/MagicPython](https://github.com/MagicStack/MagicPython) +- **Python traceback:** [atom/language-python](https://github.com/atom/language-python) +- **QMake:** [textmate/cpp-qt.tmbundle](https://github.com/textmate/cpp-qt.tmbundle) +- **QML:** [skozlovf/Sublime-QML](https://github.com/skozlovf/Sublime-QML) +- **R:** [textmate/r.tmbundle](https://github.com/textmate/r.tmbundle) +- **Racket:** [soegaard/racket-highlight-for-github](https://github.com/soegaard/racket-highlight-for-github) +- **RAML:** [atom/language-yaml](https://github.com/atom/language-yaml) +- **RDoc:** [joshaven/RDoc.tmbundle](https://github.com/joshaven/RDoc.tmbundle) +- **REALbasic:** [angryant0007/VBDotNetSyntax](https://github.com/angryant0007/VBDotNetSyntax) +- **Rebol:** [Oldes/Sublime-REBOL](https://github.com/Oldes/Sublime-REBOL) +- **Red:** [Oldes/Sublime-Red](https://github.com/Oldes/Sublime-Red) +- **Ren'Py:** [williamd1k0/language-renpy](https://github.com/williamd1k0/language-renpy) +- **reStructuredText:** [Lukasa/language-restructuredtext](https://github.com/Lukasa/language-restructuredtext) +- **RHTML:** [aroben/ruby.tmbundle](https://github.com/aroben/ruby.tmbundle) +- **RMarkdown:** [atom/language-gfm](https://github.com/atom/language-gfm) +- **RobotFramework:** [shellderp/sublime-robot-plugin](https://github.com/shellderp/sublime-robot-plugin) +- **Rouge:** [atom/language-clojure](https://github.com/atom/language-clojure) +- **Ruby:** [aroben/ruby.tmbundle](https://github.com/aroben/ruby.tmbundle) +- **RUNOFF:** [Alhadis/language-roff](https://github.com/Alhadis/language-roff) +- **Rust:** [jhasse/sublime-rust](https://github.com/jhasse/sublime-rust) +- **Sage:** [MagicStack/MagicPython](https://github.com/MagicStack/MagicPython) +- **SaltStack:** [saltstack/atom-salt](https://github.com/saltstack/atom-salt) +- **SAS:** [rpardee/sas.tmbundle](https://github.com/rpardee/sas.tmbundle) +- **Sass:** [nathos/sass-textmate-bundle](https://github.com/nathos/sass-textmate-bundle) +- **Scala:** [mads379/scala.tmbundle](https://github.com/mads379/scala.tmbundle) +- **Scaml:** [scalate/Scalate.tmbundle](https://github.com/scalate/Scalate.tmbundle) +- **Scheme:** [textmate/scheme.tmbundle](https://github.com/textmate/scheme.tmbundle) +- **Scilab:** [textmate/scilab.tmbundle](https://github.com/textmate/scilab.tmbundle) +- **SCSS:** [MarioRicalde/SCSS.tmbundle](https://github.com/MarioRicalde/SCSS.tmbundle) +- **Shell:** [atom/language-shellscript](https://github.com/atom/language-shellscript) +- **ShellSession:** [atom/language-shellscript](https://github.com/atom/language-shellscript) +- **Slash:** [slash-lang/Slash.tmbundle](https://github.com/slash-lang/Slash.tmbundle) +- **Slim:** [slim-template/ruby-slim.tmbundle](https://github.com/slim-template/ruby-slim.tmbundle) +- **Smalltalk:** [tomas-stefano/smalltalk-tmbundle](https://github.com/tomas-stefano/smalltalk-tmbundle) +- **Smarty:** [textmate/php-smarty.tmbundle](https://github.com/textmate/php-smarty.tmbundle) +- **SMT:** [SRI-CSL/SMT.tmbundle](https://github.com/SRI-CSL/SMT.tmbundle) +- **SPARQL:** [peta/turtle.tmbundle](https://github.com/peta/turtle.tmbundle) +- **SQF:** [JonBons/Sublime-SQF-Language](https://github.com/JonBons/Sublime-SQF-Language) +- **SQL:** [textmate/sql.tmbundle](https://github.com/textmate/sql.tmbundle) +- **SQLPL:** [textmate/sql.tmbundle](https://github.com/textmate/sql.tmbundle) +- **Squirrel:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) +- **SRecode Template:** [textmate/lisp.tmbundle](https://github.com/textmate/lisp.tmbundle) +- **Standard ML:** [textmate/standard-ml.tmbundle](https://github.com/textmate/standard-ml.tmbundle) +- **STON:** [tomas-stefano/smalltalk-tmbundle](https://github.com/tomas-stefano/smalltalk-tmbundle) +- **SubRip Text:** [314eter/atom-language-srt](https://github.com/314eter/atom-language-srt) +- **SuperCollider:** [supercollider/language-supercollider](https://github.com/supercollider/language-supercollider) +- **SVG:** [textmate/xml.tmbundle](https://github.com/textmate/xml.tmbundle) +- **Swift:** [textmate/swift.tmbundle](https://github.com/textmate/swift.tmbundle) +- **SystemVerilog:** [bitbucket:Clams/sublimesystemverilog](https://bitbucket.org/Clams/sublimesystemverilog) +- **Tcl:** [textmate/tcl.tmbundle](https://github.com/textmate/tcl.tmbundle) +- **Tcsh:** [atom/language-shellscript](https://github.com/atom/language-shellscript) +- **Tea:** [pferruggiaro/sublime-tea](https://github.com/pferruggiaro/sublime-tea) +- **Terra:** [pyk/sublime-terra](https://github.com/pyk/sublime-terra) +- **TeX:** [textmate/latex.tmbundle](https://github.com/textmate/latex.tmbundle) +- **Thrift:** [textmate/thrift.tmbundle](https://github.com/textmate/thrift.tmbundle) +- **TLA:** [agentultra/TLAGrammar](https://github.com/agentultra/TLAGrammar) +- **TOML:** [textmate/toml.tmbundle](https://github.com/textmate/toml.tmbundle) +- **Turing:** [Alhadis/language-turing](https://github.com/Alhadis/language-turing) +- **Turtle:** [peta/turtle.tmbundle](https://github.com/peta/turtle.tmbundle) +- **Twig:** [Anomareh/PHP-Twig.tmbundle](https://github.com/Anomareh/PHP-Twig.tmbundle) +- **Unified Parallel C:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) +- **Unity3D Asset:** [atom/language-yaml](https://github.com/atom/language-yaml) +- **Uno:** [atom/language-csharp](https://github.com/atom/language-csharp) +- **UnrealScript:** [textmate/java.tmbundle](https://github.com/textmate/java.tmbundle) +- **UrWeb:** [gwalborn/UrWeb-Language-Definition](https://github.com/gwalborn/UrWeb-Language-Definition) +- **Vala:** [technosophos/Vala-TMBundle](https://github.com/technosophos/Vala-TMBundle) +- **VCL:** [brandonwamboldt/sublime-varnish](https://github.com/brandonwamboldt/sublime-varnish) +- **Verilog:** [textmate/verilog.tmbundle](https://github.com/textmate/verilog.tmbundle) +- **VHDL:** [textmate/vhdl.tmbundle](https://github.com/textmate/vhdl.tmbundle) +- **VimL:** [SalGnt/Sublime-VimL](https://github.com/SalGnt/Sublime-VimL) +- **Visual Basic:** [angryant0007/VBDotNetSyntax](https://github.com/angryant0007/VBDotNetSyntax) +- **Volt:** [textmate/d.tmbundle](https://github.com/textmate/d.tmbundle) +- **Vue:** [vuejs/vue-syntax-highlight](https://github.com/vuejs/vue-syntax-highlight) +- **Wavefront Material:** [Alhadis/language-wavefront](https://github.com/Alhadis/language-wavefront) +- **Wavefront Object:** [Alhadis/language-wavefront](https://github.com/Alhadis/language-wavefront) +- **Web Ontology Language:** [textmate/xml.tmbundle](https://github.com/textmate/xml.tmbundle) +- **WebIDL:** [andik/IDL-Syntax](https://github.com/andik/IDL-Syntax) +- **wisp:** [atom/language-clojure](https://github.com/atom/language-clojure) +- **World of Warcraft Addon Data:** [nebularg/language-toc-wow](https://github.com/nebularg/language-toc-wow) +- **X10:** [x10-lang/x10-highlighting](https://github.com/x10-lang/x10-highlighting) +- **xBase:** [hernad/atom-language-harbour](https://github.com/hernad/atom-language-harbour) +- **XML:** [textmate/xml.tmbundle](https://github.com/textmate/xml.tmbundle) +- **Xojo:** [angryant0007/VBDotNetSyntax](https://github.com/angryant0007/VBDotNetSyntax) +- **XProc:** [textmate/xml.tmbundle](https://github.com/textmate/xml.tmbundle) +- **XS:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) +- **XSLT:** [textmate/xml.tmbundle](https://github.com/textmate/xml.tmbundle) +- **Xtend:** [staltz/SublimeXtend](https://github.com/staltz/SublimeXtend) +- **Yacc:** [textmate/bison.tmbundle](https://github.com/textmate/bison.tmbundle) +- **YAML:** [atom/language-yaml](https://github.com/atom/language-yaml) +- **Zephir:** [vmg/zephir-sublime](https://github.com/vmg/zephir-sublime) From 2a4150b104edfec70a0aeb2a0010b90311a5be84 Mon Sep 17 00:00:00 2001 From: Alhadis Date: Wed, 7 Sep 2016 00:23:31 +1000 Subject: [PATCH 0040/1214] Butcher whitespace to appease tab-hating heretics --- script/list-grammars | 186 +++++++++++++++++++++---------------------- 1 file changed, 89 insertions(+), 97 deletions(-) diff --git a/script/list-grammars b/script/list-grammars index d9cb033240..f0bac8a71a 100755 --- a/script/list-grammars +++ b/script/list-grammars @@ -4,106 +4,98 @@ require "linguist" require "json" require "yaml" - class GrammarList - - ROOT = File.expand_path "../../", __FILE__ - - def initialize - @submodules = load_submodules() - @sources = load_sources() - @language_names = load_languages() - end - - - # Load .gitmodules - def load_submodules - submodules = {} - submodule_file = File.read("#{ROOT}/.gitmodules") - pattern = /^\[submodule\s*"([^"]+)"\]$\n((?:^(?!\[).+(?:\n|$))+)/is - submodule_file.scan(pattern) do |id, attr| - submod = {} - submod[:path] = $1 if attr =~ /^\s*path\s*=\s*(.+)$/ - submod[:url] = $1 if attr =~ /^\s*url\s*=\s*(.+)$/ - submod[:url].gsub!(/\.git$/, "") - submod[:short] = shorten(submod[:url]) - submodules["#{id}"] = submod - end - submodules - end - - - # Grab the name of each language, sorted case-insensitively - def load_languages - Linguist::Language.all.map(&:name).sort do |a, b| - a.downcase() <=> b.downcase() - end - end - - - # Load grammars.yml - def load_sources - sources = {} - grammars = YAML.load_file("#{ROOT}/grammars.yml") - grammars.each do |path, scopes| - scopes.each { |scope| sources[scope] = path } - end - sources - end - - - # Shorten a repository URL - def shorten(url) - if url =~ /^https?:\/\/(?:www\.)?github\.com\/([^\/]+\/[^\/]+)/i - $1 - elsif url =~ /^https?:\/\/(?:www\.)?(bitbucket|gitlab)\.(?:com|org)\/([^\/]+\/[^\/]+)/i - "#{$1.downcase()}:#{$2}" - else - url.replace(/^https?:\/\/(?:www\.)?/i, "") - end - end - - - # Markdown: Generate grammar list - def to_markdown - markdown = "" - @language_names.each do |item| - lang = Linguist::Language["#{item}"] - scope = lang.tm_scope - next if scope == "none" - path = @sources[scope] || scope - case path - when "https://bitbucket.org/Clams/sublimesystemverilog/get/default.tar.gz" - short_url = "bitbucket:Clams/sublimesystemverilog" - long_url = "https://bitbucket.org/Clams/sublimesystemverilog" - when "http://svn.edgewall.org/repos/genshi/contrib/textmate/Genshi.tmbundle/Syntaxes/Markup%20Template%20%28XML%29.tmLanguage" - short_url = "genshi.edgewall.org/query" - long_url = "https://genshi.edgewall.org/query" - when "vendor/grammars/oz-tmbundle/Syntaxes/Oz.tmLanguage" - short_url = "eregon/oz-tmbundle" - long_url = "https://github.com/eregon/oz-tmbundle" - else - submodule = @submodules[@sources[scope]] - next unless submodule - short_url = submodule[:short] - long_url = submodule[:url] - end - markdown += "- **#{item}:** [#{short_url}](#{long_url})\n" - end + + ROOT = File.expand_path "../../", __FILE__ + + def initialize + @submodules = load_submodules() + @sources = load_sources() + @language_names = load_languages() + end + + # Load .gitmodules + def load_submodules + submodules = {} + submodule_file = File.read("#{ROOT}/.gitmodules") + pattern = /^\[submodule\s*"([^"]+)"\]$\n((?:^(?!\[).+(?:\n|$))+)/is + submodule_file.scan(pattern) do |id, attr| + submod = {} + submod[:path] = $1 if attr =~ /^\s*path\s*=\s*(.+)$/ + submod[:url] = $1 if attr =~ /^\s*url\s*=\s*(.+)$/ + submod[:url].gsub!(/\.git$/, "") + submod[:short] = shorten(submod[:url]) + submodules["#{id}"] = submod + end + submodules + end + + # Grab the name of each language, sorted case-insensitively + def load_languages + Linguist::Language.all.map(&:name).sort do |a, b| + a.downcase() <=> b.downcase() + end + end + + # Load grammars.yml + def load_sources + sources = {} + grammars = YAML.load_file("#{ROOT}/grammars.yml") + grammars.each do |path, scopes| + scopes.each { |scope| sources[scope] = path } + end + sources + end + + # Shorten a repository URL + def shorten(url) + if url =~ /^https?:\/\/(?:www\.)?github\.com\/([^\/]+\/[^\/]+)/i + $1 + elsif url =~ /^https?:\/\/(?:www\.)?(bitbucket|gitlab)\.(?:com|org)\/([^\/]+\/[^\/]+)/i + "#{$1.downcase()}:#{$2}" + else + url.replace(/^https?:\/\/(?:www\.)?/i, "") + end + end + + # Markdown: Generate grammar list + def to_markdown + markdown = "" + @language_names.each do |item| + lang = Linguist::Language["#{item}"] + scope = lang.tm_scope + next if scope == "none" + path = @sources[scope] || scope + case path + when "https://bitbucket.org/Clams/sublimesystemverilog/get/default.tar.gz" + short_url = "bitbucket:Clams/sublimesystemverilog" + long_url = "https://bitbucket.org/Clams/sublimesystemverilog" + when "http://svn.edgewall.org/repos/genshi/contrib/textmate/Genshi.tmbundle/Syntaxes/Markup%20Template%20%28XML%29.tmLanguage" + short_url = "genshi.edgewall.org/query" + long_url = "https://genshi.edgewall.org/query" + when "vendor/grammars/oz-tmbundle/Syntaxes/Oz.tmLanguage" + short_url = "eregon/oz-tmbundle" + long_url = "https://github.com/eregon/oz-tmbundle" + else + submodule = @submodules[@sources[scope]] + next unless submodule + short_url = submodule[:short] + long_url = submodule[:url] + end + markdown += "- **#{item}:** [#{short_url}](#{long_url})\n" + end - markdown - end - - - # Update the file displaying the reader-friendly list of grammar repos - def update_readme - readme = "#{ROOT}/vendor/README.md" - preamble = File.read(readme).match(/\A.+?\n/ms) - list = self.to_markdown - File.write(readme, preamble.to_s + list) - end + markdown + end + + # Update the file displaying the reader-friendly list of grammar repos + def update_readme + readme = "#{ROOT}/vendor/README.md" + preamble = File.read(readme).match(/\A.+?\n/ms) + list = self.to_markdown + File.write(readme, preamble.to_s + list) + end end - list = GrammarList.new puts list.update_readme() From 9d57e1e1b564a6790311247128c4424f6faf77d1 Mon Sep 17 00:00:00 2001 From: Alhadis Date: Wed, 7 Sep 2016 00:59:13 +1000 Subject: [PATCH 0041/1214] Remove debugging vestige --- script/list-grammars | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/list-grammars b/script/list-grammars index f0bac8a71a..2254274545 100755 --- a/script/list-grammars +++ b/script/list-grammars @@ -98,4 +98,4 @@ class GrammarList end list = GrammarList.new -puts list.update_readme() +list.update_readme() From f382abc2f30a9cd53a6ba59b2fe47b27363c46dd Mon Sep 17 00:00:00 2001 From: Alhadis Date: Wed, 7 Sep 2016 03:14:49 +1000 Subject: [PATCH 0042/1214] Add logic to consume and parse options --- script/add-grammar | 85 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100755 script/add-grammar diff --git a/script/add-grammar b/script/add-grammar new file mode 100755 index 0000000000..11bb1889ef --- /dev/null +++ b/script/add-grammar @@ -0,0 +1,85 @@ +#!/usr/bin/env ruby + +require "optparse" + +ROOT = File.expand_path("../../", __FILE__) + + +# Break a repository URL into its separate components +def parse_url(input) + hosts = "github\.com|bitbucket\.org|gitlab\.com" + + # HTTPS/HTTP link pointing to recognised hosts + if input =~ /^(?:https?:\/\/)?(?:[^.@]+@)?(?:www\.)?(#{hosts})\/([^\/]+)\/([^\/]+)/i + { host: $1.downcase(), user: $2, repo: $3.sub(/\.git$/, "") } + # SSH + elsif input =~ /^git@(#{hosts}):([^\/]+)\/([^\/]+)\.git$/i + { host: $1.downcase(), user: $2, repo: $3 } + # provider:user/repo + elsif input =~ /^(github|bitbucket|gitlab):\/?([^\/]+)\/([^\/]+)\/?$/i + { host: $1.downcase(), user: $2, repo: $3 } + # user/repo - Common GitHub shorthand + elsif input =~ /^\/?([^\/]+)\/([^\/]+)\/?$/ + { host: "github.com", user: $1, repo: $2 } + else + raise "Unsupported URL: #{input}" + end +end + +# Isolate the vendor-name component of a submodule path +def parse_submodule(name) + name =~ /^(?:.*(?:vendor\/)?grammars\/)?([^\/]+)/i + path = "vendor/grammars/#{$1}" + unless File.exist?("#{ROOT}/" + path) + warn "Submodule '#{path}' does not exist. Aborting." + exit 1 + end + path +end + +usage = """Usage: + #{$0} [--replace grammar] url +Examples: + #{$0} https://github.com/Alhadis/language-roff + #{$0} --replace sublime-apl https://github.com/Alhadis/language-apl +""" + + +$replace = nil +$verbose = false + +OptionParser.new do |opts| + opts.banner = usage + opts.on("-v", "--verbose", "Print verbose feedback to STDOUT") do + $verbose = true + end + opts.on("-rSUBMODULE", "--replace=SUBMODDULE", "Replace an existing grammar submodule.") do |name| + $replace = name + end +end.parse! + + +$url = ARGV[0] + +# No URL? Print a usage message and bail. +unless $url + warn usage + exit 1; +end + + +# Ensure the given URL is an HTTPS link +parts = parse_url $url +https = "https://#{parts[:host]}/#{parts[:user]}/#{parts[:repo]}" +path = "vendor/grammars/#{parts[:repo]}" +repl = parse_submodule($replace) if $replace + +if $verbose + puts "Adding grammar" + puts "\tFrom: #{https}" + puts "\tInto: #{path}" + puts "\tReplacing: #{repl}" if repl + puts "\nRegistering submodule..." +end + +#`git submodule add #{https} #{path}` From 4584963dd209e510b74f5d0f86924b0805c3d3f9 Mon Sep 17 00:00:00 2001 From: Alhadis Date: Wed, 7 Sep 2016 04:25:00 +1000 Subject: [PATCH 0043/1214] Add logic to update submodules and licenses --- script/add-grammar | 36 ++++++++++++++++++++++-------------- script/licensed | 11 ++++++++++- 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/script/add-grammar b/script/add-grammar index 11bb1889ef..584b9cdf36 100755 --- a/script/add-grammar +++ b/script/add-grammar @@ -37,6 +37,13 @@ def parse_submodule(name) path end +# Print debugging feedback to STDOUT if running with --verbose +def log(msg) + puts msg if $verbose +end + + + usage = """Usage: #{$0} [--replace grammar] url Examples: @@ -44,7 +51,6 @@ Examples: #{$0} --replace sublime-apl https://github.com/Alhadis/language-apl """ - $replace = nil $verbose = false @@ -67,19 +73,21 @@ unless $url exit 1; end - # Ensure the given URL is an HTTPS link -parts = parse_url $url -https = "https://#{parts[:host]}/#{parts[:user]}/#{parts[:repo]}" -path = "vendor/grammars/#{parts[:repo]}" -repl = parse_submodule($replace) if $replace - -if $verbose - puts "Adding grammar" - puts "\tFrom: #{https}" - puts "\tInto: #{path}" - puts "\tReplacing: #{repl}" if repl - puts "\nRegistering submodule..." +parts = parse_url $url +https = "https://#{parts[:host]}/#{parts[:user]}/#{parts[:repo]}" +repo_new = "vendor/grammars/#{parts[:repo]}" +repo_old = parse_submodule($replace) if $replace + +if repo_old + log "Deregistering: #{repo_old}" + `git submodule deinit #{repo_old}` + `git rm -rf #{repo_old}` end -#`git submodule add #{https} #{path}` +log "Registering new submodule: #{repo_new}" +`git submodule add -f #{https} #{repo_new}` +`script/convert-grammars --add #{repo_new}` + +log "Confirming license" +`script/licensed --module "#{repo_new}"` diff --git a/script/licensed b/script/licensed index ea3f538f56..68214d345e 100755 --- a/script/licensed +++ b/script/licensed @@ -4,6 +4,7 @@ require "bundler/setup" require "licensed/cli" +require "optparse" module Licensed module Source @@ -32,7 +33,14 @@ module Licensed end end -source = Licensed::Source::Filesystem.new("vendor/grammars/*/", type: "grammar") +module_path = nil +OptionParser.new do |opts| + opts.on("-mPATH", "--module=PATH", "Cache license file for specific grammar") do |p| + module_path = p + end +end.parse! + +source = Licensed::Source::Filesystem.new(module_path || "vendor/grammars/*/", type: "grammar") config = Licensed::Configuration.new config.sources << source @@ -43,4 +51,5 @@ else end command.run +`git checkout -- vendor/licenses/grammar/` if module_path exit command.success? From 68c45be47da1205df5a52840265cb58c92e35bef Mon Sep 17 00:00:00 2001 From: Alhadis Date: Wed, 7 Sep 2016 04:37:04 +1000 Subject: [PATCH 0044/1214] Flatten whitespace --- script/add-grammar | 75 +++++++++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/script/add-grammar b/script/add-grammar index 584b9cdf36..779dd62b07 100755 --- a/script/add-grammar +++ b/script/add-grammar @@ -7,43 +7,42 @@ ROOT = File.expand_path("../../", __FILE__) # Break a repository URL into its separate components def parse_url(input) - hosts = "github\.com|bitbucket\.org|gitlab\.com" - - # HTTPS/HTTP link pointing to recognised hosts - if input =~ /^(?:https?:\/\/)?(?:[^.@]+@)?(?:www\.)?(#{hosts})\/([^\/]+)\/([^\/]+)/i - { host: $1.downcase(), user: $2, repo: $3.sub(/\.git$/, "") } - # SSH - elsif input =~ /^git@(#{hosts}):([^\/]+)\/([^\/]+)\.git$/i - { host: $1.downcase(), user: $2, repo: $3 } - # provider:user/repo - elsif input =~ /^(github|bitbucket|gitlab):\/?([^\/]+)\/([^\/]+)\/?$/i - { host: $1.downcase(), user: $2, repo: $3 } - # user/repo - Common GitHub shorthand - elsif input =~ /^\/?([^\/]+)\/([^\/]+)\/?$/ - { host: "github.com", user: $1, repo: $2 } - else - raise "Unsupported URL: #{input}" - end + hosts = "github\.com|bitbucket\.org|gitlab\.com" + + # HTTPS/HTTP link pointing to recognised hosts + if input =~ /^(?:https?:\/\/)?(?:[^.@]+@)?(?:www\.)?(#{hosts})\/([^\/]+)\/([^\/]+)/i + { host: $1.downcase(), user: $2, repo: $3.sub(/\.git$/, "") } + # SSH + elsif input =~ /^git@(#{hosts}):([^\/]+)\/([^\/]+)\.git$/i + { host: $1.downcase(), user: $2, repo: $3 } + # provider:user/repo + elsif input =~ /^(github|bitbucket|gitlab):\/?([^\/]+)\/([^\/]+)\/?$/i + { host: $1.downcase(), user: $2, repo: $3 } + # user/repo - Common GitHub shorthand + elsif input =~ /^\/?([^\/]+)\/([^\/]+)\/?$/ + { host: "github.com", user: $1, repo: $2 } + else + raise "Unsupported URL: #{input}" + end end # Isolate the vendor-name component of a submodule path def parse_submodule(name) - name =~ /^(?:.*(?:vendor\/)?grammars\/)?([^\/]+)/i - path = "vendor/grammars/#{$1}" - unless File.exist?("#{ROOT}/" + path) - warn "Submodule '#{path}' does not exist. Aborting." - exit 1 - end - path + name =~ /^(?:.*(?:vendor\/)?grammars\/)?([^\/]+)/i + path = "vendor/grammars/#{$1}" + unless File.exist?("#{ROOT}/" + path) + warn "Submodule '#{path}' does not exist. Aborting." + exit 1 + end + path end # Print debugging feedback to STDOUT if running with --verbose def log(msg) - puts msg if $verbose + puts msg if $verbose end - usage = """Usage: #{$0} [--replace grammar] url Examples: @@ -55,13 +54,13 @@ $replace = nil $verbose = false OptionParser.new do |opts| - opts.banner = usage - opts.on("-v", "--verbose", "Print verbose feedback to STDOUT") do - $verbose = true - end - opts.on("-rSUBMODULE", "--replace=SUBMODDULE", "Replace an existing grammar submodule.") do |name| - $replace = name - end + opts.banner = usage + opts.on("-v", "--verbose", "Print verbose feedback to STDOUT") do + $verbose = true + end + opts.on("-rSUBMODULE", "--replace=SUBMODDULE", "Replace an existing grammar submodule.") do |name| + $replace = name + end end.parse! @@ -69,8 +68,8 @@ $url = ARGV[0] # No URL? Print a usage message and bail. unless $url - warn usage - exit 1; + warn usage + exit 1; end # Ensure the given URL is an HTTPS link @@ -80,9 +79,9 @@ repo_new = "vendor/grammars/#{parts[:repo]}" repo_old = parse_submodule($replace) if $replace if repo_old - log "Deregistering: #{repo_old}" - `git submodule deinit #{repo_old}` - `git rm -rf #{repo_old}` + log "Deregistering: #{repo_old}" + `git submodule deinit #{repo_old}` + `git rm -rf #{repo_old}` end log "Registering new submodule: #{repo_new}" From be316c29434b62c79aa989174986948ad02394fb Mon Sep 17 00:00:00 2001 From: Alhadis Date: Wed, 7 Sep 2016 05:36:00 +1000 Subject: [PATCH 0045/1214] Update contributor notes to mention new script --- CONTRIBUTING.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ec00ae149a..c3059d98fa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,7 +17,7 @@ To add support for a new extension: In addition, if this extension is already listed in [`languages.yml`][languages] then sometimes a few more steps will need to be taken: 0. Make sure that example `.yourextension` files are present in the [samples directory][samples] for each language that uses `.yourextension`. -0. Test the performance of the Bayesian classifier with a relatively large number (1000s) of sample `.yourextension` files. (ping @arfon or @bkeepers to help with this) to ensure we're not misclassifying files. +0. Test the performance of the Bayesian classifier with a relatively large number (1000s) of sample `.yourextension` files. (ping **@arfon** or **@bkeepers** to help with this) to ensure we're not misclassifying files. 0. If the Bayesian classifier does a bad job with the sample `.yourextension` files then a [heuristic](https://github.com/github/linguist/blob/master/lib/linguist/heuristics.rb) may need to be written to help. @@ -28,17 +28,14 @@ We try only to add languages once they have some usage on GitHub. In most cases To add support for a new language: 0. Add an entry for your language to [`languages.yml`][languages]. -0. Add a grammar for your language. Please only add grammars that have [one of these licenses](https://github.com/github/linguist/blob/257425141d4e2a5232786bf0b13c901ada075f93/vendor/licenses/config.yml#L2-L11). - 0. Add your grammar as a submodule: `git submodule add https://github.com/JaneSmith/MyGrammar vendor/grammars/MyGrammar`. - 0. Add your grammar to [`grammars.yml`][grammars] by running `script/convert-grammars --add vendor/grammars/MyGrammar`. - 0. Download the license for the grammar: `script/licensed`. Be careful to only commit the file for the new grammar, as this script may update licenses for other grammars as well. +0. Add a grammar for your language: `script/add-grammar https://github.com/JaneSmith/MyGrammar` Please only add grammars that have [one of these licenses][licenses]. 0. Add samples for your language to the [samples directory][samples] in the correct subdirectory. 0. Open a pull request, linking to a [GitHub search result](https://github.com/search?utf8=%E2%9C%93&q=extension%3Aboot+NOT+nothack&type=Code&ref=searchresults) showing in-the-wild usage. In addition, if your new language defines an extension that's already listed in [`languages.yml`][languages] (such as `.foo`) then sometimes a few more steps will need to be taken: 0. Make sure that example `.foo` files are present in the [samples directory][samples] for each language that uses `.foo`. -0. Test the performance of the Bayesian classifier with a relatively large number (1000s) of sample `.foo` files. (ping @arfon or @bkeepers to help with this) to ensure we're not misclassifying files. +0. Test the performance of the Bayesian classifier with a relatively large number (1000s) of sample `.foo` files. (ping **@arfon** or **@bkeepers** to help with this) to ensure we're not misclassifying files. 0. If the Bayesian classifier does a bad job with the sample `.foo` files then a [heuristic](https://github.com/github/linguist/blob/master/lib/linguist/heuristics.rb) may need to be written to help. Remember, the goal here is to try and avoid false positives! @@ -81,9 +78,9 @@ Here's our current build status: [![Build Status](https://api.travis-ci.org/gith Linguist is maintained with :heart: by: -- @arfon (GitHub Staff) -- @larsbrinkhoff -- @pchaigno +- **@arfon** (GitHub Staff) +- **@larsbrinkhoff** +- **@pchaigno** As Linguist is a production dependency for GitHub we have a couple of workflow restrictions: @@ -112,5 +109,6 @@ If you are the current maintainer of this gem: [grammars]: /grammars.yml [languages]: /lib/linguist/languages.yml +[licenses]: https://github.com/github/linguist/blob/257425141d4e2a5232786bf0b13c901ada075f93/vendor/licenses/config.yml#L2-L11 [samples]: /samples [new-issue]: https://github.com/github/linguist/issues/new From 3112e6dedad51f921d8fe822c57dbd153ae5f0b7 Mon Sep 17 00:00:00 2001 From: Alhadis Date: Tue, 6 Sep 2016 16:20:58 +1000 Subject: [PATCH 0046/1214] Normalise .gitmodules formatting --- .gitmodules | 6 +-- grammars.yml | 106 +++++++++++++++++++++++++-------------------------- 2 files changed, 56 insertions(+), 56 deletions(-) diff --git a/.gitmodules b/.gitmodules index ea5847d731..326a2a06cc 100644 --- a/.gitmodules +++ b/.gitmodules @@ -559,7 +559,7 @@ url = https://github.com/ShaneWilton/sublime-smali [submodule "vendor/grammars/language-jsoniq"] path = vendor/grammars/language-jsoniq - url = http://github.com/wcandillon/language-jsoniq + url = https://github.com/wcandillon/language-jsoniq [submodule "vendor/grammars/atom-fsharp"] path = vendor/grammars/atom-fsharp url = https://github.com/fsprojects/atom-fsharp @@ -669,8 +669,8 @@ path = vendor/grammars/pig-latin url = https://github.com/goblindegook/sublime-text-pig-latin [submodule "vendor/grammars/sourcepawn"] -path = vendor/grammars/sourcepawn -url = https://github.com/austinwagner/sublime-sourcepawn + path = vendor/grammars/sourcepawn + url = https://github.com/austinwagner/sublime-sourcepawn [submodule "vendor/grammars/gdscript"] path = vendor/grammars/gdscript url = https://github.com/beefsack/GDScript-sublime diff --git a/grammars.yml b/grammars.yml index 916e315699..caa1421357 100755 --- a/grammars.yml +++ b/grammars.yml @@ -8,9 +8,9 @@ vendor/grammars/Agda.tmbundle: - source.agda vendor/grammars/Alloy.tmbundle: - source.alloy -vendor/grammars/AutoHotkey/: +vendor/grammars/AutoHotkey: - source.ahk -vendor/grammars/BrightScript.tmbundle/: +vendor/grammars/BrightScript.tmbundle: - source.brightauthorproject - source.brightscript vendor/grammars/ColdFusion: @@ -20,13 +20,13 @@ vendor/grammars/ColdFusion: - text.html.cfm vendor/grammars/Docker.tmbundle: - source.dockerfile -vendor/grammars/Elm/: +vendor/grammars/Elm: - source.elm - text.html.mediawiki.elm-build-output - text.html.mediawiki.elm-documentation vendor/grammars/FreeMarker.tmbundle: - text.html.ftl -vendor/grammars/G-Code/: +vendor/grammars/G-Code: - source.LS - source.MCPOST - source.MOD @@ -39,7 +39,7 @@ vendor/grammars/IDL-Syntax: vendor/grammars/Isabelle.tmbundle: - source.isabelle.root - source.isabelle.theory -vendor/grammars/JSyntax/: +vendor/grammars/JSyntax: - source.j vendor/grammars/Julia.tmbundle: - source.julia @@ -50,7 +50,7 @@ vendor/grammars/LiveScript.tmbundle: vendor/grammars/MagicPython: - source.python - source.regexp.python -vendor/grammars/Modelica/: +vendor/grammars/Modelica: - source.modelica vendor/grammars/NSIS: - source.nsis @@ -60,7 +60,7 @@ vendor/grammars/NimLime: - source.nimcfg vendor/grammars/PHP-Twig.tmbundle: - text.html.twig -vendor/grammars/PogoScript.tmbundle/: +vendor/grammars/PogoScript.tmbundle: - source.pogoscript vendor/grammars/RDoc.tmbundle: - text.rdoc @@ -75,10 +75,10 @@ vendor/grammars/Scalate.tmbundle: - text.html.ssp vendor/grammars/Slash.tmbundle: - text.html.slash -vendor/grammars/Stata.tmbundle/: +vendor/grammars/Stata.tmbundle: - source.mata - source.stata -vendor/grammars/Stylus/: +vendor/grammars/Stylus: - source.stylus vendor/grammars/Sublime-Coq: - source.coq @@ -88,7 +88,7 @@ vendor/grammars/Sublime-Lasso: - file.lasso vendor/grammars/Sublime-Loom: - source.loomscript -vendor/grammars/Sublime-Modula-2/: +vendor/grammars/Sublime-Modula-2: - source.modula2 vendor/grammars/Sublime-Nit: - source.nit @@ -107,22 +107,22 @@ vendor/grammars/Sublime-VimL: - source.viml vendor/grammars/SublimeBrainfuck: - source.bf -vendor/grammars/SublimeClarion/: +vendor/grammars/SublimeClarion: - source.clarion -vendor/grammars/SublimeGDB/: +vendor/grammars/SublimeGDB: - source.disasm - source.gdb - source.gdb.session - source.gdbregs -vendor/grammars/SublimePapyrus/: +vendor/grammars/SublimePapyrus: - source.papyrus.skyrim -vendor/grammars/SublimePuppet/: +vendor/grammars/SublimePuppet: - source.puppet vendor/grammars/SublimeXtend: - source.xtend vendor/grammars/TLA: - source.tla -vendor/grammars/TXL/: +vendor/grammars/TXL: - source.txl vendor/grammars/Textmate-Gosu-Bundle: - source.gosu.2 @@ -151,20 +151,20 @@ vendor/grammars/antlr.tmbundle: vendor/grammars/apache.tmbundle: - source.apache-config - source.apache-config.mod_perl -vendor/grammars/api-blueprint-sublime-plugin/: +vendor/grammars/api-blueprint-sublime-plugin: - text.html.markdown.source.gfm.apib - text.html.markdown.source.gfm.mson vendor/grammars/applescript.tmbundle: - source.applescript -vendor/grammars/asciidoc.tmbundle/: +vendor/grammars/asciidoc.tmbundle: - text.html.asciidoc vendor/grammars/asp.tmbundle: - source.asp - text.html.asp -vendor/grammars/assembly/: +vendor/grammars/assembly: - objdump.x86asm - source.x86asm -vendor/grammars/atom-fsharp/: +vendor/grammars/atom-fsharp: - source.fsharp - source.fsharp.fsi - source.fsharp.fsl @@ -174,16 +174,16 @@ vendor/grammars/atom-language-1c-bsl: - source.sdbl vendor/grammars/atom-language-clean: - source.clean -vendor/grammars/atom-language-purescript/: +vendor/grammars/atom-language-purescript: - source.purescript vendor/grammars/atom-language-srt: - text.srt -vendor/grammars/atom-language-stan/: +vendor/grammars/atom-language-stan: - source.stan vendor/grammars/atom-salt: - source.python.salt - source.yaml.salt -vendor/grammars/atomic-dreams/: +vendor/grammars/atomic-dreams: - source.dm - source.dmf vendor/grammars/ats: @@ -194,7 +194,7 @@ vendor/grammars/bison.tmbundle: - source.bison vendor/grammars/blitzmax: - source.blitzmax -vendor/grammars/boo/: +vendor/grammars/boo: - source.boo vendor/grammars/bro-sublime: - source.bro @@ -219,7 +219,7 @@ vendor/grammars/cool-tmbundle: vendor/grammars/cpp-qt.tmbundle: - source.c++.qt - source.qmake -vendor/grammars/creole/: +vendor/grammars/creole: - text.html.creole vendor/grammars/css.tmbundle: - source.css @@ -245,7 +245,7 @@ vendor/grammars/dylan.tmbundle: - source.makegen vendor/grammars/ebundles/Bundles/MSDOS batch file.tmbundle: - source.dosbatch -vendor/grammars/ec.tmbundle/: +vendor/grammars/ec.tmbundle: - source.c.ec vendor/grammars/eiffel.tmbundle: - source.eiffel @@ -270,9 +270,9 @@ vendor/grammars/forth: vendor/grammars/fortran.tmbundle: - source.fortran - source.fortran.modern -vendor/grammars/gap-tmbundle/: +vendor/grammars/gap-tmbundle: - source.gap -vendor/grammars/gdscript/: +vendor/grammars/gdscript: - source.gdscript vendor/grammars/gettext.tmbundle: - source.po @@ -300,7 +300,7 @@ vendor/grammars/idl.tmbundle: - source.idl - source.idl-dlm - text.idl-idldoc -vendor/grammars/idris/: +vendor/grammars/idris: - source.idris vendor/grammars/ini.tmbundle: - source.ini @@ -332,12 +332,12 @@ vendor/grammars/language-apl: - source.apl vendor/grammars/language-asn1: - source.asn -vendor/grammars/language-babel/: +vendor/grammars/language-babel: - source.js.jsx - source.regexp.babel -vendor/grammars/language-blade/: +vendor/grammars/language-blade: - text.html.php.blade -vendor/grammars/language-click/: +vendor/grammars/language-click: - source.click vendor/grammars/language-clojure: - source.clojure @@ -379,10 +379,10 @@ vendor/grammars/language-javascript: - source.js - source.js.regexp - source.js.regexp.replacement -vendor/grammars/language-jsoniq/: +vendor/grammars/language-jsoniq: - source.jq - source.xq -vendor/grammars/language-less/: +vendor/grammars/language-less: - source.css.less vendor/grammars/language-maxscript: - source.maxscript @@ -418,7 +418,7 @@ vendor/grammars/language-xbase: - source.harbour vendor/grammars/language-yaml: - source.yaml -vendor/grammars/language-yang/: +vendor/grammars/language-yang: - source.yang vendor/grammars/latex.tmbundle: - text.bibtex @@ -452,11 +452,11 @@ vendor/grammars/matlab.tmbundle: - source.octave vendor/grammars/maven.tmbundle: - text.xml.pom -vendor/grammars/mediawiki.tmbundle/: +vendor/grammars/mediawiki.tmbundle: - text.html.mediawiki vendor/grammars/mercury-tmlanguage: - source.mercury -vendor/grammars/monkey/: +vendor/grammars/monkey: - source.monkey vendor/grammars/moonscript-tmbundle: - source.moonscript @@ -490,9 +490,9 @@ vendor/grammars/parrot: - source.parrot.pir vendor/grammars/pascal.tmbundle: - source.pascal -vendor/grammars/pawn-sublime-language/: +vendor/grammars/pawn-sublime-language: - source.pawn -vendor/grammars/perl.tmbundle/: +vendor/grammars/perl.tmbundle: - source.perl - source.perl.6 vendor/grammars/perl6fe: @@ -503,7 +503,7 @@ vendor/grammars/php-smarty.tmbundle: - text.html.smarty vendor/grammars/php.tmbundle: - text.html.php -vendor/grammars/pig-latin/: +vendor/grammars/pig-latin: - source.pig_latin vendor/grammars/pike-textmate: - source.pike @@ -542,11 +542,11 @@ vendor/grammars/scilab.tmbundle: - source.scilab vendor/grammars/secondlife-lsl: - source.lsl -vendor/grammars/smali-sublime/smali.tmLanguage: +vendor/grammars/smali-sublime: - source.smali vendor/grammars/smalltalk-tmbundle: - source.smalltalk -vendor/grammars/sourcepawn/: +vendor/grammars/sourcepawn: - source.sp vendor/grammars/sql.tmbundle: - source.sql @@ -557,9 +557,9 @@ vendor/grammars/standard-ml.tmbundle: - source.ml vendor/grammars/sublime-MuPAD: - source.mupad -vendor/grammars/sublime-aspectj/: +vendor/grammars/sublime-aspectj: - source.aspectj -vendor/grammars/sublime-autoit/: +vendor/grammars/sublime-autoit: - source.autoit vendor/grammars/sublime-befunge: - source.befunge @@ -567,12 +567,12 @@ vendor/grammars/sublime-bsv: - source.bsv vendor/grammars/sublime-cirru: - source.cirru -vendor/grammars/sublime-clips/: +vendor/grammars/sublime-clips: - source.clips vendor/grammars/sublime-glsl: - source.essl - source.glsl -vendor/grammars/sublime-golo/: +vendor/grammars/sublime-golo: - source.golo vendor/grammars/sublime-mask: - source.mask @@ -581,27 +581,27 @@ vendor/grammars/sublime-netlinx: - source.netlinx.erb vendor/grammars/sublime-nginx: - source.nginx -vendor/grammars/sublime-opal/: +vendor/grammars/sublime-opal: - source.opal - source.opalsysdefs vendor/grammars/sublime-pony: - source.pony -vendor/grammars/sublime-rexx/: +vendor/grammars/sublime-rexx: - source.rexx vendor/grammars/sublime-robot-plugin: - text.robot vendor/grammars/sublime-rust: - source.rust -vendor/grammars/sublime-spintools/: +vendor/grammars/sublime-spintools: - source.regexp.spin - source.spin vendor/grammars/sublime-tea: - source.tea vendor/grammars/sublime-terra: - source.terra -vendor/grammars/sublime-text-ox/: +vendor/grammars/sublime-text-ox: - source.ox -vendor/grammars/sublime-typescript/: +vendor/grammars/sublime-typescript: - source.ts - source.tsx - text.error-list @@ -613,9 +613,9 @@ vendor/grammars/sublime_cobol: - source.cobol - source.jcl - source.opencobol -vendor/grammars/sublimeassembly/: +vendor/grammars/sublimeassembly: - source.assembly -vendor/grammars/sublimeprolog/: +vendor/grammars/sublimeprolog: - source.prolog - source.prolog.eclipse vendor/grammars/sublimetext-cuda-cpp: @@ -638,7 +638,7 @@ vendor/grammars/vhdl: - source.vhdl vendor/grammars/vue-syntax-highlight: - text.html.vue -vendor/grammars/xc.tmbundle/: +vendor/grammars/xc.tmbundle: - source.xc vendor/grammars/xml.tmbundle: - text.xml From 1ec84da2775965e942b05e1b2528e30871edaccd Mon Sep 17 00:00:00 2001 From: Alhadis Date: Tue, 6 Sep 2016 16:41:37 +1000 Subject: [PATCH 0047/1214] Remove dangling submodules --- vendor/grammars/Sublime-Inform/.gitignore | 2 - .../Inform7/book.sublime-snippet | 6 - .../Inform7/chapter.sublime-snippet | 6 - .../Inform7/door.sublime-snippet | 7 - .../Inform7/inform7.JSON-tmLanguage | 34 -- .../Sublime-Inform/Inform7/inform7.tmLanguage | 74 --- .../Inform7/object.sublime-snippet | 8 - .../Inform7/part.sublime-snippet | 6 - .../Inform7/room.sublime-snippet | 7 - .../Inform7/scene.sublime-snippet | 11 - .../Inform7/section.sublime-snippet | 6 - .../Inform7/volume.sublime-snippet | 6 - vendor/grammars/Sublime-Inform/LICENSE.txt | 21 - vendor/grammars/Sublime-Inform/README.md | 8 - .../Commands/Save to CSS.tmCommand | 47 -- .../Commands/Save to Minified CSS.tmCommand | 47 -- .../Insert inline Image.tmDragCommand | 38 -- .../Preferences/Comment.tmPreferences | 36 -- vendor/grammars/less.tmbundle/README.md | 25 - .../less.tmbundle/Syntaxes/LESS.tmLanguage | 434 ------------------ vendor/grammars/less.tmbundle/info.plist | 26 -- vendor/licenses/grammar/Sublime-Inform.txt | 26 -- vendor/licenses/grammar/less.tmbundle.txt | 14 - 23 files changed, 895 deletions(-) delete mode 100644 vendor/grammars/Sublime-Inform/.gitignore delete mode 100644 vendor/grammars/Sublime-Inform/Inform7/book.sublime-snippet delete mode 100644 vendor/grammars/Sublime-Inform/Inform7/chapter.sublime-snippet delete mode 100644 vendor/grammars/Sublime-Inform/Inform7/door.sublime-snippet delete mode 100644 vendor/grammars/Sublime-Inform/Inform7/inform7.JSON-tmLanguage delete mode 100755 vendor/grammars/Sublime-Inform/Inform7/inform7.tmLanguage delete mode 100644 vendor/grammars/Sublime-Inform/Inform7/object.sublime-snippet delete mode 100644 vendor/grammars/Sublime-Inform/Inform7/part.sublime-snippet delete mode 100644 vendor/grammars/Sublime-Inform/Inform7/room.sublime-snippet delete mode 100644 vendor/grammars/Sublime-Inform/Inform7/scene.sublime-snippet delete mode 100644 vendor/grammars/Sublime-Inform/Inform7/section.sublime-snippet delete mode 100644 vendor/grammars/Sublime-Inform/Inform7/volume.sublime-snippet delete mode 100644 vendor/grammars/Sublime-Inform/LICENSE.txt delete mode 100644 vendor/grammars/Sublime-Inform/README.md delete mode 100644 vendor/grammars/less.tmbundle/Commands/Save to CSS.tmCommand delete mode 100644 vendor/grammars/less.tmbundle/Commands/Save to Minified CSS.tmCommand delete mode 100644 vendor/grammars/less.tmbundle/DragCommands/Insert inline Image.tmDragCommand delete mode 100644 vendor/grammars/less.tmbundle/Preferences/Comment.tmPreferences delete mode 100644 vendor/grammars/less.tmbundle/README.md delete mode 100644 vendor/grammars/less.tmbundle/Syntaxes/LESS.tmLanguage delete mode 100644 vendor/grammars/less.tmbundle/info.plist delete mode 100644 vendor/licenses/grammar/Sublime-Inform.txt delete mode 100644 vendor/licenses/grammar/less.tmbundle.txt diff --git a/vendor/grammars/Sublime-Inform/.gitignore b/vendor/grammars/Sublime-Inform/.gitignore deleted file mode 100644 index 9bea4330f0..0000000000 --- a/vendor/grammars/Sublime-Inform/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ - -.DS_Store diff --git a/vendor/grammars/Sublime-Inform/Inform7/book.sublime-snippet b/vendor/grammars/Sublime-Inform/Inform7/book.sublime-snippet deleted file mode 100644 index d00b609b4c..0000000000 --- a/vendor/grammars/Sublime-Inform/Inform7/book.sublime-snippet +++ /dev/null @@ -1,6 +0,0 @@ - - - book - source.Inform7 - diff --git a/vendor/grammars/Sublime-Inform/Inform7/chapter.sublime-snippet b/vendor/grammars/Sublime-Inform/Inform7/chapter.sublime-snippet deleted file mode 100644 index 344ae92d2e..0000000000 --- a/vendor/grammars/Sublime-Inform/Inform7/chapter.sublime-snippet +++ /dev/null @@ -1,6 +0,0 @@ - - - chapter - source.Inform7 - diff --git a/vendor/grammars/Sublime-Inform/Inform7/door.sublime-snippet b/vendor/grammars/Sublime-Inform/Inform7/door.sublime-snippet deleted file mode 100644 index 9504585bce..0000000000 --- a/vendor/grammars/Sublime-Inform/Inform7/door.sublime-snippet +++ /dev/null @@ -1,7 +0,0 @@ - - - door - source.Inform7 - diff --git a/vendor/grammars/Sublime-Inform/Inform7/inform7.JSON-tmLanguage b/vendor/grammars/Sublime-Inform/Inform7/inform7.JSON-tmLanguage deleted file mode 100644 index e5b6e92b72..0000000000 --- a/vendor/grammars/Sublime-Inform/Inform7/inform7.JSON-tmLanguage +++ /dev/null @@ -1,34 +0,0 @@ -{ "name": "Inform7", - "scopeName": "source.Inform7", - "fileTypes": ["i7x"], - "patterns": [ - { "name": "keyword.control.Inform7", - "match": "\\b(Include|Release)\\b" - }, - { "name" : "comment.block.Inform7", - "begin" : "\\[", - "end" : "\\]", - "comment" : "All comments in Inform7 are delimited this way." - }, - { "name" : "string.quoted.double.Inform7", - "begin" : "\"", - "end" : "\"", - "patterns": [ - { "name" : "keyword.operator.Inform7", - "begin" : "\\[", - "end" : "\\]", - "comment" : "For logic inside of strings." - } - ] - }, - { "name" : "storage.type.Inform7", - "match" : "(Volume|Book|Chapter|Part|Section|Table)\\s+\\d?\\s+-?\\s+((?:\\w|\\s|-)*)", - "comment": "Matches headings for major sections in Inform7" - }, - { "name": "constant.numeric.Inform7", - "match": "([0-9])+", - "comment":"Gotta call out the numbers!" - } - ], - "uuid": "0c4cbdee-beb7-4ea6-af56-27246d479373" -} \ No newline at end of file diff --git a/vendor/grammars/Sublime-Inform/Inform7/inform7.tmLanguage b/vendor/grammars/Sublime-Inform/Inform7/inform7.tmLanguage deleted file mode 100755 index 5609885ef1..0000000000 --- a/vendor/grammars/Sublime-Inform/Inform7/inform7.tmLanguage +++ /dev/null @@ -1,74 +0,0 @@ - - - - - fileTypes - - i7x - inform - ni - - name - Inform7 - patterns - - - match - \b(Include|Release)\b - name - keyword.control.Inform7 - - - begin - \[ - comment - All comments in Inform7 are delimited this way. - end - \] - name - comment.block.Inform7 - - - begin - " - end - " - name - string.quoted.double.Inform7 - patterns - - - begin - \[ - comment - For logic inside of strings. - end - \] - name - keyword.operator.Inform7 - - - - - comment - Matches headings for major sections in Inform7 - match - (Volume|Book|Chapter|Part|Section|Table)\s+\d?\s+-?\s+((?:\w|\s|-)*) - name - storage.type.Inform7 - - - comment - Gotta call out the numbers! - match - ([0-9])+ - name - constant.numeric.Inform7 - - - scopeName - source.Inform7 - uuid - 0c4cbdee-beb7-4ea6-af56-27246d479373 - - diff --git a/vendor/grammars/Sublime-Inform/Inform7/object.sublime-snippet b/vendor/grammars/Sublime-Inform/Inform7/object.sublime-snippet deleted file mode 100644 index 65f040af75..0000000000 --- a/vendor/grammars/Sublime-Inform/Inform7/object.sublime-snippet +++ /dev/null @@ -1,8 +0,0 @@ - - - object - source.Inform7 - diff --git a/vendor/grammars/Sublime-Inform/Inform7/part.sublime-snippet b/vendor/grammars/Sublime-Inform/Inform7/part.sublime-snippet deleted file mode 100644 index 9e161ccac2..0000000000 --- a/vendor/grammars/Sublime-Inform/Inform7/part.sublime-snippet +++ /dev/null @@ -1,6 +0,0 @@ - - - part - source.Inform7 - diff --git a/vendor/grammars/Sublime-Inform/Inform7/room.sublime-snippet b/vendor/grammars/Sublime-Inform/Inform7/room.sublime-snippet deleted file mode 100644 index b6abef4505..0000000000 --- a/vendor/grammars/Sublime-Inform/Inform7/room.sublime-snippet +++ /dev/null @@ -1,7 +0,0 @@ - - - room - source.Inform7 - diff --git a/vendor/grammars/Sublime-Inform/Inform7/scene.sublime-snippet b/vendor/grammars/Sublime-Inform/Inform7/scene.sublime-snippet deleted file mode 100644 index fd4be0305b..0000000000 --- a/vendor/grammars/Sublime-Inform/Inform7/scene.sublime-snippet +++ /dev/null @@ -1,11 +0,0 @@ - - - scene - source.Inform7 - diff --git a/vendor/grammars/Sublime-Inform/Inform7/section.sublime-snippet b/vendor/grammars/Sublime-Inform/Inform7/section.sublime-snippet deleted file mode 100644 index 7ab043cbbe..0000000000 --- a/vendor/grammars/Sublime-Inform/Inform7/section.sublime-snippet +++ /dev/null @@ -1,6 +0,0 @@ - - - section - source.Inform7 - diff --git a/vendor/grammars/Sublime-Inform/Inform7/volume.sublime-snippet b/vendor/grammars/Sublime-Inform/Inform7/volume.sublime-snippet deleted file mode 100644 index 0721fcbf14..0000000000 --- a/vendor/grammars/Sublime-Inform/Inform7/volume.sublime-snippet +++ /dev/null @@ -1,6 +0,0 @@ - - - volume - source.Inform7 - diff --git a/vendor/grammars/Sublime-Inform/LICENSE.txt b/vendor/grammars/Sublime-Inform/LICENSE.txt deleted file mode 100644 index cda6f052d1..0000000000 --- a/vendor/grammars/Sublime-Inform/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Nate Dickson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/grammars/Sublime-Inform/README.md b/vendor/grammars/Sublime-Inform/README.md deleted file mode 100644 index 3b907f1e77..0000000000 --- a/vendor/grammars/Sublime-Inform/README.md +++ /dev/null @@ -1,8 +0,0 @@ -#Inform7 Package for Sublime Text 2 -This package has a lot of little files that make Inform7 easier to edit in Sublime Text 2. that's why it's called what it is, you see. -##Usage -Grab the zip file, unzip it, and put it in your ```Packages``` Directory. -That's pretty much it. Open an ```i7x``` file in Sublime Text 2 and it'll be all highlighted and there's a bunch of snippets you can use and all that. - -##Want to submit a pull request for this readme file? -Please, please do. \ No newline at end of file diff --git a/vendor/grammars/less.tmbundle/Commands/Save to CSS.tmCommand b/vendor/grammars/less.tmbundle/Commands/Save to CSS.tmCommand deleted file mode 100644 index 9f8e75613d..0000000000 --- a/vendor/grammars/less.tmbundle/Commands/Save to CSS.tmCommand +++ /dev/null @@ -1,47 +0,0 @@ - - - - - beforeRunningCommand - saveActiveFile - command - #!/usr/bin/env ruby18 - -file = ENV["TM_FILEPATH"] -target = file.sub(/\.less$/, ".css") -system("lessc \"#{file}\" \"#{target}\"") -puts "Compiled CSS to '#{target}'" - input - document - inputFormat - text - keyEquivalent - @b - name - Save to CSS - outputCaret - afterOutput - outputFormat - text - outputLocation - toolTip - requiredCommands - - - command - lessc - locations - - /opt/local/bin/lessc - /usr/local/bin/lessc - - - - scope - source.css.less - uuid - 78788223-5E5E-434E-98BE-17BCDF600611 - version - 2 - - diff --git a/vendor/grammars/less.tmbundle/Commands/Save to Minified CSS.tmCommand b/vendor/grammars/less.tmbundle/Commands/Save to Minified CSS.tmCommand deleted file mode 100644 index fc8fe21f14..0000000000 --- a/vendor/grammars/less.tmbundle/Commands/Save to Minified CSS.tmCommand +++ /dev/null @@ -1,47 +0,0 @@ - - - - - beforeRunningCommand - saveActiveFile - command - #!/usr/bin/env ruby18 - -file = ENV["TM_FILEPATH"] -target = file.sub(/\.less$/, ".css") -system("lessc -x \"#{file}\" \"#{target}\"") -puts "Compiled Minified CSS to '#{target}'" - input - document - inputFormat - text - keyEquivalent - ~@b - name - Save to Minified CSS - outputCaret - afterOutput - outputFormat - text - outputLocation - toolTip - requiredCommands - - - command - lessc - locations - - /opt/local/bin/lessc - /usr/local/bin/lessc - - - - scope - source.css.less - uuid - 448D3A8D-260E-4949-BA33-654886ECDCAF - version - 2 - - diff --git a/vendor/grammars/less.tmbundle/DragCommands/Insert inline Image.tmDragCommand b/vendor/grammars/less.tmbundle/DragCommands/Insert inline Image.tmDragCommand deleted file mode 100644 index 21ce88f489..0000000000 --- a/vendor/grammars/less.tmbundle/DragCommands/Insert inline Image.tmDragCommand +++ /dev/null @@ -1,38 +0,0 @@ - - - - - beforeRunningCommand - nop - command - #!/usr/bin/env php -<?php -$path = getenv('TM_DROPPED_FILE'); -$path_parts = pathinfo($path); -$info = getimagesize($path); -list($width, $height) = $info; -$mime = $info['mime']; -$contents = base64_encode(file_get_contents($path)); - -echo "@gfx-{$path_parts['filename']}: \"data:{$mime};base64,{$contents}\";\n"; -echo "@gfx-{$path_parts['filename']}-width: {$width}px;\n"; -echo "@gfx-{$path_parts['filename']}-height: {$height}px;"; - draggedFileExtensions - - png - jpeg - jpg - gif - - input - selection - name - Insert inline Image - output - insertAsSnippet - scope - source.css.less - uuid - 7B0CA307-CC1C-4EE2-9F63-4825800ACDA7 - - diff --git a/vendor/grammars/less.tmbundle/Preferences/Comment.tmPreferences b/vendor/grammars/less.tmbundle/Preferences/Comment.tmPreferences deleted file mode 100644 index 1d8bf1fec9..0000000000 --- a/vendor/grammars/less.tmbundle/Preferences/Comment.tmPreferences +++ /dev/null @@ -1,36 +0,0 @@ - - - - - name - Comments - scope - source.css.less - settings - - shellVariables - - - name - TM_COMMENT_START - value - // - - - name - TM_COMMENT_START_2 - value - /* - - - name - TM_COMMENT_END_2 - value - */ - - - - uuid - D0CC551B-751D-4A7C-A738-2513E3C7F285 - - diff --git a/vendor/grammars/less.tmbundle/README.md b/vendor/grammars/less.tmbundle/README.md deleted file mode 100644 index ed6ac672e5..0000000000 --- a/vendor/grammars/less.tmbundle/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Installation - -You can install this bundle in TextMate by opening the preferences and going to the bundles tab. After installation it will be automatically updated for you. - -# License (MIT) - -Copyright (c) 2010 Scott Kyle and Rasmus Andersson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/grammars/less.tmbundle/Syntaxes/LESS.tmLanguage b/vendor/grammars/less.tmbundle/Syntaxes/LESS.tmLanguage deleted file mode 100644 index ac6ff8ba5c..0000000000 --- a/vendor/grammars/less.tmbundle/Syntaxes/LESS.tmLanguage +++ /dev/null @@ -1,434 +0,0 @@ - - - - - comment - LeSS - fileTypes - - less - - foldingStartMarker - /\*\*(?!\*)|\{\s*($|/\*(?!.*?\*/.*\S)) - foldingStopMarker - (?<!\*)\*\*/|^\s*\} - keyEquivalent - ^~L - name - LESS - patterns - - - match - \b(a|abbr|acronym|address|applet|article|area|audio|video|b|base|big|blockquote|body|br|button|caption|canvas|center|cite|code|col|colgroup|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figure|figcaption|form|frame|frameset|(h[1-6])|head|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|meta|menu|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|q|ruby|s|samp|script|select|small|span|strike|strong|style|sub|sup|summary|svg|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|ul|var|header|section|footer|aside|hgroup|time)\b - name - keyword.control.html.elements - - - begin - " - beginCaptures - - 0 - - name - punctuation.definition.string.begin.css - - - end - " - endCaptures - - 0 - - name - punctuation.definition.string.end.css - - - name - string.quoted.double.css - patterns - - - match - \\. - name - constant.character.escaped.css - - - - - begin - ' - beginCaptures - - 0 - - name - punctuation.definition.string.begin.css - - - end - ' - endCaptures - - 0 - - name - punctuation.definition.string.end.css - - - name - string.quoted.single.css - patterns - - - match - \\. - name - constant.character.escaped.css - - - - - captures - - 1 - - name - entity.other.attribute-name.class.css - - - match - (\.[a-zA-Z0-9_-]+) - - - begin - url\( - contentName - variable.parameter.url - end - \) - name - support.function.any-method.builtin.css - - - match - (#)([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\b - name - constant.other.rgb-value.css - - - captures - - 0 - - name - entity.other.attribute-name.id - - - match - #[a-zA-Z0-9_:\(\)-]+ - name - meta.selector.css - - - begin - /\* - beginCaptures - - 0 - - name - punctuation.definition.comment.begin.css - - - end - \*/ - endCaptures - - 0 - - name - punctuation.definition.comment.end.css - - - name - comment.block.css - - - match - (-|\+)?\s*[0-9]+(\.[0-9]+)? - name - constant.numeric.css - - - match - (?<=[\d])(px|pt|cm|mm|in|em|ex|pc)\b|% - name - keyword.other.unit.css - - - captures - - 1 - - name - entity.other.attribute-name.pseudo-element.css - - - match - (:+(after|before|not|last-child|nth-of-type|nth-child|first-child|first-letter|first-line|selection|root)) - - - captures - - 1 - - name - entity.other.attribute-name.pseudo-class.css - - - match - (:+(active|hover|link|visited|focus)) - - - captures - - 1 - - name - punctuation.definition.entity.css - - 2 - - name - entity.other.attribute-name.attribute.css - - 3 - - name - punctuation.separator.operator.css - - 4 - - name - string.unquoted.attribute-value.css - - 5 - - name - string.quoted.double.attribute-value.css - - 6 - - name - punctuation.definition.string.begin.css - - 7 - - name - punctuation.definition.string.end.css - - - match - (?i)(\[)\s*(-?[_a-z\\[[:^ascii:]]][_a-z0-9\-\\[[:^ascii:]]]*)(?:\s*([~|^$*]?=)\s*(?:(-?[_a-z\\[[:^ascii:]]][_a-z0-9\-\\[[:^ascii:]]]*)|((?>(['"])(?:[^\\]|\\.)*?(\6)))))?\s*(\]) - name - meta.attribute-selector.css - - - captures - - 1 - - name - keyword.control.at-rule.import.css - - 2 - - name - punctuation.definition.keyword.css - - - match - ^\s*((@)import\b) - name - meta.at-rule.import.css - - - captures - - 1 - - name - support.type.property-name.css.vendor - - - match - (-(?:webkit|moz|khtml|o|icab|ms)-(?:background-size|border-radius|box-shadow|opacity|border-image))\s*: - - - captures - - 1 - - name - support.type.property-name.css - - - match - \b(azimuth|background-attachment|background-color|background-clip|background-image|background-position|background-repeat|background-size|background|behavior|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border-radius|border|box-shadow|bottom|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|filter|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|opacity|orphans|outline-color|outline-style|outline-width|outline|overflow(-[xy])?|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|pre-wrap|quotes|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|word-wrap|z-index|zoom) - - - match - \b(absolute|all-scroll|always|auto|baseline|below|bidi-override|block|bold|bolder|both|bottom|break-all|break-word|capitalize|center|char|circle|col-resize|collapse|crosshair|dashed|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|groove|hand|help|hidden|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|keep-all|left|lighter|line-edge|line-through|line|linear|list-item|loose|lower-alpha|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|padding-box)\b - name - support.constant.property-value.css - - - match - (\b(?i:arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace)\b) - name - support.constant.font-name.css - - - comment - http://www.w3.org/TR/CSS21/syndata.html#value-def-color - match - \b(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)\b - name - support.constant.color.w3c-standard-color-name.css - - - match - \b(saturate|desaturate|lighten|darken|grayscale)\b - name - support.function.any-method.builtin.less - - - match - \b(rgb|rgba|hsl|hsla|url)\b - name - support.function.any-method.builtin.css - - - captures - - 1 - - name - support.function.any-method.vendor.css - - - match - (-(?:webkit|moz|khtml|o|icab)-(?:gradient|linear-gradient)) - - - match - \b(color-stop|from|to)\b - name - support.function.any-method.webkit.gradient.css - - - captures - - 1 - - name - support.function.less - - - match - (\.[a-zA-Z0-9_-]+)\s*(;|\() - - - begin - (^[ \t]+)?(?=//) - beginCaptures - - 1 - - name - punctuation.whitespace.comment.leading.less - - - end - (?!\G) - patterns - - - begin - // - beginCaptures - - 0 - - name - punctuation.definition.comment.less - - - end - \n - name - comment.line.double-slash.less - - - - - match - @[a-zA-Z0-9_-][\w-]* - name - variable.other.less - - - match - \$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|(?<!\()/=|%=|\+=|\-=|&=|\^=|\/\b - name - keyword.operator.less - - - captures - - 1 - - name - punctuation.section.property-list.begin.css - - 2 - - name - punctuation.section.property-list.end.css - - - comment - Match empty braces to give proper ↩ action - match - (\{)(\}) - name - meta.brace.curly.less - - - match - \{|\} - name - meta.brace.curly.less - - - match - \(|\) - name - meta.brace.round.less - - - match - \[|\] - name - meta.brace.square.less - - - scopeName - source.css.less - uuid - 9343D324-75A1-4733-A5C0-5D1D4B6182D0 - - diff --git a/vendor/grammars/less.tmbundle/info.plist b/vendor/grammars/less.tmbundle/info.plist deleted file mode 100644 index e555f0ba8c..0000000000 --- a/vendor/grammars/less.tmbundle/info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - contactEmailRot13 - zfurrgf@juvgrsnyyf.bet - contactName - Michael Sheets - description - Extends CSS with dynamic behavior such as variables, mixins, operations and functions. - mainMenu - - items - - 78788223-5E5E-434E-98BE-17BCDF600611 - 448D3A8D-260E-4949-BA33-654886ECDCAF - - submenus - - - name - LESS - uuid - D1D51EE5-E89F-4B14-8AE4-FC364E540B47 - - diff --git a/vendor/licenses/grammar/Sublime-Inform.txt b/vendor/licenses/grammar/Sublime-Inform.txt deleted file mode 100644 index 15d8edfbf0..0000000000 --- a/vendor/licenses/grammar/Sublime-Inform.txt +++ /dev/null @@ -1,26 +0,0 @@ ---- -type: grammar -name: Sublime-Inform -license: mit ---- -The MIT License (MIT) - -Copyright (c) 2014 Nate Dickson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/licenses/grammar/less.tmbundle.txt b/vendor/licenses/grammar/less.tmbundle.txt deleted file mode 100644 index 5d12ca2e97..0000000000 --- a/vendor/licenses/grammar/less.tmbundle.txt +++ /dev/null @@ -1,14 +0,0 @@ ---- -type: grammar -name: less.tmbundle -license: mit -curated: true ---- - -Copyright (c) 2010 Scott Kyle and Rasmus Andersson - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. From 98118eb70bffbf3dc0e1348c1a1af74913174a00 Mon Sep 17 00:00:00 2001 From: Alhadis Date: Tue, 6 Sep 2016 16:50:52 +1000 Subject: [PATCH 0048/1214] Add new grammar for MSDOS Batchfile highlighting --- .gitmodules | 6 ++--- grammars.yml | 4 +-- lib/linguist/languages.yml | 2 +- vendor/grammars/ebundles | 1 - vendor/grammars/language-batchfile | 1 + vendor/licenses/grammar/ebundles.txt | 26 ------------------- .../licenses/grammar/language-batchfile.txt | 24 +++++++++++++++++ 7 files changed, 31 insertions(+), 33 deletions(-) delete mode 160000 vendor/grammars/ebundles create mode 160000 vendor/grammars/language-batchfile delete mode 100644 vendor/licenses/grammar/ebundles.txt create mode 100644 vendor/licenses/grammar/language-batchfile.txt diff --git a/.gitmodules b/.gitmodules index 326a2a06cc..58b676d66f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -412,9 +412,9 @@ [submodule "vendor/grammars/oz-tmbundle"] path = vendor/grammars/oz-tmbundle url = https://github.com/eregon/oz-tmbundle -[submodule "vendor/grammars/ebundles"] - path = vendor/grammars/ebundles - url = https://github.com/ericzou/ebundles +[submodule "vendor/grammars/language-batchfile"] + path = vendor/grammars/language-batchfile + url = https://github.com/mmims/language-batchfile [submodule "vendor/grammars/sublime-mask"] path = vendor/grammars/sublime-mask url = https://github.com/tenbits/sublime-mask diff --git a/grammars.yml b/grammars.yml index caa1421357..0ca7a6a9ae 100755 --- a/grammars.yml +++ b/grammars.yml @@ -243,8 +243,6 @@ vendor/grammars/dylan.tmbundle: - source.dylan - source.lid - source.makegen -vendor/grammars/ebundles/Bundles/MSDOS batch file.tmbundle: -- source.dosbatch vendor/grammars/ec.tmbundle: - source.c.ec vendor/grammars/eiffel.tmbundle: @@ -335,6 +333,8 @@ vendor/grammars/language-asn1: vendor/grammars/language-babel: - source.js.jsx - source.regexp.babel +vendor/grammars/language-batchfile: +- source.batchfile vendor/grammars/language-blade: - text.html.php.blade vendor/grammars/language-click: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 829b044636..0699a5dd0c 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -331,7 +331,7 @@ Batchfile: extensions: - .bat - .cmd - tm_scope: source.dosbatch + tm_scope: source.batchfile ace_mode: batchfile color: "#C1F12E" diff --git a/vendor/grammars/ebundles b/vendor/grammars/ebundles deleted file mode 160000 index d9b802135a..0000000000 --- a/vendor/grammars/ebundles +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d9b802135a533abf113c164d25b23143a47283e7 diff --git a/vendor/grammars/language-batchfile b/vendor/grammars/language-batchfile new file mode 160000 index 0000000000..100b682992 --- /dev/null +++ b/vendor/grammars/language-batchfile @@ -0,0 +1 @@ +Subproject commit 100b682992acf511ab330de2c54b8c42493964e4 diff --git a/vendor/licenses/grammar/ebundles.txt b/vendor/licenses/grammar/ebundles.txt deleted file mode 100644 index eccf457981..0000000000 --- a/vendor/licenses/grammar/ebundles.txt +++ /dev/null @@ -1,26 +0,0 @@ ---- -type: grammar -name: ebundles -license: mit -curated: true ---- -If not otherwise specified (see below), files in this repository (located at https://ebundles.googlecode.com/svn/) fall under the MIT License: - - Permission is hereby granted, free of charge, to any person obtaining a copy of - this software and associated documentation files (the "Software"), to deal in - the Software without restriction, including without limitation the rights to - use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - the Software, and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”. diff --git a/vendor/licenses/grammar/language-batchfile.txt b/vendor/licenses/grammar/language-batchfile.txt new file mode 100644 index 0000000000..4f9ab62e4c --- /dev/null +++ b/vendor/licenses/grammar/language-batchfile.txt @@ -0,0 +1,24 @@ +--- +type: grammar +name: language-batchfile +license: mit +--- +Copyright (c) 2014 Michael Mims + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. From 2d51a5dba48cddd5c940fff01f8165a4475253f1 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Wed, 7 Sep 2016 08:05:22 +0200 Subject: [PATCH 0049/1214] Recognise R comments in heuristic. --- lib/linguist/heuristics.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index 48b7e54f5d..ad4f4504c5 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -354,7 +354,7 @@ def call(data) disambiguate ".r" do |data| if /\bRebol\b/i.match(data) Language["Rebol"] - elsif data.include?("<-") + elsif /<-|^\s*#/.match(data) Language["R"] end end From 35a13b363372b77542c4d712868eff29d3147a96 Mon Sep 17 00:00:00 2001 From: Alhadis Date: Fri, 9 Sep 2016 05:41:46 +1000 Subject: [PATCH 0050/1214] Add .spec as a supported Python and Ruby extension --- lib/linguist/languages.yml | 2 ++ samples/Python/spec.linux.spec | 22 +++++++++++++++++ samples/Ruby/any.spec | 44 ++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 samples/Python/spec.linux.spec create mode 100644 samples/Ruby/any.spec diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 4ff0200fe6..15465a3e83 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3078,6 +3078,7 @@ Python: - .pyt - .pyw - .rpy + - .spec - .tac - .wsgi - .xpy @@ -3340,6 +3341,7 @@ Ruby: - .rbx - .ru - .ruby + - .spec - .thor - .watchr interpreters: diff --git a/samples/Python/spec.linux.spec b/samples/Python/spec.linux.spec new file mode 100644 index 0000000000..c5806cd328 --- /dev/null +++ b/samples/Python/spec.linux.spec @@ -0,0 +1,22 @@ +a = Analysis(['portablizer.pyqt4.py'], + hiddenimports=[], + hookspath=None, + runtime_hooks=None) +pyz = PYZ(a.pure) +exe = EXE(pyz, + a.scripts, + exclude_binaries=True, + name='Portablizer', + debug=False, + strip=None, + upx=True, + console=False) +node = Tree('node', prefix='node') +collect = COLLECT(exe, + a.binaries, + a.zipfiles, + a.datas, + node, + strip=None, + upx=True, + name='Portablizer') diff --git a/samples/Ruby/any.spec b/samples/Ruby/any.spec new file mode 100644 index 0000000000..501883143e --- /dev/null +++ b/samples/Ruby/any.spec @@ -0,0 +1,44 @@ +require File.dirname(File.expand_path(__FILE__)) + '/../spec_helper' + +describe Spira::Types::Any do + + before :all do + @uri = RDF::URI('http://example.org') + end + + # this spec is going to be necessarily loose. The 'Any' type is defined to + # use RDF.rb's automatic RDF Literal boxing and unboxing, which may or may + # not change between verions. + # + context "when serializing" do + it "should serialize literals to RDF Literals" do + serialized = Spira::Types::Any.serialize(15) + serialized.should be_a RDF::Literal + serialized = Spira::Types::Any.serialize("test") + serialized.should be_a RDF::Literal + end + + it "should keep RDF::URIs as URIs" do + Spira::Types::Any.serialize(@uri).should == @uri + end + + it "should fail to serialize collections" do + lambda { Spira::Types::Any.serialize([]) }.should raise_error TypeError + end + end + + context "when unserializing" do + it "should unserialize to ruby types" do + value = Spira::Types::Any.unserialize(RDF::Literal.new(5, :datatype => RDF::XSD.integer)) + value.should == 5 + value = Spira::Types::Any.unserialize(RDF::Literal.new("a string")) + value.should == "a string" + end + + it "should unserialize URIs to URIs" do + Spira::Types::Any.unserialize(@uri).should == @uri + end + end + + +end From dad3191238d2a40ed83ed63eec584311115d756c Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Fri, 9 Sep 2016 08:27:17 +0200 Subject: [PATCH 0051/1214] Add Filebench Workload Model Language. Sample file from filebench project, Sun CDDL license. --- lib/linguist/heuristics.rb | 16 ++++++++-- lib/linguist/languages.yml | 7 +++++ samples/Filebench WML/copyfiles.f | 51 +++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 samples/Filebench WML/copyfiles.f diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index 48b7e54f5d..1f963ce4a2 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -144,10 +144,22 @@ def call(data) end end - disambiguate ".for", ".f" do |data| + fortran_rx = /^([c*][^abd-z]| (subroutine|program|end)\s|\s*!)/i + + disambiguate ".f" do |data| + if /^: /.match(data) + Language["Forth"] + elsif data.include?("flowop") + Language["Filebench WML"] + elsif fortran_rx.match(data) + Language["FORTRAN"] + end + end + + disambiguate ".for" do |data| if /^: /.match(data) Language["Forth"] - elsif /^([c*][^abd-z]| (subroutine|program|end)\s|\s*!)/i.match(data) + elsif fortran_rx.match(data) Language["FORTRAN"] end end diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 4b35247221..5b2fff4f31 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1135,6 +1135,13 @@ Fantom: tm_scope: none ace_mode: text +Filebench WML: + type: programming + extensions: + - .f + tm_scope: none + ace_mode: text + Filterscript: type: programming group: RenderScript diff --git a/samples/Filebench WML/copyfiles.f b/samples/Filebench WML/copyfiles.f new file mode 100644 index 0000000000..dc7f66fa35 --- /dev/null +++ b/samples/Filebench WML/copyfiles.f @@ -0,0 +1,51 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2009 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +set $dir=/tmp +set $nfiles=1000 +set $meandirwidth=20 +set $meanfilesize=16k +set $iosize=1m +set $nthreads=1 + +set mode quit firstdone + +define fileset name=bigfileset,path=$dir,size=$meanfilesize,entries=$nfiles,dirwidth=$meandirwidth,prealloc=100,paralloc +define fileset name=destfiles,path=$dir,size=$meanfilesize,entries=$nfiles,dirwidth=$meandirwidth + +define process name=filereader,instances=1 +{ + thread name=filereaderthread,memsize=10m,instances=$nthreads + { + flowop openfile name=openfile1,filesetname=bigfileset,fd=1 + flowop readwholefile name=readfile1,fd=1,iosize=$iosize + flowop createfile name=createfile2,filesetname=destfiles,fd=2 + flowop writewholefile name=writefile2,fd=2,srcfd=1,iosize=$iosize + flowop closefile name=closefile1,fd=1 + flowop closefile name=closefile2,fd=2 + } +} + +echo "Copyfiles Version 3.0 personality successfully loaded" From 3247d46e8170a5fb63b6e6690e6b4809c8833738 Mon Sep 17 00:00:00 2001 From: Alhadis Date: Fri, 9 Sep 2016 16:27:57 +1000 Subject: [PATCH 0052/1214] Chop trailing slashes before looking up language --- script/list-grammars | 2 +- vendor/README.md | 58 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/script/list-grammars b/script/list-grammars index 2254274545..96e3a35d6b 100755 --- a/script/list-grammars +++ b/script/list-grammars @@ -77,7 +77,7 @@ class GrammarList short_url = "eregon/oz-tmbundle" long_url = "https://github.com/eregon/oz-tmbundle" else - submodule = @submodules[@sources[scope]] + submodule = @submodules[@sources[scope].chomp("/")] next unless submodule short_url = submodule[:short] long_url = submodule[:url] diff --git a/vendor/README.md b/vendor/README.md index aa3e492f10..f7569ee687 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -20,24 +20,34 @@ If you've encountered an error with highlighting, please report it to the approp - **ANTLR:** [textmate/antlr.tmbundle](https://github.com/textmate/antlr.tmbundle) - **ApacheConf:** [textmate/apache.tmbundle](https://github.com/textmate/apache.tmbundle) - **Apex:** [textmate/java.tmbundle](https://github.com/textmate/java.tmbundle) +- **API Blueprint:** [apiaryio/api-blueprint-sublime-plugin](https://github.com/apiaryio/api-blueprint-sublime-plugin) - **APL:** [Alhadis/language-apl](https://github.com/Alhadis/language-apl) - **Apollo Guidance Computer:** [Alhadis/language-agc](https://github.com/Alhadis/language-agc) - **AppleScript:** [textmate/applescript.tmbundle](https://github.com/textmate/applescript.tmbundle) - **Arduino:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) +- **AsciiDoc:** [zuckschwerdt/asciidoc.tmbundle](https://github.com/zuckschwerdt/asciidoc.tmbundle) - **ASN.1:** [ajLangley12/language-asn1](https://github.com/ajLangley12/language-asn1) - **ASP:** [textmate/asp.tmbundle](https://github.com/textmate/asp.tmbundle) +- **AspectJ:** [pchaigno/sublime-aspectj](https://github.com/pchaigno/sublime-aspectj) +- **Assembly:** [Nessphoro/sublimeassembly](https://github.com/Nessphoro/sublimeassembly) - **ATS:** [steinwaywhw/ats-mode-sublimetext](https://github.com/steinwaywhw/ats-mode-sublimetext) +- **AutoHotkey:** [ahkscript/SublimeAutoHotkey](https://github.com/ahkscript/SublimeAutoHotkey) +- **AutoIt:** [AutoIt/SublimeAutoItScript](https://github.com/AutoIt/SublimeAutoItScript) - **Awk:** [JohnNilsson/awk-sublime](https://github.com/JohnNilsson/awk-sublime) - **Befunge:** [johanasplund/sublime-befunge](https://github.com/johanasplund/sublime-befunge) - **Bison:** [textmate/bison.tmbundle](https://github.com/textmate/bison.tmbundle) +- **Blade:** [jawee/language-blade](https://github.com/jawee/language-blade) - **BlitzBasic:** [textmate/blitzmax.tmbundle](https://github.com/textmate/blitzmax.tmbundle) - **BlitzMax:** [textmate/blitzmax.tmbundle](https://github.com/textmate/blitzmax.tmbundle) - **Bluespec:** [thotypous/sublime-bsv](https://github.com/thotypous/sublime-bsv) +- **Boo:** [Shammah/boo-sublime](https://github.com/Shammah/boo-sublime) - **Brainfuck:** [Drako/SublimeBrainfuck](https://github.com/Drako/SublimeBrainfuck) +- **Brightscript:** [cmink/BrightScript.tmbundle](https://github.com/cmink/BrightScript.tmbundle) - **Bro:** [bro/bro-sublime](https://github.com/bro/bro-sublime) - **C:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) - **C#:** [atom/language-csharp](https://github.com/atom/language-csharp) - **C++:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) +- **C-ObjDump:** [nanoant/assembly.tmbundle](https://github.com/nanoant/assembly.tmbundle) - **C2hs Haskell:** [atom-haskell/language-haskell](https://github.com/atom-haskell/language-haskell) - **Cap'n Proto:** [textmate/capnproto.tmbundle](https://github.com/textmate/capnproto.tmbundle) - **CartoCSS:** [yohanboniface/carto-atom](https://github.com/yohanboniface/carto-atom) @@ -45,7 +55,10 @@ If you've encountered an error with highlighting, please report it to the approp - **Chapel:** [chapel-lang/chapel-tmbundle](https://github.com/chapel-lang/chapel-tmbundle) - **ChucK:** [textmate/java.tmbundle](https://github.com/textmate/java.tmbundle) - **Cirru:** [Cirru/sublime-cirru](https://github.com/Cirru/sublime-cirru) +- **Clarion:** [fushnisoft/SublimeClarion](https://github.com/fushnisoft/SublimeClarion) - **Clean:** [timjs/atom-language-clean](https://github.com/timjs/atom-language-clean) +- **Click:** [stenverbois/language-click](https://github.com/stenverbois/language-click) +- **CLIPS:** [psicomante/CLIPS-sublime](https://github.com/psicomante/CLIPS-sublime) - **Clojure:** [atom/language-clojure](https://github.com/atom/language-clojure) - **CMake:** [textmate/cmake.tmbundle](https://github.com/textmate/cmake.tmbundle) - **COBOL:** [bitbucket:bitlang/sublime_cobol](https://bitbucket.org/bitlang/sublime_cobol) @@ -57,6 +70,8 @@ If you've encountered an error with highlighting, please report it to the approp - **Component Pascal:** [textmate/pascal.tmbundle](https://github.com/textmate/pascal.tmbundle) - **Cool:** [anunayk/cool-tmbundle](https://github.com/anunayk/cool-tmbundle) - **Coq:** [mkolosick/Sublime-Coq](https://github.com/mkolosick/Sublime-Coq) +- **Cpp-ObjDump:** [nanoant/assembly.tmbundle](https://github.com/nanoant/assembly.tmbundle) +- **Creole:** [Siddley/Creole](https://github.com/Siddley/Creole) - **Crystal:** [atom-crystal/language-crystal](https://github.com/atom-crystal/language-crystal) - **Csound:** [nwhetsell/language-csound](https://github.com/nwhetsell/language-csound) - **Csound Document:** [nwhetsell/language-csound](https://github.com/nwhetsell/language-csound) @@ -67,23 +82,29 @@ If you've encountered an error with highlighting, please report it to the approp - **Cycript:** [atom/language-javascript](https://github.com/atom/language-javascript) - **Cython:** [textmate/cython.tmbundle](https://github.com/textmate/cython.tmbundle) - **D:** [textmate/d.tmbundle](https://github.com/textmate/d.tmbundle) +- **D-ObjDump:** [nanoant/assembly.tmbundle](https://github.com/nanoant/assembly.tmbundle) - **Dart:** [guillermooo/dart-sublime-bundle](https://github.com/guillermooo/dart-sublime-bundle) - **desktop:** [Mailaender/desktop.tmbundle](https://github.com/Mailaender/desktop.tmbundle) - **Diff:** [textmate/diff.tmbundle](https://github.com/textmate/diff.tmbundle) +- **DM:** [PJB3005/atomic-dreams](https://github.com/PJB3005/atomic-dreams) - **DNS Zone:** [sixty4k/st2-zonefile](https://github.com/sixty4k/st2-zonefile) - **Dockerfile:** [asbjornenge/Docker.tmbundle](https://github.com/asbjornenge/Docker.tmbundle) - **DTrace:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) - **Dylan:** [textmate/dylan.tmbundle](https://github.com/textmate/dylan.tmbundle) - **Eagle:** [textmate/xml.tmbundle](https://github.com/textmate/xml.tmbundle) +- **eC:** [ecere/ec.tmbundle](https://github.com/ecere/ec.tmbundle) - **Ecere Projects:** [textmate/json.tmbundle](https://github.com/textmate/json.tmbundle) +- **ECLiPSe:** [alnkpa/sublimeprolog](https://github.com/alnkpa/sublimeprolog) - **edn:** [atom/language-clojure](https://github.com/atom/language-clojure) - **Eiffel:** [textmate/eiffel.tmbundle](https://github.com/textmate/eiffel.tmbundle) - **EJS:** [gregory-m/ejs-tmbundle](https://github.com/gregory-m/ejs-tmbundle) - **Elixir:** [elixir-lang/elixir-tmbundle](https://github.com/elixir-lang/elixir-tmbundle) +- **Elm:** [elm-community/Elm.tmLanguage](https://github.com/elm-community/Elm.tmLanguage) - **Emacs Lisp:** [Alhadis/language-emacs-lisp](https://github.com/Alhadis/language-emacs-lisp) - **EmberScript:** [atom/language-coffee-script](https://github.com/atom/language-coffee-script) - **EQ:** [atom/language-csharp](https://github.com/atom/language-csharp) - **Erlang:** [textmate/erlang.tmbundle](https://github.com/textmate/erlang.tmbundle) +- **F#:** [fsprojects/atom-fsharp](https://github.com/fsprojects/atom-fsharp) - **Factor:** [slavapestov/factor](https://github.com/slavapestov/factor) - **Fancy:** [fancy-lang/fancy-tmbundle](https://github.com/fancy-lang/fancy-tmbundle) - **fish:** [l15n/fish-tmbundle](https://github.com/l15n/fish-tmbundle) @@ -91,8 +112,13 @@ If you've encountered an error with highlighting, please report it to the approp - **FORTRAN:** [textmate/fortran.tmbundle](https://github.com/textmate/fortran.tmbundle) - **FreeMarker:** [freemarker/FreeMarker.tmbundle](https://github.com/freemarker/FreeMarker.tmbundle) - **Frege:** [atom-haskell/language-haskell](https://github.com/atom-haskell/language-haskell) +- **G-code:** [robotmaster/sublime-text-syntax-highlighting](https://github.com/robotmaster/sublime-text-syntax-highlighting) - **Game Maker Language:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) +- **GAP:** [dhowden/gap-tmbundle](https://github.com/dhowden/gap-tmbundle) +- **GAS:** [Nessphoro/sublimeassembly](https://github.com/Nessphoro/sublimeassembly) - **GCC Machine Description:** [textmate/lisp.tmbundle](https://github.com/textmate/lisp.tmbundle) +- **GDB:** [quarnster/SublimeGDB](https://github.com/quarnster/SublimeGDB) +- **GDScript:** [beefsack/GDScript-sublime](https://github.com/beefsack/GDScript-sublime) - **Genshi:** [genshi.edgewall.org/query](https://genshi.edgewall.org/query) - **Gentoo Ebuild:** [atom/language-shellscript](https://github.com/atom/language-shellscript) - **Gentoo Eclass:** [atom/language-shellscript](https://github.com/atom/language-shellscript) @@ -101,6 +127,7 @@ If you've encountered an error with highlighting, please report it to the approp - **Glyph:** [textmate/tcl.tmbundle](https://github.com/textmate/tcl.tmbundle) - **Gnuplot:** [mattfoster/gnuplot-tmbundle](https://github.com/mattfoster/gnuplot-tmbundle) - **Go:** [AlanQuatermain/go-tmbundle](https://github.com/AlanQuatermain/go-tmbundle) +- **Golo:** [TypeUnsafe/sublime-golo](https://github.com/TypeUnsafe/sublime-golo) - **Gosu:** [jpcamara/Textmate-Gosu-Bundle](https://github.com/jpcamara/Textmate-Gosu-Bundle) - **Grace:** [zmthy/grace-tmbundle](https://github.com/zmthy/grace-tmbundle) - **Gradle:** [alkemist/gradle.tmbundle](https://github.com/alkemist/gradle.tmbundle) @@ -126,12 +153,14 @@ If you've encountered an error with highlighting, please report it to the approp - **HTTP:** [httpspec/sublime-highlighting](https://github.com/httpspec/sublime-highlighting) - **Hy:** [rwtolbert/language-hy](https://github.com/rwtolbert/language-hy) - **IDL:** [mgalloy/idl.tmbundle](https://github.com/mgalloy/idl.tmbundle) +- **Idris:** [idris-hackers/idris-sublime](https://github.com/idris-hackers/idris-sublime) - **Inform 7:** [erkyrath/language-inform7](https://github.com/erkyrath/language-inform7) - **INI:** [textmate/ini.tmbundle](https://github.com/textmate/ini.tmbundle) - **Io:** [textmate/io.tmbundle](https://github.com/textmate/io.tmbundle) - **Ioke:** [vic/ioke-outdated](https://github.com/vic/ioke-outdated) - **Isabelle:** [lsf37/Isabelle.tmbundle](https://github.com/lsf37/Isabelle.tmbundle) - **Isabelle ROOT:** [lsf37/Isabelle.tmbundle](https://github.com/lsf37/Isabelle.tmbundle) +- **J:** [bcj/JSyntax](https://github.com/bcj/JSyntax) - **Jade:** [davidrios/jade-tmbundle](https://github.com/davidrios/jade-tmbundle) - **Jasmin:** [atmarksharp/jasmin-sublime](https://github.com/atmarksharp/jasmin-sublime) - **Java:** [textmate/java.tmbundle](https://github.com/textmate/java.tmbundle) @@ -140,7 +169,9 @@ If you've encountered an error with highlighting, please report it to the approp - **JFlex:** [jflex-de/jflex.tmbundle](https://github.com/jflex-de/jflex.tmbundle) - **JSON:** [textmate/json.tmbundle](https://github.com/textmate/json.tmbundle) - **JSON5:** [atom/language-javascript](https://github.com/atom/language-javascript) +- **JSONiq:** [wcandillon/language-jsoniq](http://github.com/wcandillon/language-jsoniq) - **JSONLD:** [atom/language-javascript](https://github.com/atom/language-javascript) +- **JSX:** [gandm/language-babel](https://github.com/gandm/language-babel) - **Julia:** [nanoant/Julia.tmbundle](https://github.com/nanoant/Julia.tmbundle) - **Jupyter Notebook:** [textmate/json.tmbundle](https://github.com/textmate/json.tmbundle) - **Kit:** [textmate/html.tmbundle](https://github.com/textmate/html.tmbundle) @@ -149,6 +180,7 @@ If you've encountered an error with highlighting, please report it to the approp - **Lasso:** [bfad/Sublime-Lasso](https://github.com/bfad/Sublime-Lasso) - **Latte:** [textmate/php-smarty.tmbundle](https://github.com/textmate/php-smarty.tmbundle) - **Lean:** [leanprover/Lean.tmbundle](https://github.com/leanprover/Lean.tmbundle) +- **Less:** [atom/language-less](https://github.com/atom/language-less) - **LFE:** [textmate/lisp.tmbundle](https://github.com/textmate/lisp.tmbundle) - **LilyPond:** [textmate/lilypond.tmbundle](https://github.com/textmate/lilypond.tmbundle) - **Liquid:** [bastilian/validcode-textmate-bundles](https://github.com/bastilian/validcode-textmate-bundles) @@ -172,9 +204,13 @@ If you've encountered an error with highlighting, please report it to the approp - **Maven POM:** [textmate/maven.tmbundle](https://github.com/textmate/maven.tmbundle) - **Max:** [textmate/json.tmbundle](https://github.com/textmate/json.tmbundle) - **MAXScript:** [Alhadis/language-maxscript](https://github.com/Alhadis/language-maxscript) +- **MediaWiki:** [textmate/mediawiki.tmbundle](https://github.com/textmate/mediawiki.tmbundle) - **Mercury:** [sebgod/mercury-tmlanguage](https://github.com/sebgod/mercury-tmlanguage) - **Metal:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) - **Mirah:** [aroben/ruby.tmbundle](https://github.com/aroben/ruby.tmbundle) +- **Modelica:** [BorisChumichev/modelicaSublimeTextPackage](https://github.com/BorisChumichev/modelicaSublimeTextPackage) +- **Modula-2:** [harogaston/Sublime-Modula-2](https://github.com/harogaston/Sublime-Modula-2) +- **Monkey:** [gingerbeardman/monkey.tmbundle](https://github.com/gingerbeardman/monkey.tmbundle) - **MoonScript:** [leafo/moonscript-tmbundle](https://github.com/leafo/moonscript-tmbundle) - **MTML:** [textmate/html.tmbundle](https://github.com/textmate/html.tmbundle) - **mupad:** [ccreutzig/sublime-MuPAD](https://github.com/ccreutzig/sublime-MuPAD) @@ -192,29 +228,41 @@ If you've encountered an error with highlighting, please report it to the approp - **Nix:** [wmertens/sublime-nix](https://github.com/wmertens/sublime-nix) - **NSIS:** [SublimeText/NSIS](https://github.com/SublimeText/NSIS) - **Nu:** [jsallis/nu.tmbundle](https://github.com/jsallis/nu.tmbundle) +- **ObjDump:** [nanoant/assembly.tmbundle](https://github.com/nanoant/assembly.tmbundle) - **Objective-C:** [textmate/objective-c.tmbundle](https://github.com/textmate/objective-c.tmbundle) - **Objective-C++:** [textmate/objective-c.tmbundle](https://github.com/textmate/objective-c.tmbundle) - **Objective-J:** [textmate/javascript-objective-j.tmbundle](https://github.com/textmate/javascript-objective-j.tmbundle) - **OCaml:** [textmate/ocaml.tmbundle](https://github.com/textmate/ocaml.tmbundle) - **ooc:** [nilium/ooc.tmbundle](https://github.com/nilium/ooc.tmbundle) - **Opa:** [mads379/opa.tmbundle](https://github.com/mads379/opa.tmbundle) +- **Opal:** [artifactz/sublime-opal](https://github.com/artifactz/sublime-opal) - **OpenCL:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) - **OpenEdge ABL:** [jfairbank/Sublime-Text-2-OpenEdge-ABL](https://github.com/jfairbank/Sublime-Text-2-OpenEdge-ABL) - **OpenRC runscript:** [atom/language-shellscript](https://github.com/atom/language-shellscript) +- **Ox:** [andreashetland/sublime-text-ox](https://github.com/andreashetland/sublime-text-ox) - **Oz:** [eregon/oz-tmbundle](https://github.com/eregon/oz-tmbundle) +- **Papyrus:** [Kapiainen/SublimePapyrus](https://github.com/Kapiainen/SublimePapyrus) - **Parrot Internal Representation:** [textmate/parrot.tmbundle](https://github.com/textmate/parrot.tmbundle) - **Pascal:** [textmate/pascal.tmbundle](https://github.com/textmate/pascal.tmbundle) +- **PAWN:** [Southclaw/pawn-sublime-language](https://github.com/Southclaw/pawn-sublime-language) +- **Perl:** [textmate/perl.tmbundle](https://github.com/textmate/perl.tmbundle) - **Perl6:** [MadcapJake/language-perl6fe](https://github.com/MadcapJake/language-perl6fe) - **PHP:** [textmate/php.tmbundle](https://github.com/textmate/php.tmbundle) - **PicoLisp:** [textmate/lisp.tmbundle](https://github.com/textmate/lisp.tmbundle) +- **PigLatin:** [goblindegook/sublime-text-pig-latin](https://github.com/goblindegook/sublime-text-pig-latin) - **Pike:** [hww3/pike-textmate](https://github.com/hww3/pike-textmate) - **PLpgSQL:** [textmate/sql.tmbundle](https://github.com/textmate/sql.tmbundle) +- **PogoScript:** [featurist/PogoScript.tmbundle](https://github.com/featurist/PogoScript.tmbundle) - **Pony:** [CausalityLtd/sublime-pony](https://github.com/CausalityLtd/sublime-pony) - **PostScript:** [textmate/postscript.tmbundle](https://github.com/textmate/postscript.tmbundle) - **POV-Ray SDL:** [c-lipka/language-povray](https://github.com/c-lipka/language-povray) - **PowerShell:** [SublimeText/PowerShell](https://github.com/SublimeText/PowerShell) - **Processing:** [textmate/processing.tmbundle](https://github.com/textmate/processing.tmbundle) +- **Prolog:** [alnkpa/sublimeprolog](https://github.com/alnkpa/sublimeprolog) +- **Propeller Spin:** [bitbased/sublime-spintools](https://github.com/bitbased/sublime-spintools) - **Protocol Buffer:** [michaeledgar/protobuf-tmbundle](https://github.com/michaeledgar/protobuf-tmbundle) +- **Puppet:** [russCloak/SublimePuppet](https://github.com/russCloak/SublimePuppet) +- **PureScript:** [purescript-contrib/atom-language-purescript](https://github.com/purescript-contrib/atom-language-purescript) - **Python:** [MagicStack/MagicPython](https://github.com/MagicStack/MagicPython) - **Python traceback:** [atom/language-python](https://github.com/atom/language-python) - **QMake:** [textmate/cpp-qt.tmbundle](https://github.com/textmate/cpp-qt.tmbundle) @@ -228,6 +276,7 @@ If you've encountered an error with highlighting, please report it to the approp - **Red:** [Oldes/Sublime-Red](https://github.com/Oldes/Sublime-Red) - **Ren'Py:** [williamd1k0/language-renpy](https://github.com/williamd1k0/language-renpy) - **reStructuredText:** [Lukasa/language-restructuredtext](https://github.com/Lukasa/language-restructuredtext) +- **REXX:** [mblocker/rexx-sublime](https://github.com/mblocker/rexx-sublime) - **RHTML:** [aroben/ruby.tmbundle](https://github.com/aroben/ruby.tmbundle) - **RMarkdown:** [atom/language-gfm](https://github.com/atom/language-gfm) - **RobotFramework:** [shellderp/sublime-robot-plugin](https://github.com/shellderp/sublime-robot-plugin) @@ -251,14 +300,18 @@ If you've encountered an error with highlighting, please report it to the approp - **Smalltalk:** [tomas-stefano/smalltalk-tmbundle](https://github.com/tomas-stefano/smalltalk-tmbundle) - **Smarty:** [textmate/php-smarty.tmbundle](https://github.com/textmate/php-smarty.tmbundle) - **SMT:** [SRI-CSL/SMT.tmbundle](https://github.com/SRI-CSL/SMT.tmbundle) +- **SourcePawn:** [austinwagner/sublime-sourcepawn](https://github.com/austinwagner/sublime-sourcepawn) - **SPARQL:** [peta/turtle.tmbundle](https://github.com/peta/turtle.tmbundle) - **SQF:** [JonBons/Sublime-SQF-Language](https://github.com/JonBons/Sublime-SQF-Language) - **SQL:** [textmate/sql.tmbundle](https://github.com/textmate/sql.tmbundle) - **SQLPL:** [textmate/sql.tmbundle](https://github.com/textmate/sql.tmbundle) - **Squirrel:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) - **SRecode Template:** [textmate/lisp.tmbundle](https://github.com/textmate/lisp.tmbundle) +- **Stan:** [jrnold/atom-language-stan](https://github.com/jrnold/atom-language-stan) - **Standard ML:** [textmate/standard-ml.tmbundle](https://github.com/textmate/standard-ml.tmbundle) +- **Stata:** [pschumm/Stata.tmbundle](https://github.com/pschumm/Stata.tmbundle) - **STON:** [tomas-stefano/smalltalk-tmbundle](https://github.com/tomas-stefano/smalltalk-tmbundle) +- **Stylus:** [billymoon/Stylus](https://github.com/billymoon/Stylus) - **SubRip Text:** [314eter/atom-language-srt](https://github.com/314eter/atom-language-srt) - **SuperCollider:** [supercollider/language-supercollider](https://github.com/supercollider/language-supercollider) - **SVG:** [textmate/xml.tmbundle](https://github.com/textmate/xml.tmbundle) @@ -275,6 +328,8 @@ If you've encountered an error with highlighting, please report it to the approp - **Turing:** [Alhadis/language-turing](https://github.com/Alhadis/language-turing) - **Turtle:** [peta/turtle.tmbundle](https://github.com/peta/turtle.tmbundle) - **Twig:** [Anomareh/PHP-Twig.tmbundle](https://github.com/Anomareh/PHP-Twig.tmbundle) +- **TXL:** [MikeHoffert/Sublime-Text-TXL-syntax](https://github.com/MikeHoffert/Sublime-Text-TXL-syntax) +- **TypeScript:** [Microsoft/TypeScript-Sublime-Plugin](https://github.com/Microsoft/TypeScript-Sublime-Plugin) - **Unified Parallel C:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) - **Unity3D Asset:** [atom/language-yaml](https://github.com/atom/language-yaml) - **Uno:** [atom/language-csharp](https://github.com/atom/language-csharp) @@ -296,12 +351,15 @@ If you've encountered an error with highlighting, please report it to the approp - **World of Warcraft Addon Data:** [nebularg/language-toc-wow](https://github.com/nebularg/language-toc-wow) - **X10:** [x10-lang/x10-highlighting](https://github.com/x10-lang/x10-highlighting) - **xBase:** [hernad/atom-language-harbour](https://github.com/hernad/atom-language-harbour) +- **XC:** [graymalkin/xc.tmbundle](https://github.com/graymalkin/xc.tmbundle) - **XML:** [textmate/xml.tmbundle](https://github.com/textmate/xml.tmbundle) - **Xojo:** [angryant0007/VBDotNetSyntax](https://github.com/angryant0007/VBDotNetSyntax) - **XProc:** [textmate/xml.tmbundle](https://github.com/textmate/xml.tmbundle) +- **XQuery:** [wcandillon/language-jsoniq](http://github.com/wcandillon/language-jsoniq) - **XS:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) - **XSLT:** [textmate/xml.tmbundle](https://github.com/textmate/xml.tmbundle) - **Xtend:** [staltz/SublimeXtend](https://github.com/staltz/SublimeXtend) - **Yacc:** [textmate/bison.tmbundle](https://github.com/textmate/bison.tmbundle) - **YAML:** [atom/language-yaml](https://github.com/atom/language-yaml) +- **YANG:** [DzonyKalafut/language-yang](https://github.com/DzonyKalafut/language-yang) - **Zephir:** [vmg/zephir-sublime](https://github.com/vmg/zephir-sublime) From 22d4865c52aae3e625836e1f06e08d4741644517 Mon Sep 17 00:00:00 2001 From: Alhadis Date: Sun, 11 Sep 2016 00:51:03 +1000 Subject: [PATCH 0053/1214] Revise patterns for Vim modeline detection The current expressions fail to match certain permutations of options: vim: noexpandtab: ft=javascript: vim: titlestring=foo\ ft=notperl ft=javascript: Version-specific modelines are also unaccounted for: vim600: set foldmethod=marker ft=javascript: # >= Vim 6.0 vim<600: set ft=javascript: # < Vim 6.0 See http://vimdoc.sourceforge.net/htmldoc/options.html#modeline --- lib/linguist/strategy/modeline.rb | 67 ++++++++++++++++++++++---- test/fixtures/Data/Modelines/iamjs.pl | 3 ++ test/fixtures/Data/Modelines/iamjs2.pl | 4 ++ test/test_modelines.rb | 4 ++ 4 files changed, 69 insertions(+), 9 deletions(-) create mode 100644 test/fixtures/Data/Modelines/iamjs.pl create mode 100644 test/fixtures/Data/Modelines/iamjs2.pl diff --git a/lib/linguist/strategy/modeline.rb b/lib/linguist/strategy/modeline.rb index 4e16a03cea..d9ddf9c31c 100644 --- a/lib/linguist/strategy/modeline.rb +++ b/lib/linguist/strategy/modeline.rb @@ -2,18 +2,67 @@ module Linguist module Strategy class Modeline EMACS_MODELINE = /-\*-\s*(?:(?!mode)[\w-]+\s*:\s*(?:[\w+-]+)\s*;?\s*)*(?:mode\s*:)?\s*([\w+-]+)\s*(?:;\s*(?!mode)[\w-]+\s*:\s*[\w+-]+\s*)*;?\s*-\*-/i + VIM_MODELINE = / - # First form vim modeline - # [text]{white}{vi:|vim:|ex:}[white]{options} - # ex: 'vim: syntax=ruby' - VIM_MODELINE_1 = /(?:vim|vi|ex):\s*(?:ft|filetype|syntax)=(\w+)\s?/i + # Start modeline. Could be `vim:`, `vi:` or `ex:` + (?: + (?:\s|^) + vi + (?:m[<=>]?\d+|m)? # Version-specific modeline + | + (?!^)\s + ex + ) - # Second form vim modeline (compatible with some versions of Vi) - # [text]{white}{vi:|vim:|Vim:|ex:}[white]se[t] {options}:[text] - # ex: 'vim set syntax=ruby:' - VIM_MODELINE_2 = /(?:vim|vi|Vim|ex):\s*se(?:t)?.*\s(?:ft|filetype|syntax)=(\w+)\s?.*:/i + # If the option-list begins with `set ` or `se `, it indicates an alternative + # modeline syntax partly-compatible with older versions of Vi. Here, the colon + # serves as a terminator for an option sequence, delimited by whitespace. + (?= + # So we have to ensure the modeline ends with a colon + : (?=\s* set? \s [^\n:]+ :) | - MODELINES = [EMACS_MODELINE, VIM_MODELINE_1, VIM_MODELINE_2] + # Otherwise, it isn't valid syntax and should be ignored + : (?!\s* set? \s) + ) + + # Possible (unrelated) `option=value` pairs to skip past + (?: + # Option separator. Vim uses whitespace or colons to separate options (except if + # the alternate "vim: set " form is used, where only whitespace is used) + (?: + \s + | + \s* : \s* # Note that whitespace around colons is accepted too: + ) # vim: noai : ft=ruby:noexpandtab + + # Option's name. All recognised Vim options have an alphanumeric form. + \w* + + # Possible value. Not every option takes an argument. + (?: + # Whitespace between name and value is allowed: `vim: ft =ruby` + \s*= + + # Option's value. Might be blank; `vim: ft= ` says "use no filetype". + (?: + [^\\\s] # Beware of escaped characters: titlestring=\ ft=ruby + | # will be read by Vim as { titlestring: " ft=ruby" }. + \\. + )* + )? + )* + + # The actual filetype declaration + [\s:] (?:filetype|ft|syntax) \s*= + + # Language's name + (\w+) + + # Ensure it's followed by a legal separator + (?=\s|:|$) + /xi + + MODELINES = [EMACS_MODELINE, VIM_MODELINE] # Scope of the search for modelines # Number of lines to check at the beginning and at the end of the file diff --git a/test/fixtures/Data/Modelines/iamjs.pl b/test/fixtures/Data/Modelines/iamjs.pl new file mode 100644 index 0000000000..b5d8f236f3 --- /dev/null +++ b/test/fixtures/Data/Modelines/iamjs.pl @@ -0,0 +1,3 @@ +# vim: noexpandtab: ft=javascript + +"It's JavaScript, baby"; diff --git a/test/fixtures/Data/Modelines/iamjs2.pl b/test/fixtures/Data/Modelines/iamjs2.pl new file mode 100644 index 0000000000..623b827ac2 --- /dev/null +++ b/test/fixtures/Data/Modelines/iamjs2.pl @@ -0,0 +1,4 @@ +# vim:noexpandtab titlestring=hi\|there\\\ ft=perl ts=4 +# vim:noexpandtab titlestring=hi|there\\ ft=javascript ts=4 + +"Still JavaScript, bruh"; diff --git a/test/test_modelines.rb b/test/test_modelines.rb index 192da9d438..b2eba82afe 100644 --- a/test/test_modelines.rb +++ b/test/test_modelines.rb @@ -30,6 +30,8 @@ def test_modeline_strategy assert_modeline Language["Text"], fixture_blob("Data/Modelines/fundamentalEmacs.c") assert_modeline Language["Prolog"], fixture_blob("Data/Modelines/not_perl.pl") assert_modeline Language["Smalltalk"], fixture_blob("Data/Modelines/example_smalltalk.md") + assert_modeline Language["JavaScript"], fixture_blob("Data/Modelines/iamjs.pl") + assert_modeline Language["JavaScript"], fixture_blob("Data/Modelines/iamjs2.pl") assert_modeline Language["PHP"], fixture_blob("Data/Modelines/iamphp.inc") assert_modeline nil, sample_blob("C/main.c") end @@ -51,6 +53,8 @@ def test_modeline_languages assert_equal Language["Text"], fixture_blob("Data/Modelines/fundamentalEmacs.c").language assert_equal Language["Prolog"], fixture_blob("Data/Modelines/not_perl.pl").language assert_equal Language["Smalltalk"], fixture_blob("Data/Modelines/example_smalltalk.md").language + assert_equal Language["JavaScript"], fixture_blob("Data/Modelines/iamjs.pl").language + assert_equal Language["JavaScript"], fixture_blob("Data/Modelines/iamjs2.pl").language assert_equal Language["PHP"], fixture_blob("Data/Modelines/iamphp.inc").language end end From 5e4e38b39a8441a57da5a7f36627e3583609b000 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Sun, 11 Sep 2016 16:46:40 +0200 Subject: [PATCH 0054/1214] Lock language-babel grammar to v2.22.0 Use our own fork to make sure we don't update it by mistake --- .gitmodules | 6 +++--- vendor/grammars/language-babel | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitmodules b/.gitmodules index ea5847d731..a8d265fc27 100644 --- a/.gitmodules +++ b/.gitmodules @@ -602,9 +602,6 @@ [submodule "vendor/grammars/X10"] path = vendor/grammars/X10 url = https://github.com/x10-lang/x10-highlighting -[submodule "vendor/grammars/language-babel"] - path = vendor/grammars/language-babel - url = https://github.com/gandm/language-babel [submodule "vendor/grammars/UrWeb-Language-Definition"] path = vendor/grammars/UrWeb-Language-Definition url = https://github.com/gwalborn/UrWeb-Language-Definition.git @@ -788,3 +785,6 @@ url = https://github.com/austinwagner/sublime-sourcepawn [submodule "vendor/grammars/language-emacs-lisp"] path = vendor/grammars/language-emacs-lisp url = https://github.com/Alhadis/language-emacs-lisp +[submodule "vendor/grammars/language-babel"] + path = vendor/grammars/language-babel + url = https://github.com/github-linguist/language-babel diff --git a/vendor/grammars/language-babel b/vendor/grammars/language-babel index c9d6dbf463..656d5d3b42 160000 --- a/vendor/grammars/language-babel +++ b/vendor/grammars/language-babel @@ -1 +1 @@ -Subproject commit c9d6dbf4637c0c703aa9ada87afdca5a9cfb3e30 +Subproject commit 656d5d3b42e317f28c7fce248709abda6fc70b95 From e6c849d92cb538183b2db6541004c16ad2617e28 Mon Sep 17 00:00:00 2001 From: Alhadis Date: Mon, 12 Sep 2016 02:08:52 +1000 Subject: [PATCH 0055/1214] Document --verbose option in usage message --- script/add-grammar | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/add-grammar b/script/add-grammar index 779dd62b07..e72fe89bdf 100755 --- a/script/add-grammar +++ b/script/add-grammar @@ -44,7 +44,7 @@ end usage = """Usage: - #{$0} [--replace grammar] url + #{$0} [-v|--verbose] [--replace grammar] url Examples: #{$0} https://github.com/Alhadis/language-roff #{$0} --replace sublime-apl https://github.com/Alhadis/language-apl From b61fe90d120d24b2ec138729fc860703373f16ff Mon Sep 17 00:00:00 2001 From: Alhadis Date: Mon, 12 Sep 2016 02:17:10 +1000 Subject: [PATCH 0056/1214] Terminate script if submodule registration failed --- script/add-grammar | 1 + 1 file changed, 1 insertion(+) diff --git a/script/add-grammar b/script/add-grammar index e72fe89bdf..25c121765d 100755 --- a/script/add-grammar +++ b/script/add-grammar @@ -86,6 +86,7 @@ end log "Registering new submodule: #{repo_new}" `git submodule add -f #{https} #{repo_new}` +exit 1 if $?.exitstatus > 0 `script/convert-grammars --add #{repo_new}` log "Confirming license" From 6e40de47da9e774b7de722cf2dacf2d74f40595b Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 11 Sep 2016 22:05:40 -0700 Subject: [PATCH 0057/1214] Grammar update --- vendor/grammars/Docker.tmbundle | 2 +- vendor/grammars/NSIS | 2 +- vendor/grammars/c.tmbundle | 2 +- vendor/grammars/d.tmbundle | 2 +- vendor/grammars/diff.tmbundle | 2 +- vendor/grammars/html.tmbundle | 2 +- vendor/grammars/jade-tmbundle | 2 +- vendor/grammars/language-clojure | 2 +- vendor/grammars/language-graphql | 2 +- vendor/grammars/language-javascript | 2 +- vendor/grammars/language-python | 2 +- vendor/grammars/language-roff | 2 +- vendor/grammars/latex.tmbundle | 2 +- vendor/grammars/objective-c.tmbundle | 2 +- vendor/grammars/pawn-sublime-language | 2 +- vendor/grammars/r.tmbundle | 2 +- vendor/grammars/sublime-typescript | 2 +- vendor/grammars/vue-syntax-highlight | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/vendor/grammars/Docker.tmbundle b/vendor/grammars/Docker.tmbundle index 08585643c0..2d7d56af17 160000 --- a/vendor/grammars/Docker.tmbundle +++ b/vendor/grammars/Docker.tmbundle @@ -1 +1 @@ -Subproject commit 08585643c0b84eb6f76ef56fbba7183185e65548 +Subproject commit 2d7d56af17fdf425fdebb34019b8cbd71110250a diff --git a/vendor/grammars/NSIS b/vendor/grammars/NSIS index b9be931f41..171bb32ae1 160000 --- a/vendor/grammars/NSIS +++ b/vendor/grammars/NSIS @@ -1 +1 @@ -Subproject commit b9be931f41ac6039208494f8e98fd53a2394e517 +Subproject commit 171bb32ae1bade20f933675b046a101f26970123 diff --git a/vendor/grammars/c.tmbundle b/vendor/grammars/c.tmbundle index fa4b7e2114..88cc9b71fa 160000 --- a/vendor/grammars/c.tmbundle +++ b/vendor/grammars/c.tmbundle @@ -1 +1 @@ -Subproject commit fa4b7e211463973328b5334d55d0b10dafa27122 +Subproject commit 88cc9b71faf9f1406c5a6a5b08741e6242c15e06 diff --git a/vendor/grammars/d.tmbundle b/vendor/grammars/d.tmbundle index 8763c4c5f2..080e5343d8 160000 --- a/vendor/grammars/d.tmbundle +++ b/vendor/grammars/d.tmbundle @@ -1 +1 @@ -Subproject commit 8763c4c5f2169d48d725d946838428f50abe12a5 +Subproject commit 080e5343d8979d2b9c0502e80ac82d906bb7996f diff --git a/vendor/grammars/diff.tmbundle b/vendor/grammars/diff.tmbundle index 62de2cca5c..372abaaeb1 160000 --- a/vendor/grammars/diff.tmbundle +++ b/vendor/grammars/diff.tmbundle @@ -1 +1 @@ -Subproject commit 62de2cca5cc5cfb77308fdc94d963f35e2d808d1 +Subproject commit 372abaaeb12620db3f9d5d984c4ee8c3c6224117 diff --git a/vendor/grammars/html.tmbundle b/vendor/grammars/html.tmbundle index 2e9e024a1b..9f812c89f4 160000 --- a/vendor/grammars/html.tmbundle +++ b/vendor/grammars/html.tmbundle @@ -1 +1 @@ -Subproject commit 2e9e024a1b20c8bf8e68ba241359b4bbdb1045e1 +Subproject commit 9f812c89f4990a98391701caa77824c94860538f diff --git a/vendor/grammars/jade-tmbundle b/vendor/grammars/jade-tmbundle index 7c1304aa5a..f311a516bb 160000 --- a/vendor/grammars/jade-tmbundle +++ b/vendor/grammars/jade-tmbundle @@ -1 +1 @@ -Subproject commit 7c1304aa5a0d916a93fd296d3dd994219ecdc90f +Subproject commit f311a516bb29296fcebfdc7da8149b1c79dfb0a1 diff --git a/vendor/grammars/language-clojure b/vendor/grammars/language-clojure index bc86668c40..51484ae2f7 160000 --- a/vendor/grammars/language-clojure +++ b/vendor/grammars/language-clojure @@ -1 +1 @@ -Subproject commit bc86668c40817aefbba2164032fcd24c2438b576 +Subproject commit 51484ae2f76b59fe0ea4688a1b27d127d392bd07 diff --git a/vendor/grammars/language-graphql b/vendor/grammars/language-graphql index d88cbb73e2..4be0d1ae7b 160000 --- a/vendor/grammars/language-graphql +++ b/vendor/grammars/language-graphql @@ -1 +1 @@ -Subproject commit d88cbb73e2e90f290911cf707550e2c0011140f9 +Subproject commit 4be0d1ae7b847182d4a743f43f44416d7f7d6423 diff --git a/vendor/grammars/language-javascript b/vendor/grammars/language-javascript index e7b00e4d15..c30e13f94a 160000 --- a/vendor/grammars/language-javascript +++ b/vendor/grammars/language-javascript @@ -1 +1 @@ -Subproject commit e7b00e4d15f1d11842ca9f5d61fdc02d4719bf6b +Subproject commit c30e13f94a3e5d725afb0acc70e05774a6c0026b diff --git a/vendor/grammars/language-python b/vendor/grammars/language-python index bc20450849..719e4404d2 160000 --- a/vendor/grammars/language-python +++ b/vendor/grammars/language-python @@ -1 +1 @@ -Subproject commit bc204508498b1695a4448bd2cf9a3d31c1cdaf5e +Subproject commit 719e4404d2cd25a888a8111c62abd31a22a15ef3 diff --git a/vendor/grammars/language-roff b/vendor/grammars/language-roff index bef4485150..f37fb6b7c4 160000 --- a/vendor/grammars/language-roff +++ b/vendor/grammars/language-roff @@ -1 +1 @@ -Subproject commit bef448515021f7112d42403c0a3d5814a13b193f +Subproject commit f37fb6b7c45837de47cdb0bcb9e7a5a257b1ea24 diff --git a/vendor/grammars/latex.tmbundle b/vendor/grammars/latex.tmbundle index cb0c75906c..b973d17a03 160000 --- a/vendor/grammars/latex.tmbundle +++ b/vendor/grammars/latex.tmbundle @@ -1 +1 @@ -Subproject commit cb0c75906cdead220f45acc27225245dd966ef55 +Subproject commit b973d17a03744d8184689c37d5b9be1511bb3b21 diff --git a/vendor/grammars/objective-c.tmbundle b/vendor/grammars/objective-c.tmbundle index 583d31f673..d80c2bbdef 160000 --- a/vendor/grammars/objective-c.tmbundle +++ b/vendor/grammars/objective-c.tmbundle @@ -1 +1 @@ -Subproject commit 583d31f6734589a6ea1e2da1be9da57cf25a63f9 +Subproject commit d80c2bbdef8433b3d2cf0af660ea460d97009735 diff --git a/vendor/grammars/pawn-sublime-language b/vendor/grammars/pawn-sublime-language index 1916b03ba0..2940b429a6 160000 --- a/vendor/grammars/pawn-sublime-language +++ b/vendor/grammars/pawn-sublime-language @@ -1 +1 @@ -Subproject commit 1916b03ba0f61f488637310c7608b3244fc80c0e +Subproject commit 2940b429a66f300ccf07020e63a799afab6522bd diff --git a/vendor/grammars/r.tmbundle b/vendor/grammars/r.tmbundle index 44691a0773..d005a0f105 160000 --- a/vendor/grammars/r.tmbundle +++ b/vendor/grammars/r.tmbundle @@ -1 +1 @@ -Subproject commit 44691a07734715b11a130a4af409508f53f83aa1 +Subproject commit d005a0f1055020757b797e4959d1b43ece3708aa diff --git a/vendor/grammars/sublime-typescript b/vendor/grammars/sublime-typescript index 27529a651f..cfe1d98238 160000 --- a/vendor/grammars/sublime-typescript +++ b/vendor/grammars/sublime-typescript @@ -1 +1 @@ -Subproject commit 27529a651f1aea441c3a8c809b0858d0900d82aa +Subproject commit cfe1d982384e2434bfea0cc5159387d942f8f2e6 diff --git a/vendor/grammars/vue-syntax-highlight b/vendor/grammars/vue-syntax-highlight index 8e729750bc..909afa5384 160000 --- a/vendor/grammars/vue-syntax-highlight +++ b/vendor/grammars/vue-syntax-highlight @@ -1 +1 @@ -Subproject commit 8e729750bc181d3d05d5e74cf7cb8f8c4c19627d +Subproject commit 909afa5384d6dcd01f7d883fe2b8b6067f970a26 From fdec52c89a902c631936fa1364f70fc1b089beda Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 11 Sep 2016 22:12:38 -0700 Subject: [PATCH 0058/1214] Bumping to v4.8.10 --- lib/linguist/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/version.rb b/lib/linguist/version.rb index 8c15a584ac..0b373538a2 100644 --- a/lib/linguist/version.rb +++ b/lib/linguist/version.rb @@ -1,3 +1,3 @@ module Linguist - VERSION = "4.8.9" + VERSION = "4.8.10" end From e73a4ecd0ece2a6599625e28aace649f5fa0eba3 Mon Sep 17 00:00:00 2001 From: Alhadis Date: Mon, 12 Sep 2016 19:59:08 +1000 Subject: [PATCH 0059/1214] Allow " ex:" to match at beginning of file Although unlikely to be valid syntax in most programming languages, such a modeline is valid syntax in Vim, and will trigger any filetype modes. --- lib/linguist/strategy/modeline.rb | 2 +- test/fixtures/Data/Modelines/ruby10 | 3 +++ test/test_modelines.rb | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 test/fixtures/Data/Modelines/ruby10 diff --git a/lib/linguist/strategy/modeline.rb b/lib/linguist/strategy/modeline.rb index d9ddf9c31c..61ba723a24 100644 --- a/lib/linguist/strategy/modeline.rb +++ b/lib/linguist/strategy/modeline.rb @@ -10,7 +10,7 @@ class Modeline vi (?:m[<=>]?\d+|m)? # Version-specific modeline | - (?!^)\s + [\t\x20] # `ex:` requires whitespace, because "ex:" might be short for "example:" ex ) diff --git a/test/fixtures/Data/Modelines/ruby10 b/test/fixtures/Data/Modelines/ruby10 new file mode 100644 index 0000000000..67dd486437 --- /dev/null +++ b/test/fixtures/Data/Modelines/ruby10 @@ -0,0 +1,3 @@ + ex: noexpandtab: ft=ruby + +# Still Ruby diff --git a/test/test_modelines.rb b/test/test_modelines.rb index b2eba82afe..1437ee6a8b 100644 --- a/test/test_modelines.rb +++ b/test/test_modelines.rb @@ -17,6 +17,7 @@ def test_modeline_strategy assert_modeline Language["Ruby"], fixture_blob("Data/Modelines/ruby7") assert_modeline Language["Ruby"], fixture_blob("Data/Modelines/ruby8") assert_modeline Language["Ruby"], fixture_blob("Data/Modelines/ruby9") + assert_modeline Language["Ruby"], fixture_blob("Data/Modelines/ruby10") assert_modeline Language["C++"], fixture_blob("Data/Modelines/seeplusplus") assert_modeline Language["C++"], fixture_blob("Data/Modelines/seeplusplusEmacs1") assert_modeline Language["C++"], fixture_blob("Data/Modelines/seeplusplusEmacs2") From abf7bee4645b392a35e49c1ab4505c30fd2c4333 Mon Sep 17 00:00:00 2001 From: Alhadis Date: Mon, 12 Sep 2016 20:00:05 +1000 Subject: [PATCH 0060/1214] Include tests for version-specific Vim modelines --- test/fixtures/Data/Modelines/ruby11 | 3 +++ test/fixtures/Data/Modelines/ruby12 | 3 +++ test/test_modelines.rb | 2 ++ 3 files changed, 8 insertions(+) create mode 100644 test/fixtures/Data/Modelines/ruby11 create mode 100644 test/fixtures/Data/Modelines/ruby12 diff --git a/test/fixtures/Data/Modelines/ruby11 b/test/fixtures/Data/Modelines/ruby11 new file mode 100644 index 0000000000..3d167468ab --- /dev/null +++ b/test/fixtures/Data/Modelines/ruby11 @@ -0,0 +1,3 @@ +# vim600: ft=ruby + +# Targets Vim 6.0 or later diff --git a/test/fixtures/Data/Modelines/ruby12 b/test/fixtures/Data/Modelines/ruby12 new file mode 100644 index 0000000000..a7ef89a948 --- /dev/null +++ b/test/fixtures/Data/Modelines/ruby12 @@ -0,0 +1,3 @@ +vim<520: ft=ruby + +# Targets Vim 5.20 and earlier diff --git a/test/test_modelines.rb b/test/test_modelines.rb index 1437ee6a8b..16a68a1742 100644 --- a/test/test_modelines.rb +++ b/test/test_modelines.rb @@ -18,6 +18,8 @@ def test_modeline_strategy assert_modeline Language["Ruby"], fixture_blob("Data/Modelines/ruby8") assert_modeline Language["Ruby"], fixture_blob("Data/Modelines/ruby9") assert_modeline Language["Ruby"], fixture_blob("Data/Modelines/ruby10") + assert_modeline Language["Ruby"], fixture_blob("Data/Modelines/ruby11") + assert_modeline Language["Ruby"], fixture_blob("Data/Modelines/ruby12") assert_modeline Language["C++"], fixture_blob("Data/Modelines/seeplusplus") assert_modeline Language["C++"], fixture_blob("Data/Modelines/seeplusplusEmacs1") assert_modeline Language["C++"], fixture_blob("Data/Modelines/seeplusplusEmacs2") From e0d890240bb5bc6ded6280cee5c506791145926a Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 12 Sep 2016 21:35:10 -0700 Subject: [PATCH 0061/1214] Adding basic script for adding language_id fields to languages.yml --- CONTRIBUTING.md | 3 +- lib/linguist/languages.yml | 3001 ++++++++++++++++++------------------ script/set-language-ids | 82 + 3 files changed, 1584 insertions(+), 1502 deletions(-) create mode 100755 script/set-language-ids diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ec00ae149a..eb7532e044 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,6 +33,7 @@ To add support for a new language: 0. Add your grammar to [`grammars.yml`][grammars] by running `script/convert-grammars --add vendor/grammars/MyGrammar`. 0. Download the license for the grammar: `script/licensed`. Be careful to only commit the file for the new grammar, as this script may update licenses for other grammars as well. 0. Add samples for your language to the [samples directory][samples] in the correct subdirectory. +0. Add a `language_id` for your language. See `script/set-language-ids` for more information. **You should only ever need to run `script/set-language-ids --update`. Anything other than this risks breaking GitHub search :cry:** 0. Open a pull request, linking to a [GitHub search result](https://github.com/search?utf8=%E2%9C%93&q=extension%3Aboot+NOT+nothack&type=Code&ref=searchresults) showing in-the-wild usage. In addition, if your new language defines an extension that's already listed in [`languages.yml`][languages] (such as `.foo`) then sometimes a few more steps will need to be taken: @@ -84,7 +85,7 @@ Linguist is maintained with :heart: by: - @arfon (GitHub Staff) - @larsbrinkhoff - @pchaigno - + As Linguist is a production dependency for GitHub we have a couple of workflow restrictions: - Anyone with commit rights can merge Pull Requests provided that there is a :+1: from a GitHub member of staff diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 16ceb6bc02..861a7efa6b 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -14,6 +14,9 @@ # searchable - Boolean flag to enable searching (defaults to true) # search_term - Deprecated: Some languages may be indexed under a # different alias. Avoid defining new exceptions. +# language_id - Integer used as a language-name-independent indexed field so that we can rename +# languages in Linguist without reindexing all the code on GitHub. Must not be +# changed for existing languages without the explicit permission of GitHub staff. # color - CSS hex color to represent the language. # tm_scope - The TextMate scope that represents this programming # language. This should match one of the scopes listed in @@ -27,79 +30,80 @@ # # Please keep this list alphabetized. Capitalization comes before lowercase. +--- 1C Enterprise: type: programming color: "#814CCC" extensions: - - .bsl - - .os + - ".bsl" + - ".os" tm_scope: source.bsl ace_mode: text - + language_id: 0 ABAP: type: programming color: "#E8274B" extensions: - - .abap + - ".abap" ace_mode: abap - + language_id: 1 AGS Script: type: programming color: "#B9D9FF" aliases: - ags extensions: - - .asc - - .ash + - ".asc" + - ".ash" tm_scope: source.c++ ace_mode: c_cpp - + language_id: 2 AMPL: type: programming color: "#E6EFBB" extensions: - - .ampl - - .mod + - ".ampl" + - ".mod" tm_scope: source.ampl ace_mode: text - + language_id: 3 ANTLR: type: programming color: "#9DC3FF" extensions: - - .g4 + - ".g4" ace_mode: text - + language_id: 4 API Blueprint: type: markup color: "#2ACCA8" ace_mode: markdown extensions: - - .apib + - ".apib" tm_scope: text.html.markdown.source.gfm.apib - + language_id: 5 APL: type: programming color: "#5A8164" extensions: - - .apl - - .dyalog + - ".apl" + - ".dyalog" interpreters: - apl - aplx - dyalog tm_scope: source.apl ace_mode: text - + language_id: 6 ASN.1: type: data color: "#aeead0" extensions: - - .asn - - .asn1 + - ".asn" + - ".asn1" tm_scope: source.asn ace_mode: text - + language_id: 7 ASP: type: programming color: "#6a40fd" @@ -109,27 +113,27 @@ ASP: - aspx - aspx-vb extensions: - - .asp - - .asax - - .ascx - - .ashx - - .asmx - - .aspx - - .axd + - ".asp" + - ".asax" + - ".ascx" + - ".ashx" + - ".asmx" + - ".aspx" + - ".axd" ace_mode: text - + language_id: 8 ATS: type: programming color: "#1ac620" aliases: - ats2 extensions: - - .dats - - .hats - - .sats + - ".dats" + - ".hats" + - ".sats" tm_scope: source.ats ace_mode: ocaml - + language_id: 9 ActionScript: type: programming tm_scope: source.actionscript.3 @@ -140,35 +144,35 @@ ActionScript: - actionscript3 - as3 extensions: - - .as + - ".as" ace_mode: actionscript - + language_id: 10 Ada: type: programming color: "#02f88c" extensions: - - .adb - - .ada - - .ads + - ".adb" + - ".ada" + - ".ads" aliases: - ada95 - ada2005 ace_mode: ada - + language_id: 11 Agda: type: programming color: "#315665" extensions: - - .agda + - ".agda" ace_mode: text - + language_id: 12 Alloy: - type: programming # 'modeling' would be more appropiate + type: programming color: "#64C800" extensions: - - .als + - ".als" ace_mode: text - + language_id: 13 Alpine Abuild: type: programming group: Shell @@ -179,7 +183,7 @@ Alpine Abuild: - APKBUILD tm_scope: source.shell ace_mode: sh - + language_id: 14 Ant Build System: type: data tm_scope: text.xml.ant @@ -187,80 +191,80 @@ Ant Build System: - ant.xml - build.xml ace_mode: xml - + language_id: 15 ApacheConf: type: markup aliases: - aconf - apache extensions: - - .apacheconf - - .vhost + - ".apacheconf" + - ".vhost" tm_scope: source.apache-config ace_mode: apache_conf - + language_id: 16 Apex: type: programming extensions: - - .cls + - ".cls" tm_scope: source.java ace_mode: java - + language_id: 17 Apollo Guidance Computer: type: programming color: "#0B3D91" group: Assembly extensions: - - .agc + - ".agc" tm_scope: source.agc ace_mode: assembly_x86 - + language_id: 18 AppleScript: type: programming aliases: - osascript extensions: - - .applescript - - .scpt + - ".applescript" + - ".scpt" interpreters: - osascript ace_mode: applescript color: "#101F1F" - + language_id: 19 Arc: type: programming color: "#aa2afe" extensions: - - .arc + - ".arc" tm_scope: none ace_mode: text - + language_id: 20 Arduino: type: programming color: "#bd79d1" extensions: - - .ino + - ".ino" tm_scope: source.c++ ace_mode: c_cpp - + language_id: 21 AsciiDoc: type: prose ace_mode: asciidoc wrap: true extensions: - - .asciidoc - - .adoc - - .asc + - ".asciidoc" + - ".adoc" + - ".asc" tm_scope: text.html.asciidoc - + language_id: 22 AspectJ: type: programming color: "#a957b0" extensions: - - .aj + - ".aj" tm_scope: source.aspectj ace_mode: text - + language_id: 23 Assembly: type: programming color: "#6E4C13" @@ -268,31 +272,31 @@ Assembly: aliases: - nasm extensions: - - .asm - - .a51 - - .inc - - .nasm + - ".asm" + - ".a51" + - ".inc" + - ".nasm" tm_scope: source.assembly ace_mode: assembly_x86 - + language_id: 24 Augeas: type: programming extensions: - - .aug + - ".aug" tm_scope: none ace_mode: text - + language_id: 25 AutoHotkey: type: programming color: "#6594b9" aliases: - ahk extensions: - - .ahk - - .ahkl + - ".ahk" + - ".ahkl" tm_scope: source.ahk ace_mode: autohotkey - + language_id: 26 AutoIt: type: programming color: "#1C3552" @@ -301,25 +305,25 @@ AutoIt: - AutoIt3 - AutoItScript extensions: - - .au3 + - ".au3" tm_scope: source.autoit ace_mode: autohotkey - + language_id: 27 Awk: type: programming extensions: - - .awk - - .auk - - .gawk - - .mawk - - .nawk + - ".awk" + - ".auk" + - ".gawk" + - ".mawk" + - ".nawk" interpreters: - awk - gawk - mawk - nawk ace_mode: text - + language_id: 28 Batchfile: type: programming search_term: bat @@ -329,43 +333,43 @@ Batchfile: - dosbatch - winbatch extensions: - - .bat - - .cmd + - ".bat" + - ".cmd" tm_scope: source.batchfile ace_mode: batchfile color: "#C1F12E" - + language_id: 29 Befunge: type: programming extensions: - - .befunge + - ".befunge" ace_mode: text - + language_id: 30 Bison: type: programming group: Yacc tm_scope: source.bison extensions: - - .bison + - ".bison" ace_mode: text color: "#6A463F" - + language_id: 31 BitBake: type: programming tm_scope: none extensions: - - .bb + - ".bb" ace_mode: text - + language_id: 32 Blade: type: markup group: HTML extensions: - - .blade - - .blade.php + - ".blade" + - ".blade.php" tm_scope: text.html.php.blade ace_mode: text - + language_id: 33 BlitzBasic: type: programming aliases: @@ -374,70 +378,70 @@ BlitzBasic: - blitzplus - bplus extensions: - - .bb - - .decls + - ".bb" + - ".decls" tm_scope: source.blitzmax ace_mode: text - + language_id: 34 BlitzMax: type: programming color: "#cd6400" extensions: - - .bmx + - ".bmx" aliases: - bmax ace_mode: text - + language_id: 35 Bluespec: type: programming extensions: - - .bsv + - ".bsv" tm_scope: source.bsv ace_mode: verilog - + language_id: 36 Boo: type: programming color: "#d4bec1" extensions: - - .boo + - ".boo" ace_mode: text tm_scope: source.boo - + language_id: 37 Brainfuck: type: programming color: "#2F2530" extensions: - - .b - - .bf + - ".b" + - ".bf" tm_scope: source.bf ace_mode: text - + language_id: 38 Brightscript: type: programming extensions: - - .brs + - ".brs" tm_scope: source.brightscript ace_mode: text - + language_id: 39 Bro: type: programming extensions: - - .bro + - ".bro" ace_mode: text - + language_id: 40 C: type: programming color: "#555555" extensions: - - .c - - .cats - - .h - - .idc - - .w + - ".c" + - ".cats" + - ".h" + - ".idc" + - ".w" interpreters: - tcc ace_mode: c_cpp - + language_id: 41 C#: type: programming ace_mode: csharp @@ -447,11 +451,11 @@ C#: aliases: - csharp extensions: - - .cs - - .cake - - .cshtml - - .csx - + - ".cs" + - ".cake" + - ".cshtml" + - ".csx" + language_id: 42 C++: type: programming ace_mode: c_cpp @@ -460,181 +464,181 @@ C++: aliases: - cpp extensions: - - .cpp - - .c++ - - .cc - - .cp - - .cxx - - .h - - .h++ - - .hh - - .hpp - - .hxx - - .inc - - .inl - - .ipp - - .tcc - - .tpp - + - ".cpp" + - ".c++" + - ".cc" + - ".cp" + - ".cxx" + - ".h" + - ".h++" + - ".hh" + - ".hpp" + - ".hxx" + - ".inc" + - ".inl" + - ".ipp" + - ".tcc" + - ".tpp" + language_id: 43 C-ObjDump: type: data extensions: - - .c-objdump + - ".c-objdump" tm_scope: objdump.x86asm ace_mode: assembly_x86 - + language_id: 44 C2hs Haskell: type: programming group: Haskell aliases: - c2hs extensions: - - .chs + - ".chs" tm_scope: source.haskell ace_mode: haskell - + language_id: 45 CLIPS: type: programming extensions: - - .clp + - ".clp" tm_scope: source.clips ace_mode: text - + language_id: 46 CMake: type: programming extensions: - - .cmake - - .cmake.in + - ".cmake" + - ".cmake.in" filenames: - CMakeLists.txt ace_mode: text - + language_id: 47 COBOL: type: programming extensions: - - .cob - - .cbl - - .ccp - - .cobol - - .cpy + - ".cob" + - ".cbl" + - ".ccp" + - ".cobol" + - ".cpy" ace_mode: cobol - + language_id: 48 COLLADA: type: data extensions: - - .dae + - ".dae" tm_scope: text.xml ace_mode: xml - + language_id: 49 CSS: type: markup tm_scope: source.css ace_mode: css color: "#563d7c" extensions: - - .css - + - ".css" + language_id: 50 CSV: type: data ace_mode: text tm_scope: none extensions: - - .csv - + - ".csv" + language_id: 51 Cap'n Proto: type: programming tm_scope: source.capnp extensions: - - .capnp + - ".capnp" ace_mode: text - + language_id: 52 CartoCSS: type: programming aliases: - Carto extensions: - - .mss + - ".mss" ace_mode: text tm_scope: source.css.mss - + language_id: 53 Ceylon: type: programming extensions: - - .ceylon + - ".ceylon" ace_mode: text - + language_id: 54 Chapel: type: programming color: "#8dc63f" aliases: - chpl extensions: - - .chpl + - ".chpl" ace_mode: text - + language_id: 55 Charity: type: programming extensions: - - .ch + - ".ch" tm_scope: none ace_mode: text - + language_id: 56 ChucK: type: programming extensions: - - .ck + - ".ck" tm_scope: source.java ace_mode: java - + language_id: 57 Cirru: type: programming color: "#ccccff" ace_mode: cirru extensions: - - .cirru - + - ".cirru" + language_id: 58 Clarion: type: programming color: "#db901e" ace_mode: text extensions: - - .clw + - ".clw" tm_scope: source.clarion - + language_id: 59 Clean: type: programming color: "#3F85AF" extensions: - - .icl - - .dcl + - ".icl" + - ".dcl" tm_scope: source.clean ace_mode: text - + language_id: 60 Click: type: programming color: "#E4E6F3" extensions: - - .click + - ".click" tm_scope: source.click ace_mode: text - + language_id: 61 Clojure: type: programming ace_mode: clojure color: "#db5855" extensions: - - .clj - - .boot - - .cl2 - - .cljc - - .cljs - - .cljs.hl - - .cljscm - - .cljx - - .hic + - ".clj" + - ".boot" + - ".cl2" + - ".cljc" + - ".cljs" + - ".cljs.hl" + - ".cljscm" + - ".cljx" + - ".hic" filenames: - riemann.config - + language_id: 62 CoffeeScript: type: programming tm_scope: source.coffee @@ -644,17 +648,17 @@ CoffeeScript: - coffee - coffee-script extensions: - - .coffee - - ._coffee - - .cake - - .cjsx - - .cson - - .iced + - ".coffee" + - "._coffee" + - ".cake" + - ".cjsx" + - ".cson" + - ".iced" filenames: - Cakefile interpreters: - coffee - + language_id: 63 ColdFusion: type: programming group: ColdFusion @@ -666,10 +670,10 @@ ColdFusion: - cfml - coldfusion html extensions: - - .cfm - - .cfml + - ".cfm" + - ".cfml" tm_scope: text.html.cfm - + language_id: 64 ColdFusion CFC: type: programming group: ColdFusion @@ -679,9 +683,9 @@ ColdFusion CFC: aliases: - cfc extensions: - - .cfc + - ".cfc" tm_scope: source.cfscript - + language_id: 65 Common Lisp: type: programming tm_scope: source.lisp @@ -689,14 +693,14 @@ Common Lisp: aliases: - lisp extensions: - - .lisp - - .asd - - .cl - - .l - - .lsp - - .ny - - .podsl - - .sexp + - ".lisp" + - ".asd" + - ".cl" + - ".l" + - ".lsp" + - ".ny" + - ".podsl" + - ".sexp" interpreters: - lisp - sbcl @@ -704,327 +708,327 @@ Common Lisp: - clisp - ecl ace_mode: lisp - + language_id: 66 Component Pascal: type: programming color: "#B0CE4E" extensions: - - .cp - - .cps + - ".cp" + - ".cps" tm_scope: source.pascal aliases: - delphi - objectpascal ace_mode: pascal - + language_id: 67 Cool: type: programming extensions: - - .cl + - ".cl" tm_scope: source.cool ace_mode: text - + language_id: 68 Coq: type: programming extensions: - - .coq - - .v + - ".coq" + - ".v" ace_mode: text - + language_id: 69 Cpp-ObjDump: type: data extensions: - - .cppobjdump - - .c++-objdump - - .c++objdump - - .cpp-objdump - - .cxx-objdump + - ".cppobjdump" + - ".c++-objdump" + - ".c++objdump" + - ".cpp-objdump" + - ".cxx-objdump" tm_scope: objdump.x86asm aliases: - c++-objdump ace_mode: assembly_x86 - + language_id: 70 Creole: type: prose wrap: true extensions: - - .creole + - ".creole" tm_scope: text.html.creole ace_mode: text - + language_id: 71 Crystal: type: programming color: "#776791" extensions: - - .cr + - ".cr" ace_mode: ruby tm_scope: source.crystal interpreters: - crystal - + language_id: 72 Csound: type: programming aliases: - csound-orc extensions: - - .orc - - .udo + - ".orc" + - ".udo" tm_scope: source.csound ace_mode: text - + language_id: 73 Csound Document: type: programming aliases: - csound-csd extensions: - - .csd + - ".csd" tm_scope: source.csound-document ace_mode: text - + language_id: 74 Csound Score: type: programming aliases: - csound-sco extensions: - - .sco + - ".sco" tm_scope: source.csound-score ace_mode: text - + language_id: 75 Cucumber: type: programming extensions: - - .feature + - ".feature" tm_scope: text.gherkin.feature aliases: - gherkin ace_mode: text color: "#5B2063" - + language_id: 76 Cuda: type: programming extensions: - - .cu - - .cuh + - ".cu" + - ".cuh" tm_scope: source.cuda-c++ ace_mode: c_cpp color: "#3A4E3A" - + language_id: 77 Cycript: type: programming extensions: - - .cy + - ".cy" tm_scope: source.js ace_mode: javascript - + language_id: 78 Cython: type: programming group: Python extensions: - - .pyx - - .pxd - - .pxi + - ".pyx" + - ".pxd" + - ".pxi" aliases: - pyrex ace_mode: text - + language_id: 79 D: type: programming color: "#ba595e" extensions: - - .d - - .di + - ".d" + - ".di" ace_mode: d - + language_id: 80 D-ObjDump: type: data extensions: - - .d-objdump + - ".d-objdump" tm_scope: objdump.x86asm ace_mode: assembly_x86 - + language_id: 81 DIGITAL Command Language: type: programming aliases: - dcl extensions: - - .com + - ".com" tm_scope: none ace_mode: text - + language_id: 82 DM: type: programming color: "#447265" extensions: - - .dm + - ".dm" aliases: - byond tm_scope: source.dm ace_mode: c_cpp - + language_id: 83 DNS Zone: type: data extensions: - - .zone - - .arpa + - ".zone" + - ".arpa" tm_scope: text.zone_file ace_mode: text - + language_id: 84 DTrace: type: programming aliases: - dtrace-script extensions: - - .d + - ".d" interpreters: - dtrace tm_scope: source.c ace_mode: c_cpp - + language_id: 85 Darcs Patch: type: data search_term: dpatch aliases: - dpatch extensions: - - .darcspatch - - .dpatch + - ".darcspatch" + - ".dpatch" tm_scope: none ace_mode: text - + language_id: 86 Dart: type: programming color: "#00B4AB" extensions: - - .dart + - ".dart" interpreters: - dart ace_mode: dart - + language_id: 87 Diff: type: data extensions: - - .diff - - .patch + - ".diff" + - ".patch" aliases: - udiff tm_scope: source.diff ace_mode: diff - + language_id: 88 Dockerfile: type: data tm_scope: source.dockerfile extensions: - - .dockerfile + - ".dockerfile" filenames: - Dockerfile ace_mode: dockerfile - + language_id: 89 Dogescript: type: programming color: "#cca760" extensions: - - .djs + - ".djs" tm_scope: none ace_mode: text - + language_id: 90 Dylan: type: programming color: "#6c616e" extensions: - - .dylan - - .dyl - - .intr - - .lid + - ".dylan" + - ".dyl" + - ".intr" + - ".lid" ace_mode: text - + language_id: 91 E: type: programming color: "#ccce35" extensions: - - .E + - ".E" interpreters: - rune tm_scope: none ace_mode: text - + language_id: 92 ECL: type: programming color: "#8a1267" extensions: - - .ecl - - .eclxml + - ".ecl" + - ".eclxml" tm_scope: none ace_mode: text - + language_id: 93 ECLiPSe: type: programming group: prolog extensions: - - .ecl + - ".ecl" tm_scope: source.prolog.eclipse ace_mode: prolog - + language_id: 94 EJS: type: markup color: "#a91e50" group: HTML extensions: - - .ejs + - ".ejs" tm_scope: text.html.js ace_mode: ejs - + language_id: 95 EQ: type: programming color: "#a78649" extensions: - - .eq + - ".eq" tm_scope: source.cs ace_mode: csharp - + language_id: 96 Eagle: type: markup color: "#814C05" extensions: - - .sch - - .brd + - ".sch" + - ".brd" tm_scope: text.xml ace_mode: xml - + language_id: 97 Ecere Projects: type: data group: JavaScript extensions: - - .epj + - ".epj" tm_scope: source.json ace_mode: json - + language_id: 98 Eiffel: type: programming color: "#946d57" extensions: - - .e + - ".e" ace_mode: eiffel - + language_id: 99 Elixir: type: programming color: "#6e4a7e" extensions: - - .ex - - .exs + - ".ex" + - ".exs" ace_mode: elixir filenames: - mix.lock interpreters: - elixir - + language_id: 100 Elm: type: programming color: "#60B5CC" extensions: - - .elm + - ".elm" tm_scope: source.elm ace_mode: elm - + language_id: 101 Emacs Lisp: type: programming tm_scope: source.emacs.lisp @@ -1033,35 +1037,35 @@ Emacs Lisp: - elisp - emacs filenames: - - .emacs - - .emacs.desktop - - .spacemacs + - ".emacs" + - ".emacs.desktop" + - ".spacemacs" extensions: - - .el - - .emacs - - .emacs.desktop + - ".el" + - ".emacs" + - ".emacs.desktop" ace_mode: lisp - + language_id: 102 EmberScript: type: programming color: "#FFF4F3" extensions: - - .em - - .emberscript + - ".em" + - ".emberscript" tm_scope: source.coffee ace_mode: coffee - + language_id: 103 Erlang: type: programming color: "#B83998" extensions: - - .erl - - .app.src - - .es - - .escript - - .hrl - - .xrl - - .yrl + - ".erl" + - ".app.src" + - ".es" + - ".escript" + - ".hrl" + - ".xrl" + - ".yrl" filenames: - rebar.config - rebar.config.lock @@ -1069,7 +1073,7 @@ Erlang: ace_mode: erlang interpreters: - escript - + language_id: 104 F#: type: programming color: "#b845fc" @@ -1077,232 +1081,232 @@ F#: aliases: - fsharp extensions: - - .fs - - .fsi - - .fsx + - ".fs" + - ".fsi" + - ".fsx" tm_scope: source.fsharp ace_mode: text - + language_id: 105 FLUX: type: programming color: "#88ccff" extensions: - - .fx - - .flux + - ".fx" + - ".flux" tm_scope: none ace_mode: text - + language_id: 106 FORTRAN: type: programming color: "#4d41b1" extensions: - - .f90 - - .f - - .f03 - - .f08 - - .f77 - - .f95 - - .for - - .fpp + - ".f90" + - ".f" + - ".f03" + - ".f08" + - ".f77" + - ".f95" + - ".for" + - ".fpp" tm_scope: source.fortran.modern ace_mode: text - + language_id: 107 Factor: type: programming color: "#636746" extensions: - - .factor + - ".factor" filenames: - - .factor-boot-rc - - .factor-rc + - ".factor-boot-rc" + - ".factor-rc" ace_mode: text - + language_id: 108 Fancy: type: programming color: "#7b9db4" extensions: - - .fy - - .fancypack + - ".fy" + - ".fancypack" filenames: - Fakefile ace_mode: text - + language_id: 109 Fantom: type: programming color: "#dbded5" extensions: - - .fan + - ".fan" tm_scope: none ace_mode: text - + language_id: 110 Filebench WML: type: programming extensions: - - .f + - ".f" tm_scope: none ace_mode: text - + language_id: 111 Filterscript: type: programming group: RenderScript extensions: - - .fs + - ".fs" tm_scope: none ace_mode: text - + language_id: 112 Formatted: type: data extensions: - - .for - - .eam.fs + - ".for" + - ".eam.fs" tm_scope: none ace_mode: text - + language_id: 113 Forth: type: programming color: "#341708" extensions: - - .fth - - .4th - - .f - - .for - - .forth - - .fr - - .frt - - .fs + - ".fth" + - ".4th" + - ".f" + - ".for" + - ".forth" + - ".fr" + - ".frt" + - ".fs" ace_mode: forth - + language_id: 114 FreeMarker: type: programming color: "#0050b2" aliases: - ftl extensions: - - .ftl + - ".ftl" tm_scope: text.html.ftl ace_mode: ftl - + language_id: 115 Frege: type: programming color: "#00cafe" extensions: - - .fr + - ".fr" tm_scope: source.haskell ace_mode: haskell - + language_id: 116 G-code: type: data extensions: - - .g - - .gco - - .gcode + - ".g" + - ".gco" + - ".gcode" tm_scope: source.gcode ace_mode: gcode - + language_id: 117 GAMS: type: programming extensions: - - .gms + - ".gms" tm_scope: none ace_mode: text - + language_id: 118 GAP: type: programming extensions: - - .g - - .gap - - .gd - - .gi - - .tst + - ".g" + - ".gap" + - ".gd" + - ".gi" + - ".tst" tm_scope: source.gap ace_mode: text - + language_id: 119 GAS: type: programming group: Assembly extensions: - - .s - - .ms + - ".s" + - ".ms" tm_scope: source.assembly ace_mode: assembly_x86 - + language_id: 120 GCC Machine Description: type: programming extensions: - - .md + - ".md" tm_scope: source.lisp ace_mode: lisp - + language_id: 121 GDB: type: programming extensions: - - .gdb - - .gdbinit + - ".gdb" + - ".gdbinit" tm_scope: source.gdb ace_mode: text - + language_id: 122 GDScript: type: programming extensions: - - .gd + - ".gd" tm_scope: source.gdscript ace_mode: text - + language_id: 123 GLSL: type: programming extensions: - - .glsl - - .fp - - .frag - - .frg - - .fs - - .fsh - - .fshader - - .geo - - .geom - - .glslv - - .gshader - - .shader - - .vert - - .vrx - - .vsh - - .vshader + - ".glsl" + - ".fp" + - ".frag" + - ".frg" + - ".fs" + - ".fsh" + - ".fshader" + - ".geo" + - ".geom" + - ".glslv" + - ".gshader" + - ".shader" + - ".vert" + - ".vrx" + - ".vsh" + - ".vshader" ace_mode: glsl - + language_id: 124 Game Maker Language: type: programming color: "#8fb200" extensions: - - .gml + - ".gml" tm_scope: source.c++ ace_mode: c_cpp - + language_id: 125 Genshi: type: programming extensions: - - .kid + - ".kid" tm_scope: text.xml.genshi aliases: - xml+genshi - xml+kid ace_mode: xml - + language_id: 126 Gentoo Ebuild: type: programming group: Shell extensions: - - .ebuild + - ".ebuild" tm_scope: source.shell ace_mode: sh - + language_id: 127 Gentoo Eclass: type: programming group: Shell extensions: - - .eclass + - ".eclass" tm_scope: source.shell ace_mode: sh - + language_id: 128 Gettext Catalog: type: prose search_term: pot @@ -1310,134 +1314,134 @@ Gettext Catalog: aliases: - pot extensions: - - .po - - .pot + - ".po" + - ".pot" tm_scope: source.po ace_mode: text - + language_id: 129 Glyph: type: programming color: "#e4cc98" extensions: - - .glf + - ".glf" tm_scope: source.tcl ace_mode: tcl - + language_id: 130 Gnuplot: type: programming color: "#f0a9f0" extensions: - - .gp - - .gnu - - .gnuplot - - .plot - - .plt + - ".gp" + - ".gnu" + - ".gnuplot" + - ".plot" + - ".plt" interpreters: - gnuplot ace_mode: text - + language_id: 131 Go: type: programming color: "#375eab" extensions: - - .go + - ".go" ace_mode: golang - + language_id: 132 Golo: type: programming color: "#88562A" extensions: - - .golo + - ".golo" tm_scope: source.golo ace_mode: text - + language_id: 133 Gosu: type: programming color: "#82937f" extensions: - - .gs - - .gst - - .gsx - - .vark + - ".gs" + - ".gst" + - ".gsx" + - ".vark" tm_scope: source.gosu.2 ace_mode: text - + language_id: 134 Grace: type: programming extensions: - - .grace + - ".grace" tm_scope: source.grace ace_mode: text - + language_id: 135 Gradle: type: data extensions: - - .gradle + - ".gradle" tm_scope: source.groovy.gradle ace_mode: text - + language_id: 136 Grammatical Framework: type: programming aliases: - gf wrap: false extensions: - - .gf + - ".gf" searchable: true color: "#79aa7a" tm_scope: source.haskell ace_mode: haskell - + language_id: 137 Graph Modeling Language: type: data extensions: - - .gml + - ".gml" tm_scope: none ace_mode: text - + language_id: 138 GraphQL: type: data extensions: - - .graphql + - ".graphql" tm_scope: source.graphql ace_mode: text - + language_id: 139 Graphviz (DOT): type: data tm_scope: source.dot extensions: - - .dot - - .gv + - ".dot" + - ".gv" ace_mode: text - + language_id: 140 Groff: type: markup color: "#ecdebe" extensions: - - .man - - '.1' - - .1in - - .1m - - .1x - - '.2' - - '.3' - - .3in - - .3m - - .3qt - - .3x - - '.4' - - '.5' - - '.6' - - '.7' - - '.8' - - '.9' - - .l - - .me - - .ms - - .n - - .rno - - .roff - - .tmac + - ".man" + - ".1" + - ".1in" + - ".1m" + - ".1x" + - ".2" + - ".3" + - ".3in" + - ".3m" + - ".3qt" + - ".3x" + - ".4" + - ".5" + - ".6" + - ".7" + - ".8" + - ".9" + - ".l" + - ".me" + - ".ms" + - ".n" + - ".rno" + - ".roff" + - ".tmac" filenames: - mmn - mmt @@ -1446,21 +1450,21 @@ Groff: - nroff - troff ace_mode: text - + language_id: 141 Groovy: type: programming ace_mode: groovy color: "#e69f56" extensions: - - .groovy - - .grt - - .gtpl - - .gvy + - ".groovy" + - ".grt" + - ".gtpl" + - ".gvy" interpreters: - groovy filenames: - Jenkinsfile - + language_id: 142 Groovy Server Pages: type: programming group: Groovy @@ -1468,28 +1472,28 @@ Groovy Server Pages: - gsp - java server page extensions: - - .gsp + - ".gsp" tm_scope: text.html.jsp ace_mode: jsp - + language_id: 143 HCL: type: programming extensions: - - .hcl - - .tf + - ".hcl" + - ".tf" ace_mode: ruby tm_scope: source.ruby - + language_id: 144 HLSL: type: programming extensions: - - .hlsl - - .fx - - .fxh - - .hlsli + - ".hlsl" + - ".fx" + - ".fxh" + - ".hlsli" ace_mode: text tm_scope: none - + language_id: 145 HTML: type: markup tm_scope: text.html.basic @@ -1498,28 +1502,28 @@ HTML: aliases: - xhtml extensions: - - .html - - .htm - - .html.hl - - .inc - - .st - - .xht - - .xhtml - + - ".html" + - ".htm" + - ".html.hl" + - ".inc" + - ".st" + - ".xht" + - ".xhtml" + language_id: 146 HTML+Django: type: markup tm_scope: text.html.django group: HTML extensions: - - .mustache - - .jinja + - ".mustache" + - ".jinja" aliases: - django - html+django/jinja - html+jinja - htmldjango ace_mode: django - + language_id: 147 HTML+ECR: type: markup tm_scope: text.html.ecr @@ -1527,9 +1531,9 @@ HTML+ECR: aliases: - ecr extensions: - - .ecr + - ".ecr" ace_mode: text - + language_id: 148 HTML+EEX: type: markup tm_scope: text.html.elixir @@ -1537,9 +1541,9 @@ HTML+EEX: aliases: - eex extensions: - - .eex + - ".eex" ace_mode: text - + language_id: 149 HTML+ERB: type: markup tm_scope: text.html.erb @@ -1547,43 +1551,43 @@ HTML+ERB: aliases: - erb extensions: - - .erb - - .erb.deface + - ".erb" + - ".erb.deface" ace_mode: text - + language_id: 150 HTML+PHP: type: markup tm_scope: text.html.php group: HTML extensions: - - .phtml + - ".phtml" ace_mode: php - + language_id: 151 HTTP: type: data extensions: - - .http + - ".http" tm_scope: source.httpspec ace_mode: text - + language_id: 152 Hack: type: programming ace_mode: php extensions: - - .hh - - .php + - ".hh" + - ".php" tm_scope: text.html.php color: "#878787" - + language_id: 153 Haml: group: HTML type: markup extensions: - - .haml - - .haml.deface + - ".haml" + - ".haml.deface" ace_mode: haml color: "#ECE2A9" - + language_id: 154 Handlebars: type: markup color: "#01a9d6" @@ -1592,86 +1596,86 @@ Handlebars: - hbs - htmlbars extensions: - - .handlebars - - .hbs + - ".handlebars" + - ".hbs" tm_scope: text.html.handlebars ace_mode: handlebars - + language_id: 155 Harbour: type: programming color: "#0e60e3" extensions: - - .hb + - ".hb" tm_scope: source.harbour ace_mode: text - + language_id: 156 Haskell: type: programming color: "#29b544" extensions: - - .hs - - .hsc + - ".hs" + - ".hsc" interpreters: - runhaskell ace_mode: haskell - + language_id: 157 Haxe: type: programming ace_mode: haxe color: "#df7900" extensions: - - .hx - - .hxsl + - ".hx" + - ".hxsl" tm_scope: source.haxe.2 - + language_id: 158 Hy: type: programming ace_mode: text color: "#7790B2" extensions: - - .hy + - ".hy" aliases: - hylang tm_scope: source.hy - + language_id: 159 HyPhy: type: programming ace_mode: text extensions: - - .bf + - ".bf" tm_scope: none - + language_id: 160 IDL: type: programming color: "#a3522f" extensions: - - .pro - - .dlm + - ".pro" + - ".dlm" ace_mode: text - + language_id: 161 IGOR Pro: type: programming extensions: - - .ipf + - ".ipf" aliases: - igor - igorpro tm_scope: none ace_mode: text - + language_id: 162 INI: type: data extensions: - - .ini - - .cfg - - .prefs - - .pro - - .properties + - ".ini" + - ".cfg" + - ".prefs" + - ".pro" + - ".properties" tm_scope: source.ini aliases: - dosini ace_mode: ini - + language_id: 163 IRC log: type: data search_term: irc @@ -1679,64 +1683,64 @@ IRC log: - irc - irc logs extensions: - - .irclog - - .weechatlog + - ".irclog" + - ".weechatlog" tm_scope: none ace_mode: text - + language_id: 164 Idris: type: programming extensions: - - .idr - - .lidr + - ".idr" + - ".lidr" ace_mode: text tm_scope: source.idris - + language_id: 165 Inform 7: type: programming wrap: true extensions: - - .ni - - .i7x + - ".ni" + - ".i7x" tm_scope: source.inform7 aliases: - i7 - inform7 ace_mode: text - + language_id: 166 Inno Setup: type: programming extensions: - - .iss + - ".iss" tm_scope: none ace_mode: text - + language_id: 167 Io: type: programming color: "#a9188d" extensions: - - .io + - ".io" interpreters: - io ace_mode: io - + language_id: 168 Ioke: type: programming color: "#078193" extensions: - - .ik + - ".ik" interpreters: - ioke ace_mode: text - + language_id: 169 Isabelle: type: programming color: "#FEFE00" extensions: - - .thy + - ".thy" tm_scope: source.isabelle.theory ace_mode: text - + language_id: 170 Isabelle ROOT: type: programming group: Isabelle @@ -1744,27 +1748,27 @@ Isabelle ROOT: - ROOT tm_scope: source.isabelle.root ace_mode: text - + language_id: 171 J: type: programming color: "#9EEDFF" extensions: - - .ijs + - ".ijs" interpreters: - jconsole tm_scope: source.j ace_mode: text - + language_id: 172 JFlex: type: programming color: "#DBCA00" group: Lex extensions: - - .flex - - .jflex + - ".flex" + - ".jflex" tm_scope: source.jflex ace_mode: text - + language_id: 173 JSON: type: data tm_scope: source.json @@ -1772,70 +1776,70 @@ JSON: ace_mode: json searchable: false extensions: - - .json - - .geojson - - .JSON-tmLanguage - - .topojson + - ".json" + - ".geojson" + - ".JSON-tmLanguage" + - ".topojson" filenames: - - .arcconfig - - .jshintrc + - ".arcconfig" + - ".jshintrc" - composer.lock - mcmod.info - + language_id: 174 JSON5: type: data extensions: - - .json5 + - ".json5" tm_scope: source.js ace_mode: javascript - + language_id: 175 JSONLD: type: data group: JavaScript ace_mode: javascript extensions: - - .jsonld + - ".jsonld" tm_scope: source.js - + language_id: 176 JSONiq: color: "#40d47e" type: programming ace_mode: jsoniq extensions: - - .jq + - ".jq" tm_scope: source.jq - + language_id: 177 JSX: type: programming group: JavaScript extensions: - - .jsx + - ".jsx" tm_scope: source.js.jsx ace_mode: javascript - + language_id: 178 Jade: group: HTML type: markup extensions: - - .jade - - .pug + - ".jade" + - ".pug" tm_scope: text.jade ace_mode: jade - + language_id: 179 Jasmin: type: programming ace_mode: java extensions: - - .j + - ".j" tm_scope: source.jasmin - + language_id: 180 Java: type: programming ace_mode: java color: "#b07219" extensions: - - .java - + - ".java" + language_id: 181 Java Server Pages: type: programming group: Java @@ -1843,10 +1847,10 @@ Java Server Pages: aliases: - jsp extensions: - - .jsp + - ".jsp" tm_scope: text.html.jsp ace_mode: jsp - + language_id: 182 JavaScript: type: programming tm_scope: source.js @@ -1856,247 +1860,246 @@ JavaScript: - js - node extensions: - - .js - - ._js - - .bones - - .es - - .es6 - - .frag - - .gs - - .jake - - .jsb - - .jscad - - .jsfl - - .jsm - - .jss - - .njs - - .pac - - .sjs - - .ssjs - - .sublime-build - - .sublime-commands - - .sublime-completions - - .sublime-keymap - - .sublime-macro - - .sublime-menu - - .sublime-mousemap - - .sublime-project - - .sublime-settings - - .sublime-theme - - .sublime-workspace - - .sublime_metrics - - .sublime_session - - .xsjs - - .xsjslib + - ".js" + - "._js" + - ".bones" + - ".es" + - ".es6" + - ".frag" + - ".gs" + - ".jake" + - ".jsb" + - ".jscad" + - ".jsfl" + - ".jsm" + - ".jss" + - ".njs" + - ".pac" + - ".sjs" + - ".ssjs" + - ".sublime-build" + - ".sublime-commands" + - ".sublime-completions" + - ".sublime-keymap" + - ".sublime-macro" + - ".sublime-menu" + - ".sublime-mousemap" + - ".sublime-project" + - ".sublime-settings" + - ".sublime-theme" + - ".sublime-workspace" + - ".sublime_metrics" + - ".sublime_session" + - ".xsjs" + - ".xsjslib" filenames: - Jakefile interpreters: - node - + language_id: 183 Julia: type: programming extensions: - - .jl + - ".jl" color: "#a270ba" ace_mode: julia - + language_id: 184 Jupyter Notebook: type: markup ace_mode: json tm_scope: source.json color: "#DA5B0B" extensions: - - .ipynb + - ".ipynb" filenames: - Notebook aliases: - IPython Notebook - + language_id: 185 KRL: type: programming color: "#28431f" extensions: - - .krl + - ".krl" tm_scope: none ace_mode: text - + language_id: 186 KiCad: type: programming extensions: - - .sch - - .brd - - .kicad_pcb + - ".sch" + - ".brd" + - ".kicad_pcb" tm_scope: none ace_mode: text - + language_id: 187 Kit: type: markup ace_mode: html extensions: - - .kit + - ".kit" tm_scope: text.html.basic - + language_id: 188 Kotlin: type: programming color: "#F18E33" extensions: - - .kt - - .ktm - - .kts + - ".kt" + - ".ktm" + - ".kts" tm_scope: source.Kotlin ace_mode: text - + language_id: 189 LFE: type: programming extensions: - - .lfe + - ".lfe" color: "#004200" group: Erlang tm_scope: source.lisp ace_mode: lisp - + language_id: 190 LLVM: type: programming extensions: - - .ll + - ".ll" ace_mode: text color: "#185619" - + language_id: 191 LOLCODE: type: programming extensions: - - .lol + - ".lol" color: "#cc9900" tm_scope: none ace_mode: text - + language_id: 192 LSL: type: programming ace_mode: lsl extensions: - - .lsl - - .lslp + - ".lsl" + - ".lslp" interpreters: - lsl - color: '#3d9970' - + color: "#3d9970" + language_id: 193 LabVIEW: type: programming extensions: - - .lvproj + - ".lvproj" tm_scope: text.xml ace_mode: xml - + language_id: 194 Lasso: type: programming color: "#999999" extensions: - - .lasso - - .las - - .lasso8 - - .lasso9 - - .ldml + - ".lasso" + - ".las" + - ".lasso8" + - ".lasso9" + - ".ldml" tm_scope: file.lasso aliases: - lassoscript ace_mode: text - + language_id: 195 Latte: type: markup color: "#A8FF97" group: HTML extensions: - - .latte + - ".latte" tm_scope: text.html.smarty ace_mode: smarty - + language_id: 196 Lean: type: programming extensions: - - .lean - - .hlean + - ".lean" + - ".hlean" ace_mode: text - + language_id: 197 Less: type: markup group: CSS extensions: - - .less + - ".less" tm_scope: source.css.less ace_mode: less color: "#A1D9A1" - + language_id: 198 Lex: type: programming color: "#DBCA00" aliases: - flex extensions: - - .l - - .lex + - ".l" + - ".lex" tm_scope: none ace_mode: text - + language_id: 199 LilyPond: type: programming extensions: - - .ly - - .ily + - ".ly" + - ".ily" ace_mode: text - + language_id: 200 Limbo: type: programming extensions: - - .b - - .m + - ".b" + - ".m" tm_scope: none ace_mode: text - + language_id: 201 Linker Script: type: data extensions: - - .ld - - .lds + - ".ld" + - ".lds" filenames: - ld.script tm_scope: none ace_mode: text - + language_id: 202 Linux Kernel Module: type: data extensions: - - .mod + - ".mod" tm_scope: none ace_mode: text - + language_id: 203 Liquid: type: markup extensions: - - .liquid + - ".liquid" tm_scope: text.html.liquid ace_mode: liquid - + language_id: 204 Literate Agda: type: programming group: Agda extensions: - - .lagda + - ".lagda" tm_scope: none ace_mode: text - + language_id: 205 Literate CoffeeScript: type: programming tm_scope: source.litcoffee group: CoffeeScript - ace_mode: markdown + ace_mode: text wrap: true search_term: litcoffee aliases: - litcoffee extensions: - - .litcoffee - ace_mode: text - + - ".litcoffee" + language_id: 206 Literate Haskell: type: programming group: Haskell @@ -2105,10 +2108,10 @@ Literate Haskell: - lhaskell - lhs extensions: - - .lhs + - ".lhs" tm_scope: text.tex.latex.haskell ace_mode: text - + language_id: 207 LiveScript: type: programming color: "#499886" @@ -2116,112 +2119,112 @@ LiveScript: - live-script - ls extensions: - - .ls - - ._ls + - ".ls" + - "._ls" filenames: - Slakefile ace_mode: livescript - + language_id: 208 Logos: type: programming extensions: - - .xm - - .x - - .xi + - ".xm" + - ".x" + - ".xi" ace_mode: text tm_scope: source.logos - + language_id: 209 Logtalk: type: programming extensions: - - .lgt - - .logtalk + - ".lgt" + - ".logtalk" ace_mode: text - + language_id: 210 LookML: type: programming ace_mode: yaml color: "#652B81" extensions: - - .lookml + - ".lookml" tm_scope: source.yaml - + language_id: 211 LoomScript: type: programming extensions: - - .ls + - ".ls" tm_scope: source.loomscript ace_mode: text - + language_id: 212 Lua: type: programming ace_mode: lua color: "#000080" extensions: - - .lua - - .fcgi - - .nse - - .pd_lua - - .rbxs - - .wlua + - ".lua" + - ".fcgi" + - ".nse" + - ".pd_lua" + - ".rbxs" + - ".wlua" interpreters: - lua - + language_id: 213 M: type: programming aliases: - mumps extensions: - - .mumps - - .m + - ".mumps" + - ".m" tm_scope: source.lisp ace_mode: lisp - + language_id: 214 M4: type: programming extensions: - - .m4 + - ".m4" tm_scope: none ace_mode: text - + language_id: 215 M4Sugar: type: programming group: M4 aliases: - autoconf extensions: - - .m4 + - ".m4" filenames: - configure.ac tm_scope: none ace_mode: text - + language_id: 216 MAXScript: type: programming color: "#00a6a6" extensions: - - .ms - - .mcr + - ".ms" + - ".mcr" tm_scope: source.maxscript ace_mode: text - + language_id: 217 MTML: type: markup color: "#b7e1f4" extensions: - - .mtml + - ".mtml" tm_scope: text.html.basic ace_mode: html - + language_id: 218 MUF: type: programming group: Forth extensions: - - .muf - - .m + - ".muf" + - ".m" tm_scope: none ace_mode: forth - + language_id: 219 Makefile: type: programming color: "#427819" @@ -2230,10 +2233,10 @@ Makefile: - make - mf extensions: - - .mak - - .d - - .mk - - .mkfile + - ".mak" + - ".d" + - ".mk" + - ".mkfile" filenames: - BSDmakefile - GNUmakefile @@ -2249,69 +2252,69 @@ Makefile: interpreters: - make ace_mode: makefile - + language_id: 220 Mako: type: programming extensions: - - .mako - - .mao + - ".mako" + - ".mao" tm_scope: text.html.mako ace_mode: text - + language_id: 221 Markdown: type: prose ace_mode: markdown wrap: true extensions: - - .md - - .markdown - - .mkd - - .mkdn - - .mkdown - - .ron + - ".md" + - ".markdown" + - ".mkd" + - ".mkdn" + - ".mkdown" + - ".ron" tm_scope: source.gfm - + language_id: 222 Mask: type: markup color: "#f97732" ace_mode: mask extensions: - - .mask + - ".mask" tm_scope: source.mask - + language_id: 223 Mathematica: type: programming extensions: - - .mathematica - - .cdf - - .m - - .ma - - .mt - - .nb - - .nbp - - .wl - - .wlt + - ".mathematica" + - ".cdf" + - ".m" + - ".ma" + - ".mt" + - ".nb" + - ".nbp" + - ".wl" + - ".wlt" aliases: - mma ace_mode: text - + language_id: 224 Matlab: type: programming color: "#bb92ac" aliases: - octave extensions: - - .matlab - - .m + - ".matlab" + - ".m" ace_mode: matlab - + language_id: 225 Maven POM: type: data tm_scope: text.xml.pom filenames: - pom.xml ace_mode: xml - + language_id: 226 Max: type: programming color: "#c4a79c" @@ -2320,23 +2323,23 @@ Max: - maxmsp search_term: max/msp extensions: - - .maxpat - - .maxhelp - - .maxproj - - .mxt - - .pat + - ".maxpat" + - ".maxhelp" + - ".maxproj" + - ".mxt" + - ".pat" tm_scope: source.json ace_mode: json - + language_id: 227 MediaWiki: type: prose wrap: true extensions: - - .mediawiki - - .wiki + - ".mediawiki" + - ".wiki" tm_scope: text.html.mediawiki ace_mode: text - + language_id: 228 Mercury: type: programming color: "#ff2b2b" @@ -2344,166 +2347,165 @@ Mercury: interpreters: - mmi extensions: - - .m - - .moo + - ".m" + - ".moo" tm_scope: source.mercury - ace_mode: prolog - + language_id: 229 Metal: type: programming color: "#8f14e9" extensions: - - .metal + - ".metal" tm_scope: source.c++ ace_mode: c_cpp - -MiniD: # Legacy + language_id: 230 +MiniD: type: programming searchable: false extensions: - - .minid # Dummy extension + - ".minid" tm_scope: none ace_mode: text - + language_id: 231 Mirah: type: programming search_term: mirah color: "#c7a938" extensions: - - .druby - - .duby - - .mir - - .mirah + - ".druby" + - ".duby" + - ".mir" + - ".mirah" tm_scope: source.ruby ace_mode: ruby - + language_id: 232 Modelica: type: programming extensions: - - .mo + - ".mo" tm_scope: source.modelica ace_mode: text - + language_id: 233 Modula-2: type: programming extensions: - - .mod + - ".mod" tm_scope: source.modula2 ace_mode: text - + language_id: 234 Module Management System: type: programming extensions: - - .mms - - .mmk + - ".mms" + - ".mmk" filenames: - descrip.mmk - descrip.mms tm_scope: none ace_mode: text - + language_id: 235 Monkey: type: programming extensions: - - .monkey + - ".monkey" ace_mode: text tm_scope: source.monkey - + language_id: 236 Moocode: type: programming extensions: - - .moo + - ".moo" tm_scope: none ace_mode: text - + language_id: 237 MoonScript: type: programming extensions: - - .moon + - ".moon" interpreters: - moon ace_mode: text - + language_id: 238 Myghty: type: programming extensions: - - .myt + - ".myt" tm_scope: none ace_mode: text - + language_id: 239 NCL: type: programming color: "#28431f" extensions: - - .ncl + - ".ncl" tm_scope: source.ncl ace_mode: text - + language_id: 240 NL: type: data extensions: - - .nl + - ".nl" tm_scope: none ace_mode: text - + language_id: 241 NSIS: type: programming extensions: - - .nsi - - .nsh + - ".nsi" + - ".nsh" ace_mode: text - + language_id: 242 Nemerle: type: programming color: "#3d3c6e" extensions: - - .n + - ".n" ace_mode: text - + language_id: 243 NetLinx: type: programming color: "#0aa0ff" extensions: - - .axs - - .axi + - ".axs" + - ".axi" tm_scope: source.netlinx ace_mode: text - + language_id: 244 NetLinx+ERB: type: programming color: "#747faa" extensions: - - .axs.erb - - .axi.erb + - ".axs.erb" + - ".axi.erb" tm_scope: source.netlinx.erb ace_mode: text - + language_id: 245 NetLogo: type: programming color: "#ff6375" extensions: - - .nlogo + - ".nlogo" tm_scope: source.lisp ace_mode: lisp - + language_id: 246 NewLisp: type: programming lexer: NewLisp color: "#87AED7" extensions: - - .nl - - .lisp - - .lsp + - ".nl" + - ".lisp" + - ".lsp" interpreters: - newlisp tm_scope: source.lisp ace_mode: lisp - + language_id: 247 Nginx: type: markup extensions: - - .nginxconf - - .vhost + - ".nginxconf" + - ".vhost" filenames: - nginx.conf tm_scope: source.nginx @@ -2511,91 +2513,91 @@ Nginx: - nginx configuration file ace_mode: text color: "#9469E9" - + language_id: 248 Nimrod: type: programming color: "#37775b" extensions: - - .nim - - .nimrod + - ".nim" + - ".nimrod" ace_mode: text tm_scope: source.nim - + language_id: 249 Ninja: type: data tm_scope: source.ninja extensions: - - .ninja + - ".ninja" ace_mode: text - + language_id: 250 Nit: type: programming color: "#009917" extensions: - - .nit + - ".nit" tm_scope: source.nit ace_mode: text - + language_id: 251 Nix: type: programming color: "#7e7eff" extensions: - - .nix + - ".nix" aliases: - nixos tm_scope: source.nix ace_mode: nix - + language_id: 252 Nu: type: programming color: "#c9df40" aliases: - nush extensions: - - .nu + - ".nu" filenames: - Nukefile tm_scope: source.nu ace_mode: scheme interpreters: - nush - + language_id: 253 NumPy: type: programming group: Python extensions: - - .numpy - - .numpyw - - .numsc + - ".numpy" + - ".numpyw" + - ".numsc" tm_scope: none ace_mode: text color: "#9C8AF9" - + language_id: 254 OCaml: type: programming ace_mode: ocaml color: "#3be133" extensions: - - .ml - - .eliom - - .eliomi - - .ml4 - - .mli - - .mll - - .mly + - ".ml" + - ".eliom" + - ".eliomi" + - ".ml4" + - ".mli" + - ".mll" + - ".mly" interpreters: - ocaml - ocamlrun - ocamlscript tm_scope: source.ocaml - + language_id: 255 ObjDump: type: data extensions: - - .objdump + - ".objdump" tm_scope: objdump.x86asm ace_mode: assembly_x86 - + language_id: 256 Objective-C: type: programming tm_scope: source.objc @@ -2605,10 +2607,10 @@ Objective-C: - objc - objectivec extensions: - - .m - - .h + - ".m" + - ".h" ace_mode: objectivec - + language_id: 257 Objective-C++: type: programming tm_scope: source.objc++ @@ -2618,9 +2620,9 @@ Objective-C++: - objc++ - objectivec++ extensions: - - .mm + - ".mm" ace_mode: objectivec - + language_id: 258 Objective-J: type: programming color: "#ff0c5a" @@ -2629,42 +2631,42 @@ Objective-J: - objectivej - objj extensions: - - .j - - .sj + - ".j" + - ".sj" tm_scope: source.js.objj ace_mode: text - + language_id: 259 Omgrofl: type: programming extensions: - - .omgrofl + - ".omgrofl" color: "#cabbff" tm_scope: none ace_mode: text - + language_id: 260 Opa: type: programming extensions: - - .opa + - ".opa" ace_mode: text - + language_id: 261 Opal: type: programming color: "#f7ede0" extensions: - - .opal + - ".opal" tm_scope: source.opal ace_mode: text - + language_id: 262 OpenCL: type: programming group: C extensions: - - .cl - - .opencl + - ".cl" + - ".opencl" tm_scope: source.c ace_mode: c_cpp - + language_id: 263 OpenEdge ABL: type: programming aliases: @@ -2672,11 +2674,11 @@ OpenEdge ABL: - openedge - abl extensions: - - .p - - .cls + - ".p" + - ".cls" tm_scope: source.abl ace_mode: text - + language_id: 264 OpenRC runscript: type: programming group: Shell @@ -2686,148 +2688,146 @@ OpenRC runscript: - openrc-run tm_scope: source.shell ace_mode: sh - + language_id: 265 OpenSCAD: type: programming extensions: - - .scad + - ".scad" tm_scope: none ace_mode: scad - + language_id: 266 Org: type: prose wrap: true extensions: - - .org + - ".org" tm_scope: none ace_mode: text - + language_id: 267 Ox: type: programming extensions: - - .ox - - .oxh - - .oxo + - ".ox" + - ".oxh" + - ".oxo" tm_scope: source.ox ace_mode: text - + language_id: 268 Oxygene: type: programming color: "#cdd0e3" extensions: - - .oxygene + - ".oxygene" tm_scope: none ace_mode: text - + language_id: 269 Oz: type: programming color: "#fab738" extensions: - - .oz + - ".oz" tm_scope: source.oz ace_mode: text - + language_id: 270 PAWN: type: programming color: "#dbb284" extensions: - - .pwn - - .inc + - ".pwn" + - ".inc" tm_scope: source.pawn ace_mode: text - + language_id: 271 PHP: type: programming tm_scope: text.html.php ace_mode: php color: "#4F5D95" extensions: - - .php - - .aw - - .ctp - - .fcgi - - .inc - - .php3 - - .php4 - - .php5 - - .phps - - .phpt + - ".php" + - ".aw" + - ".ctp" + - ".fcgi" + - ".inc" + - ".php3" + - ".php4" + - ".php5" + - ".phps" + - ".phpt" filenames: - Phakefile interpreters: - php aliases: - inc - -#Oracle + language_id: 272 PLSQL: type: programming ace_mode: sql tm_scope: none color: "#dad8d8" extensions: - - .pls - - .pck - - .pkb - - .pks - - .plb - - .plsql - - .sql - -#Postgres + - ".pls" + - ".pck" + - ".pkb" + - ".pks" + - ".plb" + - ".plsql" + - ".sql" + language_id: 273 PLpgSQL: type: programming ace_mode: pgsql tm_scope: source.sql extensions: - - .sql - + - ".sql" + language_id: 274 POV-Ray SDL: type: programming aliases: - pov-ray - povray extensions: - - .pov - - .inc + - ".pov" + - ".inc" ace_mode: text - + language_id: 275 Pan: type: programming - color: '#cc0000' + color: "#cc0000" extensions: - - .pan + - ".pan" tm_scope: none ace_mode: text - + language_id: 276 Papyrus: type: programming color: "#6600cc" extensions: - - .psc + - ".psc" tm_scope: source.papyrus.skyrim ace_mode: text - + language_id: 277 Parrot: type: programming color: "#f3ca0a" extensions: - - .parrot # Dummy extension + - ".parrot" tm_scope: none ace_mode: text - + language_id: 278 Parrot Assembly: group: Parrot type: programming aliases: - pasm extensions: - - .pasm + - ".pasm" interpreters: - parrot tm_scope: none ace_mode: text - + language_id: 279 Parrot Internal Representation: group: Parrot tm_scope: source.parrot.pir @@ -2835,260 +2835,260 @@ Parrot Internal Representation: aliases: - pir extensions: - - .pir + - ".pir" interpreters: - parrot ace_mode: text - + language_id: 280 Pascal: type: programming color: "#E3F171" extensions: - - .pas - - .dfm - - .dpr - - .inc - - .lpr - - .pascal - - .pp + - ".pas" + - ".dfm" + - ".dpr" + - ".inc" + - ".lpr" + - ".pascal" + - ".pp" interpreters: - instantfpc ace_mode: pascal - + language_id: 281 Perl: type: programming tm_scope: source.perl ace_mode: perl color: "#0298c3" extensions: - - .pl - - .al - - .cgi - - .fcgi - - .perl - - .ph - - .plx - - .pm - - .pod - - .psgi - - .t + - ".pl" + - ".al" + - ".cgi" + - ".fcgi" + - ".perl" + - ".ph" + - ".plx" + - ".pm" + - ".pod" + - ".psgi" + - ".t" interpreters: - perl - + language_id: 282 Perl6: type: programming color: "#0000fb" extensions: - - .6pl - - .6pm - - .nqp - - .p6 - - .p6l - - .p6m - - .pl - - .pl6 - - .pm - - .pm6 - - .t + - ".6pl" + - ".6pm" + - ".nqp" + - ".p6" + - ".p6l" + - ".p6m" + - ".pl" + - ".pl6" + - ".pm" + - ".pm6" + - ".t" filenames: - Rexfile interpreters: - perl6 tm_scope: source.perl6fe ace_mode: perl - + language_id: 283 Pickle: type: data extensions: - - .pkl + - ".pkl" tm_scope: none ace_mode: text - + language_id: 284 PicoLisp: type: programming extensions: - - .l + - ".l" interpreters: - picolisp - pil tm_scope: source.lisp ace_mode: lisp - + language_id: 285 PigLatin: type: programming color: "#fcd7de" extensions: - - .pig + - ".pig" tm_scope: source.pig_latin ace_mode: text - + language_id: 286 Pike: type: programming color: "#005390" extensions: - - .pike - - .pmod + - ".pike" + - ".pmod" interpreters: - pike ace_mode: text - + language_id: 287 Pod: type: prose ace_mode: perl wrap: true extensions: - - .pod + - ".pod" tm_scope: none - + language_id: 288 PogoScript: type: programming color: "#d80074" extensions: - - .pogo + - ".pogo" tm_scope: source.pogoscript ace_mode: text - + language_id: 289 Pony: type: programming extensions: - - .pony + - ".pony" tm_scope: source.pony ace_mode: text - + language_id: 290 PostScript: type: markup color: "#da291c" extensions: - - .ps - - .eps + - ".ps" + - ".eps" tm_scope: source.postscript aliases: - postscr ace_mode: text - + language_id: 291 PowerBuilder: type: programming color: "#8f0f8d" extensions: - - .pbt - - .sra - - .sru - - .srw + - ".pbt" + - ".sra" + - ".sru" + - ".srw" tm_scope: none ace_mode: text - + language_id: 292 PowerShell: type: programming ace_mode: powershell aliases: - posh extensions: - - .ps1 - - .psd1 - - .psm1 - + - ".ps1" + - ".psd1" + - ".psm1" + language_id: 293 Processing: type: programming color: "#0096D8" extensions: - - .pde + - ".pde" ace_mode: text - + language_id: 294 Prolog: type: programming color: "#74283c" extensions: - - .pl - - .pro - - .prolog - - .yap + - ".pl" + - ".pro" + - ".prolog" + - ".yap" interpreters: - swipl - yap tm_scope: source.prolog ace_mode: prolog - + language_id: 295 Propeller Spin: type: programming color: "#7fa2a7" extensions: - - .spin + - ".spin" tm_scope: source.spin ace_mode: text - + language_id: 296 Protocol Buffer: type: markup aliases: - protobuf - Protocol Buffers extensions: - - .proto + - ".proto" tm_scope: source.protobuf ace_mode: protobuf - + language_id: 297 Public Key: type: data extensions: - - .asc - - .pub + - ".asc" + - ".pub" tm_scope: none ace_mode: text - + language_id: 298 Puppet: type: programming color: "#302B6D" extensions: - - .pp + - ".pp" filenames: - Modulefile ace_mode: text tm_scope: source.puppet - + language_id: 299 Pure Data: type: programming color: "#91de79" extensions: - - .pd + - ".pd" tm_scope: none ace_mode: text - + language_id: 300 PureBasic: type: programming color: "#5a6986" extensions: - - .pb - - .pbi + - ".pb" + - ".pbi" tm_scope: none ace_mode: text - + language_id: 301 PureScript: type: programming color: "#1D222D" extensions: - - .purs + - ".purs" tm_scope: source.purescript ace_mode: haskell - + language_id: 302 Python: type: programming ace_mode: python color: "#3572A5" extensions: - - .py - - .bzl - - .cgi - - .fcgi - - .gyp - - .lmi - - .pyde - - .pyp - - .pyt - - .pyw - - .rpy - - .spec - - .tac - - .wsgi - - .xpy + - ".py" + - ".bzl" + - ".cgi" + - ".fcgi" + - ".gyp" + - ".lmi" + - ".pyde" + - ".pyp" + - ".pyt" + - ".pyw" + - ".rpy" + - ".spec" + - ".tac" + - ".wsgi" + - ".xpy" filenames: - BUCK - BUILD @@ -3102,34 +3102,34 @@ Python: - python3 aliases: - rusthon - + language_id: 303 Python traceback: type: data group: Python searchable: false extensions: - - .pytb + - ".pytb" tm_scope: text.python.traceback ace_mode: text - + language_id: 304 QML: type: programming color: "#44a51c" extensions: - - .qml - - .qbs + - ".qml" + - ".qbs" tm_scope: source.qml ace_mode: text - + language_id: 305 QMake: type: programming extensions: - - .pro - - .pri + - ".pro" + - ".pri" interpreters: - qmake ace_mode: text - + language_id: 306 R: type: programming color: "#198CE7" @@ -3138,188 +3138,187 @@ R: - Rscript - splus extensions: - - .r - - .rd - - .rsx + - ".r" + - ".rd" + - ".rsx" filenames: - - .Rprofile + - ".Rprofile" interpreters: - Rscript ace_mode: r - + language_id: 307 RAML: type: markup ace_mode: yaml tm_scope: source.yaml color: "#77d9fb" extensions: - - .raml - + - ".raml" + language_id: 308 RDoc: type: prose ace_mode: rdoc wrap: true extensions: - - .rdoc + - ".rdoc" tm_scope: text.rdoc - + language_id: 309 REALbasic: type: programming extensions: - - .rbbas - - .rbfrm - - .rbmnu - - .rbres - - .rbtbar - - .rbuistate + - ".rbbas" + - ".rbfrm" + - ".rbmnu" + - ".rbres" + - ".rbtbar" + - ".rbuistate" tm_scope: source.vbnet ace_mode: text - + language_id: 310 REXX: type: programming aliases: - arexx extensions: - - .rexx - - .pprx - - .rex + - ".rexx" + - ".pprx" + - ".rex" tm_scope: source.rexx ace_mode: text - + language_id: 311 RHTML: type: markup group: HTML extensions: - - .rhtml + - ".rhtml" tm_scope: text.html.erb aliases: - html+ruby ace_mode: rhtml - + language_id: 312 RMarkdown: type: prose wrap: true ace_mode: markdown extensions: - - .rmd + - ".rmd" tm_scope: source.gfm - + language_id: 313 RPM Spec: type: data tm_scope: source.rpm-spec extensions: - - .spec + - ".spec" aliases: - specfile ace_mode: text - + language_id: 314 RUNOFF: type: markup color: "#665a4e" extensions: - - .rnh - - .rno + - ".rnh" + - ".rno" tm_scope: text.runoff ace_mode: text - + language_id: 315 Racket: type: programming color: "#22228f" extensions: - - .rkt - - .rktd - - .rktl - - .scrbl + - ".rkt" + - ".rktd" + - ".rktl" + - ".scrbl" interpreters: - racket tm_scope: source.racket ace_mode: lisp - + language_id: 316 Ragel in Ruby Host: type: programming color: "#9d5200" extensions: - - .rl + - ".rl" aliases: - ragel-rb - ragel-ruby tm_scope: none ace_mode: text - + language_id: 317 Raw token data: type: data search_term: raw aliases: - raw extensions: - - .raw + - ".raw" tm_scope: none ace_mode: text - + language_id: 318 Rebol: type: programming color: "#358a5b" extensions: - - .reb - - .r - - .r2 - - .r3 - - .rebol + - ".reb" + - ".r" + - ".r2" + - ".r3" + - ".rebol" ace_mode: text tm_scope: source.rebol - + language_id: 319 Red: type: programming color: "#f50000" extensions: - - .red - - .reds + - ".red" + - ".reds" aliases: - red/system tm_scope: source.red ace_mode: text - + language_id: 320 Redcode: type: programming extensions: - - .cw + - ".cw" tm_scope: none ace_mode: text - + language_id: 321 Ren'Py: type: programming aliases: - renpy color: "#ff7f7f" extensions: - - .rpy + - ".rpy" tm_scope: source.renpy ace_mode: python - + language_id: 322 RenderScript: type: programming extensions: - - .rs - - .rsh + - ".rs" + - ".rsh" tm_scope: none ace_mode: text - + language_id: 323 RobotFramework: type: programming extensions: - - .robot - # - .txt + - ".robot" tm_scope: text.robot ace_mode: text - + language_id: 324 Rouge: type: programming ace_mode: clojure color: "#cc0088" extensions: - - .rg + - ".rg" tm_scope: source.clojure - + language_id: 325 Ruby: type: programming ace_mode: ruby @@ -3331,26 +3330,26 @@ Ruby: - rb - rbx extensions: - - .rb - - .builder - - .fcgi - - .gemspec - - .god - - .irbrc - - .jbuilder - - .mspec - - .pluginspec - - .podspec - - .rabl - - .rake - - .rbuild - - .rbw - - .rbx - - .ru - - .ruby - - .spec - - .thor - - .watchr + - ".rb" + - ".builder" + - ".fcgi" + - ".gemspec" + - ".god" + - ".irbrc" + - ".jbuilder" + - ".mspec" + - ".pluginspec" + - ".podspec" + - ".rabl" + - ".rake" + - ".rbuild" + - ".rbw" + - ".rbx" + - ".ru" + - ".ruby" + - ".spec" + - ".thor" + - ".watchr" interpreters: - ruby - macruby @@ -3358,7 +3357,7 @@ Ruby: - jruby - rbx filenames: - - .pryrc + - ".pryrc" - Appraisals - Berksfile - Brewfile @@ -3376,37 +3375,37 @@ Ruby: - Thorfile - Vagrantfile - buildfile - + language_id: 326 Rust: type: programming color: "#dea584" extensions: - - .rs - - .rs.in + - ".rs" + - ".rs.in" ace_mode: rust - + language_id: 327 SAS: type: programming color: "#B34936" extensions: - - .sas + - ".sas" tm_scope: source.sas ace_mode: text - + language_id: 328 SCSS: type: markup tm_scope: source.scss group: CSS ace_mode: scss extensions: - - .scss + - ".scss" color: "#CF649A" - + language_id: 329 SMT: type: programming extensions: - - .smt2 - - .smt + - ".smt2" + - ".smt" interpreters: - boolector - cvc4 @@ -3420,79 +3419,78 @@ SMT: - z3 tm_scope: source.smt ace_mode: text - + language_id: 330 SPARQL: type: data tm_scope: source.sparql ace_mode: text extensions: - - .sparql - - .rq - + - ".sparql" + - ".rq" + language_id: 331 SQF: type: programming color: "#3F3F3F" extensions: - - .sqf - - .hqf + - ".sqf" + - ".hqf" tm_scope: source.sqf ace_mode: text - + language_id: 332 SQL: type: data tm_scope: source.sql ace_mode: sql extensions: - - .sql - - .cql - - .ddl - - .inc - - .prc - - .tab - - .udf - - .viw - -#IBM DB2 + - ".sql" + - ".cql" + - ".ddl" + - ".inc" + - ".prc" + - ".tab" + - ".udf" + - ".viw" + language_id: 333 SQLPL: type: programming ace_mode: sql tm_scope: source.sql extensions: - - .sql - - .db2 - + - ".sql" + - ".db2" + language_id: 334 SRecode Template: type: markup color: "#348a34" tm_scope: source.lisp ace_mode: lisp extensions: - - .srt - + - ".srt" + language_id: 335 STON: type: data group: Smalltalk extensions: - - .ston + - ".ston" tm_scope: source.smalltalk ace_mode: text - + language_id: 336 SVG: type: data extensions: - - .svg + - ".svg" tm_scope: text.xml ace_mode: xml - + language_id: 337 Sage: type: programming group: Python extensions: - - .sage - - .sagews + - ".sage" + - ".sagews" tm_scope: source.python ace_mode: python - + language_id: 338 SaltStack: type: programming color: "#646464" @@ -3500,47 +3498,47 @@ SaltStack: - saltstate - salt extensions: - - .sls + - ".sls" tm_scope: source.yaml.salt ace_mode: yaml - + language_id: 339 Sass: type: markup tm_scope: source.sass group: CSS extensions: - - .sass + - ".sass" ace_mode: sass color: "#CF649A" - + language_id: 340 Scala: type: programming ace_mode: scala color: "#c22d40" extensions: - - .scala - - .sbt - - .sc + - ".scala" + - ".sbt" + - ".sc" interpreters: - scala - + language_id: 341 Scaml: group: HTML type: markup extensions: - - .scaml + - ".scaml" tm_scope: source.scaml ace_mode: text - + language_id: 342 Scheme: type: programming color: "#1e4aec" extensions: - - .scm - - .sld - - .sls - - .sps - - .ss + - ".scm" + - ".sld" + - ".sls" + - ".sps" + - ".ss" interpreters: - guile - bigloo @@ -3549,23 +3547,23 @@ Scheme: - gosh - r6rs ace_mode: scheme - + language_id: 343 Scilab: type: programming extensions: - - .sci - - .sce - - .tst + - ".sci" + - ".sce" + - ".tst" ace_mode: text - + language_id: 344 Self: type: programming color: "#0579aa" extensions: - - .self + - ".self" tm_scope: none ace_mode: text - + language_id: 345 Shell: type: programming search_term: bash @@ -3576,22 +3574,22 @@ Shell: - bash - zsh extensions: - - .sh - - .bash - - .bats - - .cgi - - .command - - .fcgi - - .ksh - - .sh.in - - .tmux - - .tool - - .zsh + - ".sh" + - ".bash" + - ".bats" + - ".cgi" + - ".command" + - ".fcgi" + - ".ksh" + - ".sh.in" + - ".tmux" + - ".tool" + - ".zsh" filenames: - - .bash_history - - .bash_logout - - .bash_profile - - .bashrc + - ".bash_history" + - ".bash_logout" + - ".bash_profile" + - ".bashrc" - PKGBUILD - gradlew interpreters: @@ -3600,204 +3598,204 @@ Shell: - sh - zsh ace_mode: sh - + language_id: 346 ShellSession: type: programming extensions: - - .sh-session + - ".sh-session" aliases: - bash session - console tm_scope: text.shell-session ace_mode: sh - + language_id: 347 Shen: type: programming color: "#120F14" extensions: - - .shen + - ".shen" tm_scope: none ace_mode: text - + language_id: 348 Slash: type: programming color: "#007eff" extensions: - - .sl + - ".sl" tm_scope: text.html.slash ace_mode: text - + language_id: 349 Slim: group: HTML type: markup color: "#ff8f77" extensions: - - .slim + - ".slim" tm_scope: text.slim ace_mode: text - + language_id: 350 Smali: type: programming extensions: - - .smali + - ".smali" ace_mode: text tm_scope: source.smali - + language_id: 351 Smalltalk: type: programming color: "#596706" extensions: - - .st - - .cs + - ".st" + - ".cs" aliases: - squeak ace_mode: text - + language_id: 352 Smarty: type: programming extensions: - - .tpl + - ".tpl" ace_mode: smarty tm_scope: text.html.smarty - + language_id: 353 SourcePawn: type: programming color: "#5c7611" aliases: - sourcemod extensions: - - .sp - - .inc - - .sma + - ".sp" + - ".inc" + - ".sma" tm_scope: source.sp ace_mode: text - + language_id: 354 Squirrel: type: programming color: "#800000" extensions: - - .nut + - ".nut" tm_scope: source.c++ ace_mode: c_cpp - + language_id: 355 Stan: type: programming color: "#b2011d" extensions: - - .stan + - ".stan" ace_mode: text tm_scope: source.stan - + language_id: 356 Standard ML: type: programming color: "#dc566d" aliases: - sml extensions: - - .ML - - .fun - - .sig - - .sml + - ".ML" + - ".fun" + - ".sig" + - ".sml" tm_scope: source.ml ace_mode: text - + language_id: 357 Stata: type: programming extensions: - - .do - - .ado - - .doh - - .ihlp - - .mata - - .matah - - .sthlp + - ".do" + - ".ado" + - ".doh" + - ".ihlp" + - ".mata" + - ".matah" + - ".sthlp" ace_mode: text - + language_id: 358 Stylus: type: markup group: CSS extensions: - - .styl + - ".styl" tm_scope: source.stylus ace_mode: stylus - + language_id: 359 SubRip Text: type: data extensions: - - .srt + - ".srt" ace_mode: text tm_scope: text.srt - + language_id: 360 SuperCollider: type: programming color: "#46390b" extensions: - - .sc - - .scd + - ".sc" + - ".scd" interpreters: - sclang - scsynth tm_scope: source.supercollider ace_mode: text - + language_id: 361 Swift: type: programming color: "#ffac45" extensions: - - .swift + - ".swift" ace_mode: text - + language_id: 362 SystemVerilog: type: programming color: "#DAE1C2" extensions: - - .sv - - .svh - - .vh + - ".sv" + - ".svh" + - ".vh" ace_mode: verilog - + language_id: 363 TLA: type: programming extensions: - - .tla + - ".tla" tm_scope: source.tla ace_mode: text - + language_id: 364 TOML: type: data extensions: - - .toml + - ".toml" tm_scope: source.toml ace_mode: toml - + language_id: 365 TXL: type: programming extensions: - - .txl + - ".txl" tm_scope: source.txl ace_mode: text - + language_id: 366 Tcl: type: programming color: "#e4cc98" extensions: - - .tcl - - .adp - - .tm + - ".tcl" + - ".adp" + - ".tm" interpreters: - tclsh - wish ace_mode: tcl - + language_id: 367 Tcsh: type: programming group: Shell extensions: - - .tcsh - - .csh + - ".tcsh" + - ".csh" tm_scope: source.shell ace_mode: sh - + language_id: 368 TeX: type: markup color: "#3D6117" @@ -3806,49 +3804,49 @@ TeX: aliases: - latex extensions: - - .tex - - .aux - - .bbx - - .bib - - .cbx - - .cls - - .dtx - - .ins - - .lbx - - .ltx - - .mkii - - .mkiv - - .mkvi - - .sty - - .toc - + - ".tex" + - ".aux" + - ".bbx" + - ".bib" + - ".cbx" + - ".cls" + - ".dtx" + - ".ins" + - ".lbx" + - ".ltx" + - ".mkii" + - ".mkiv" + - ".mkvi" + - ".sty" + - ".toc" + language_id: 369 Tea: type: markup extensions: - - .tea + - ".tea" tm_scope: source.tea ace_mode: text - + language_id: 370 Terra: type: programming extensions: - - .t + - ".t" color: "#00004c" ace_mode: lua interpreters: - lua - + language_id: 371 Text: type: prose wrap: true aliases: - fundamental extensions: - - .txt - - .fr - - .nb - - .ncl - - .no + - ".txt" + - ".fr" + - ".nb" + - ".ncl" + - ".no" filenames: - COPYING - INSTALL @@ -3863,142 +3861,142 @@ Text: - test.me tm_scope: none ace_mode: text - + language_id: 372 Textile: type: prose ace_mode: textile wrap: true extensions: - - .textile + - ".textile" tm_scope: none - + language_id: 373 Thrift: type: programming tm_scope: source.thrift extensions: - - .thrift + - ".thrift" ace_mode: text - + language_id: 374 Turing: type: programming color: "#cf142b" extensions: - - .t - - .tu + - ".t" + - ".tu" tm_scope: source.turing ace_mode: text - + language_id: 375 Turtle: type: data extensions: - - .ttl + - ".ttl" tm_scope: source.turtle ace_mode: text - + language_id: 376 Twig: type: markup group: HTML extensions: - - .twig + - ".twig" tm_scope: text.html.twig ace_mode: twig - + language_id: 377 TypeScript: type: programming color: "#2b7489" aliases: - ts extensions: - - .ts - - .tsx + - ".ts" + - ".tsx" tm_scope: source.ts ace_mode: typescript - + language_id: 378 Unified Parallel C: type: programming group: C ace_mode: c_cpp color: "#4e3617" extensions: - - .upc + - ".upc" tm_scope: source.c - + language_id: 379 Unity3D Asset: type: data ace_mode: yaml extensions: - - .anim - - .asset - - .mat - - .meta - - .prefab - - .unity + - ".anim" + - ".asset" + - ".mat" + - ".meta" + - ".prefab" + - ".unity" tm_scope: source.yaml - + language_id: 380 Uno: type: programming extensions: - - .uno + - ".uno" ace_mode: csharp tm_scope: source.cs - + language_id: 381 UnrealScript: type: programming color: "#a54c4d" extensions: - - .uc + - ".uc" tm_scope: source.java ace_mode: java - + language_id: 382 UrWeb: type: programming aliases: - Ur/Web - Ur extensions: - - .ur - - .urs + - ".ur" + - ".urs" tm_scope: source.ur ace_mode: text - + language_id: 383 VCL: group: Perl type: programming extensions: - - .vcl + - ".vcl" tm_scope: source.varnish.vcl ace_mode: text - + language_id: 384 VHDL: type: programming color: "#adb2cb" extensions: - - .vhdl - - .vhd - - .vhf - - .vhi - - .vho - - .vhs - - .vht - - .vhw + - ".vhdl" + - ".vhd" + - ".vhf" + - ".vhi" + - ".vho" + - ".vhs" + - ".vht" + - ".vhw" ace_mode: vhdl - + language_id: 385 Vala: type: programming color: "#fbe5cd" extensions: - - .vala - - .vapi + - ".vala" + - ".vapi" ace_mode: vala - + language_id: 386 Verilog: type: programming color: "#b2b7f8" extensions: - - .v - - .veo + - ".v" + - ".veo" ace_mode: verilog - + language_id: 387 VimL: type: programming color: "#199f4b" @@ -4007,104 +4005,104 @@ VimL: - vim - nvim extensions: - - .vim + - ".vim" filenames: - - .nvimrc - - .vimrc + - ".nvimrc" + - ".vimrc" - _vimrc - gvimrc - nvimrc - vimrc ace_mode: text - + language_id: 388 Visual Basic: type: programming color: "#945db7" extensions: - - .vb - - .bas - - .cls - - .frm - - .frx - - .vba - - .vbhtml - - .vbs + - ".vb" + - ".bas" + - ".cls" + - ".frm" + - ".frx" + - ".vba" + - ".vbhtml" + - ".vbs" tm_scope: source.vbnet aliases: - vb.net - vbnet ace_mode: text - + language_id: 389 Volt: type: programming color: "#1F1F1F" extensions: - - .volt + - ".volt" tm_scope: source.d ace_mode: d - + language_id: 390 Vue: type: markup color: "#2c3e50" extensions: - - .vue + - ".vue" tm_scope: text.html.vue ace_mode: html - + language_id: 391 Wavefront Material: type: data extensions: - - .mtl + - ".mtl" tm_scope: source.wavefront.mtl ace_mode: text - + language_id: 392 Wavefront Object: type: data extensions: - - .obj + - ".obj" tm_scope: source.wavefront.obj ace_mode: text - + language_id: 393 Web Ontology Language: type: markup color: "#9cc9dd" extensions: - - .owl + - ".owl" tm_scope: text.xml ace_mode: xml - + language_id: 394 WebIDL: type: programming extensions: - - .webidl + - ".webidl" tm_scope: source.webidl ace_mode: text - + language_id: 395 World of Warcraft Addon Data: type: data extensions: - - .toc + - ".toc" tm_scope: source.toc ace_mode: text - + language_id: 396 X10: type: programming aliases: - xten ace_mode: text extensions: - - .x10 + - ".x10" color: "#4B6BEF" tm_scope: source.x10 - + language_id: 397 XC: type: programming color: "#99DA07" extensions: - - .xc + - ".xc" tm_scope: source.xc ace_mode: c_cpp - + language_id: 398 XML: type: data ace_mode: xml @@ -4113,94 +4111,94 @@ XML: - xsd - wsdl extensions: - - .xml - - .ant - - .axml - - .builds - - .ccxml - - .clixml - - .cproject - - .csl - - .csproj - - .ct - - .dita - - .ditamap - - .ditaval - - .dll.config - - .dotsettings - - .filters - - .fsproj - - .fxml - - .glade - - .gml - - .grxml - - .iml - - .ivy - - .jelly - - .jsproj - - .kml - - .launch - - .mdpolicy - - .mm - - .mod - - .mxml - - .nproj - - .nuspec - - .odd - - .osm - - .pkgproj - - .plist - - .pluginspec - - .props - - .ps1xml - - .psc1 - - .pt - - .rdf - - .resx - - .rss - - .sch - - .scxml - - .sfproj - - .srdf - - .storyboard - - .stTheme - - .sublime-snippet - - .targets - - .tmCommand - - .tml - - .tmLanguage - - .tmPreferences - - .tmSnippet - - .tmTheme - - .ts - - .tsx - - .ui - - .urdf - - .ux - - .vbproj - - .vcxproj - - .vssettings - - .vxml - - .wsdl - - .wsf - - .wxi - - .wxl - - .wxs - - .x3d - - .xacro - - .xaml - - .xib - - .xlf - - .xliff - - .xmi - - .xml.dist - - .xproj - - .xsd - - .xul - - .zcml + - ".xml" + - ".ant" + - ".axml" + - ".builds" + - ".ccxml" + - ".clixml" + - ".cproject" + - ".csl" + - ".csproj" + - ".ct" + - ".dita" + - ".ditamap" + - ".ditaval" + - ".dll.config" + - ".dotsettings" + - ".filters" + - ".fsproj" + - ".fxml" + - ".glade" + - ".gml" + - ".grxml" + - ".iml" + - ".ivy" + - ".jelly" + - ".jsproj" + - ".kml" + - ".launch" + - ".mdpolicy" + - ".mm" + - ".mod" + - ".mxml" + - ".nproj" + - ".nuspec" + - ".odd" + - ".osm" + - ".pkgproj" + - ".plist" + - ".pluginspec" + - ".props" + - ".ps1xml" + - ".psc1" + - ".pt" + - ".rdf" + - ".resx" + - ".rss" + - ".sch" + - ".scxml" + - ".sfproj" + - ".srdf" + - ".storyboard" + - ".stTheme" + - ".sublime-snippet" + - ".targets" + - ".tmCommand" + - ".tml" + - ".tmLanguage" + - ".tmPreferences" + - ".tmSnippet" + - ".tmTheme" + - ".ts" + - ".tsx" + - ".ui" + - ".urdf" + - ".ux" + - ".vbproj" + - ".vcxproj" + - ".vssettings" + - ".vxml" + - ".wsdl" + - ".wsf" + - ".wxi" + - ".wxl" + - ".wxs" + - ".x3d" + - ".xacro" + - ".xaml" + - ".xib" + - ".xlf" + - ".xliff" + - ".xmi" + - ".xml.dist" + - ".xproj" + - ".xsd" + - ".xul" + - ".zcml" filenames: - - .classpath - - .project + - ".classpath" + - ".project" - App.config - NuGet.config - Settings.StyleCop @@ -4208,178 +4206,178 @@ XML: - Web.Release.config - Web.config - packages.config - + language_id: 399 XPages: type: programming extensions: - - .xsp-config - - .xsp.metadata + - ".xsp-config" + - ".xsp.metadata" tm_scope: none ace_mode: xml - + language_id: 400 XProc: type: programming extensions: - - .xpl - - .xproc + - ".xpl" + - ".xproc" tm_scope: text.xml ace_mode: xml - + language_id: 401 XQuery: type: programming color: "#5232e7" extensions: - - .xquery - - .xq - - .xql - - .xqm - - .xqy + - ".xquery" + - ".xq" + - ".xql" + - ".xqm" + - ".xqy" ace_mode: xquery tm_scope: source.xq - + language_id: 402 XS: type: programming extensions: - - .xs + - ".xs" tm_scope: source.c ace_mode: c_cpp - + language_id: 403 XSLT: type: programming aliases: - xsl extensions: - - .xslt - - .xsl + - ".xslt" + - ".xsl" tm_scope: text.xml.xsl ace_mode: xml color: "#EB8CEB" - + language_id: 404 Xojo: type: programming extensions: - - .xojo_code - - .xojo_menu - - .xojo_report - - .xojo_script - - .xojo_toolbar - - .xojo_window + - ".xojo_code" + - ".xojo_menu" + - ".xojo_report" + - ".xojo_script" + - ".xojo_toolbar" + - ".xojo_window" tm_scope: source.vbnet ace_mode: text - + language_id: 405 Xtend: type: programming extensions: - - .xtend + - ".xtend" ace_mode: text - + language_id: 406 YAML: type: data tm_scope: source.yaml aliases: - yml extensions: - - .yml - - .reek - - .rviz - - .sublime-syntax - - .syntax - - .yaml - - .yaml-tmlanguage + - ".yml" + - ".reek" + - ".rviz" + - ".sublime-syntax" + - ".syntax" + - ".yaml" + - ".yaml-tmlanguage" filenames: - - .clang-format + - ".clang-format" ace_mode: yaml - + language_id: 407 YANG: type: data extensions: - - .yang + - ".yang" tm_scope: source.yang ace_mode: text - + language_id: 408 Yacc: type: programming extensions: - - .y - - .yacc - - .yy + - ".y" + - ".yacc" + - ".yy" tm_scope: source.bison ace_mode: text color: "#4B6C4B" - + language_id: 409 Zephir: type: programming color: "#118f9e" extensions: - - .zep + - ".zep" tm_scope: source.php.zephir ace_mode: php - + language_id: 410 Zimpl: type: programming extensions: - - .zimpl - - .zmpl - - .zpl + - ".zimpl" + - ".zmpl" + - ".zpl" tm_scope: none ace_mode: text - + language_id: 411 desktop: type: data extensions: - - .desktop - - .desktop.in + - ".desktop" + - ".desktop.in" tm_scope: source.desktop ace_mode: text - + language_id: 412 eC: type: programming color: "#913960" search_term: ec extensions: - - .ec - - .eh + - ".ec" + - ".eh" tm_scope: source.c.ec ace_mode: text - + language_id: 413 edn: type: data ace_mode: clojure extensions: - - .edn + - ".edn" tm_scope: source.clojure - + language_id: 414 fish: type: programming group: Shell interpreters: - fish extensions: - - .fish + - ".fish" tm_scope: source.fish ace_mode: text - + language_id: 415 mupad: type: programming extensions: - - .mu + - ".mu" ace_mode: text - + language_id: 416 nesC: type: programming color: "#94B0C7" extensions: - - .nc + - ".nc" ace_mode: text tm_scope: source.nesc - + language_id: 417 ooc: type: programming color: "#b0b77e" extensions: - - .ooc + - ".ooc" ace_mode: text - + language_id: 418 reStructuredText: type: prose wrap: true @@ -4387,20 +4385,20 @@ reStructuredText: aliases: - rst extensions: - - .rst - - .rest - - .rest.txt - - .rst.txt + - ".rst" + - ".rest" + - ".rest.txt" + - ".rst.txt" ace_mode: text - + language_id: 419 wisp: type: programming ace_mode: clojure color: "#7582D1" extensions: - - .wisp + - ".wisp" tm_scope: source.clojure - + language_id: 420 xBase: type: programming color: "#403a40" @@ -4409,8 +4407,9 @@ xBase: - clipper - foxpro extensions: - - .prg - - .ch - - .prw + - ".prg" + - ".ch" + - ".prw" tm_scope: source.harbour ace_mode: text + language_id: 421 diff --git a/script/set-language-ids b/script/set-language-ids new file mode 100755 index 0000000000..ecbe1e764d --- /dev/null +++ b/script/set-language-ids @@ -0,0 +1,82 @@ +#!/usr/bin/env ruby +require 'yaml' +require 'pry' + +header = <<-EOF +# Defines all Languages known to GitHub. +# +# type - Either data, programming, markup, prose, or nil +# aliases - An Array of additional aliases (implicitly +# includes name.downcase) +# ace_mode - A String name of the Ace Mode used for highlighting whenever +# a file is edited. This must match one of the filenames in http://git.io/3XO_Cg. +# Use "text" if a mode does not exist. +# wrap - Boolean wrap to enable line wrapping (default: false) +# extensions - An Array of associated extensions (the first one is +# considered the primary extension, the others should be +# listed alphabetically) +# interpreters - An Array of associated interpreters +# searchable - Boolean flag to enable searching (defaults to true) +# search_term - Deprecated: Some languages may be indexed under a +# different alias. Avoid defining new exceptions. +# language_id - Integer used as a language-name-independent indexed field so that we can rename +# languages in Linguist without reindexing all the code on GitHub. Must not be +# changed for existing languages without the explicit permission of GitHub staff. +# color - CSS hex color to represent the language. +# tm_scope - The TextMate scope that represents this programming +# language. This should match one of the scopes listed in +# the grammars.yml file. Use "none" if there is no grammar +# for this language. +# group - Name of the parent language. Languages in a group are counted +# in the statistics as the parent language. +# +# Any additions or modifications (even trivial) should have corresponding +# test changes in `test/test_blob.rb`. +# +# Please keep this list alphabetized. Capitalization comes before lowercase. + +EOF + +generated = true if ARGV[0] == "--force" +update = true if ARGV[0] == "--update" + +if generated + puts "You're regenerating all of the language_id attributes for all Linguist " + puts "languages defined in languages.yml. This is almost certainly NOT what" + puts "you meant to do!" + + language_index = 0 + + languages = YAML.load(File.read("lib/linguist/languages.yml")) + languages.each do |name, vals| + vals.merge!('language_id' => language_index) + language_index += 1 + end + + File.write("lib/linguist/languages.yml", header + YAML.dump(languages)) +elsif update + puts "Adding new language_id attributes to languages.yml that don't have one set" + languages = YAML.load(File.read("lib/linguist/languages.yml")) + + # First grab the maximum language_id + language_ids = [] + languages.each { |name, vals| language_ids << vals['language_id'] if vals.has_key?('language_id')} + max_language_id = language_ids.max + puts "Current maximum language_id is #{max_language_id}" + + missing_count = 0 + language_index = max_language_id + + languages.each do |name, vals| + unless vals.has_key?('language_id') + language_index += 1 + missing_count += 1 + vals.merge!('language_id' => language_index) + end + end + + File.write("lib/linguist/languages.yml", header + YAML.dump(languages)) + puts "Updated language_id attributes for #{missing_count} languages" +else + puts "Whatever you want me to do, I can't figure it out. Giving up..." +end From 7cda13afcb85ead78acbb71488c808cbe6e3217f Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 12 Sep 2016 22:02:49 -0700 Subject: [PATCH 0062/1214] A Language should know about it's language_id --- lib/linguist/language.rb | 15 +++++++++++++++ test/test_language.rb | 8 ++++++++ 2 files changed, 23 insertions(+) diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index 9498e5a8b0..44c08401e2 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -289,6 +289,9 @@ def initialize(attributes = {}) # Set legacy search term @search_term = attributes[:search_term] || default_alias_name + # Set the language_id + @language_id = attributes[:language_id] + # Set extensions or default to []. @extensions = attributes[:extensions] || [] @interpreters = attributes[:interpreters] || [] @@ -351,6 +354,17 @@ def initialize(attributes = {}) # Returns the name String attr_reader :search_term + # Public: Get language_id (used in GitHub search) + # + # Examples + # + # # => "1" + # # => "2" + # # => "3" + # + # Returns the integer language_id + attr_reader :language_id + # Public: Get the name of a TextMate-compatible scope # # Returns the scope @@ -547,6 +561,7 @@ def inspect :group_name => options['group'], :searchable => options.fetch('searchable', true), :search_term => options['search_term'], + :language_id => options['language_id'], :extensions => Array(options['extensions']), :interpreters => options['interpreters'].sort, :filenames => options['filenames'], diff --git a/test/test_language.rb b/test/test_language.rb index 5613f235b9..c743f089af 100644 --- a/test/test_language.rb +++ b/test/test_language.rb @@ -386,6 +386,14 @@ def test_all_languages_have_type assert missing.empty?, message end + def test_all_languages_have_a_language_id_set + missing = Language.all.select { |language| language.language_id.nil? } + + message = "The following languages do not have a language_id listed in languages.yml. Please add language_id fields for all new languages.\n" + missing.each { |language| message << "#{language.name}\n" } + assert missing.empty?, message + end + def test_all_languages_have_a_valid_ace_mode ace_fixture_path = File.join('test', 'fixtures', 'ace_modes.json') skip("No ace_modes.json file") unless File.exist?(ace_fixture_path) From 1f43664a519de7341199cbc43393e3e28d264e16 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 12 Sep 2016 22:10:59 -0700 Subject: [PATCH 0063/1214] Adding some tests for some known language_ids --- test/test_language.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/test_language.rb b/test/test_language.rb index c743f089af..3db33b54bd 100644 --- a/test/test_language.rb +++ b/test/test_language.rb @@ -67,6 +67,16 @@ def test_find_by_alias assert_nil Language.find_by_alias(nil) end + # Note these are set by script/set-language-ids. If these tests fail then someone + # has changed the language_id fields set in languages.yml which is almost certainly + # not what you want to happen (these fields are used in GitHub's search indexes) + def test_language_ids + assert_equal 4, Language['ANTLR'].language_id + assert_equal 54, Language['Ceylon'].language_id + assert_equal 326, Language['Ruby'].language_id + assert_equal 421, Language['xBase'].language_id + end + def test_groups # Test a couple identity cases assert_equal Language['Perl'], Language['Perl'].group From b71bf19e37f9164609bdf4961b7503fdca69c602 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Tue, 13 Sep 2016 11:04:49 +0200 Subject: [PATCH 0064/1214] Fix Elm highlighting Elm grammar repository contains several YAML files with a source.elm scope We need to restrict the path to the Syntaxes directory to make sure we select the appropriate YAML file --- grammars.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grammars.yml b/grammars.yml index 08d15e64c2..e51e884868 100755 --- a/grammars.yml +++ b/grammars.yml @@ -20,7 +20,7 @@ vendor/grammars/ColdFusion: - text.html.cfm vendor/grammars/Docker.tmbundle: - source.dockerfile -vendor/grammars/Elm: +vendor/grammars/Elm/Syntaxes: - source.elm - text.html.mediawiki.elm-build-output - text.html.mediawiki.elm-documentation From 65201b322a8965b2c6a682057c89d2ccbb01a43d Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Tue, 13 Sep 2016 13:10:07 +0200 Subject: [PATCH 0065/1214] Test the uniqueness of language ids --- test/test_language.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test_language.rb b/test/test_language.rb index 3db33b54bd..618da72676 100644 --- a/test/test_language.rb +++ b/test/test_language.rb @@ -404,6 +404,14 @@ def test_all_languages_have_a_language_id_set assert missing.empty?, message end + def test_all_language_id_are_unique + duplicates = Language.all.group_by{ |language| language.language_id }.select { |k, v| v.size > 1 }.map(&:first) + + message = "The following language_id are used several times in languages.yml. Please use script/set-language-ids --update as per the contribution guidelines.\n" + duplicates.each { |language_id| message << "#{language_id}\n" } + assert duplicates.empty?, message + end + def test_all_languages_have_a_valid_ace_mode ace_fixture_path = File.join('test', 'fixtures', 'ace_modes.json') skip("No ace_modes.json file") unless File.exist?(ace_fixture_path) From 3310d925b68d0336a8158afb567023b52e7a7db0 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Tue, 13 Sep 2016 13:33:29 +0200 Subject: [PATCH 0066/1214] Lock awk grammar to last working version --- .gitmodules | 2 +- vendor/grammars/awk-sublime | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index f45edd4de3..1cacfda221 100644 --- a/.gitmodules +++ b/.gitmodules @@ -12,7 +12,7 @@ url = https://github.com/Drako/SublimeBrainfuck [submodule "vendor/grammars/awk-sublime"] path = vendor/grammars/awk-sublime - url = https://github.com/JohnNilsson/awk-sublime + url = https://github.com/github-linguist/awk-sublime [submodule "vendor/grammars/Sublime-SQF-Language"] path = vendor/grammars/Sublime-SQF-Language url = https://github.com/JonBons/Sublime-SQF-Language diff --git a/vendor/grammars/awk-sublime b/vendor/grammars/awk-sublime index 792d921531..72b487a104 160000 --- a/vendor/grammars/awk-sublime +++ b/vendor/grammars/awk-sublime @@ -1 +1 @@ -Subproject commit 792d9215315758c505a44a325b910bedc87bd10b +Subproject commit 72b487a1046d86b8a195b38fa18802d2abe30370 From 8a622823b013a2191e660b1695607a36176b3afb Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Tue, 13 Sep 2016 13:47:03 +0200 Subject: [PATCH 0067/1214] Lock NSIS grammar to last working version --- .gitmodules | 2 +- vendor/grammars/NSIS | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 1cacfda221..011e6e4f7b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -30,7 +30,7 @@ url = https://github.com/SublimeText/ColdFusion [submodule "vendor/grammars/NSIS"] path = vendor/grammars/NSIS - url = https://github.com/SublimeText/NSIS + url = https://github.com/github-linguist/NSIS [submodule "vendor/grammars/NimLime"] path = vendor/grammars/NimLime url = https://github.com/Varriount/NimLime diff --git a/vendor/grammars/NSIS b/vendor/grammars/NSIS index 171bb32ae1..696d06cb2b 160000 --- a/vendor/grammars/NSIS +++ b/vendor/grammars/NSIS @@ -1 +1 @@ -Subproject commit 171bb32ae1bade20f933675b046a101f26970123 +Subproject commit 696d06cb2bd0dfc619c989c746e4b43eea689161 From b4a77abd82d9613f35790bc8e0b251ffd028542b Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Tue, 13 Sep 2016 13:50:57 +0200 Subject: [PATCH 0068/1214] Lock SourcePawn grammar to last working version --- .gitmodules | 2 +- vendor/grammars/sourcepawn | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 011e6e4f7b..fa4fd377dc 100644 --- a/.gitmodules +++ b/.gitmodules @@ -667,7 +667,7 @@ url = https://github.com/goblindegook/sublime-text-pig-latin [submodule "vendor/grammars/sourcepawn"] path = vendor/grammars/sourcepawn - url = https://github.com/austinwagner/sublime-sourcepawn + url = https://github.com/github-linguist/sublime-sourcepawn [submodule "vendor/grammars/gdscript"] path = vendor/grammars/gdscript url = https://github.com/beefsack/GDScript-sublime diff --git a/vendor/grammars/sourcepawn b/vendor/grammars/sourcepawn index 294d3ba097..d5e1022a4e 160000 --- a/vendor/grammars/sourcepawn +++ b/vendor/grammars/sourcepawn @@ -1 +1 @@ -Subproject commit 294d3ba0972f0456d9d3f554dcd8f97b51aa4d40 +Subproject commit d5e1022a4e09cdba32b416e682a2c31c72240733 From a3227c2c27f9a3b76ebae727c3eb2386e3aa3582 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Tue, 13 Sep 2016 11:09:05 -0700 Subject: [PATCH 0069/1214] Adding basic find_by_id functionality to Language --- lib/linguist/language.rb | 24 ++++++++++++++++++++---- test/test_language.rb | 6 ++++++ 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index 44c08401e2..7ae48b17ff 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -20,10 +20,11 @@ module Linguist # # Languages are defined in `lib/linguist/languages.yml`. class Language - @languages = [] - @index = {} - @name_index = {} - @alias_index = {} + @languages = [] + @index = {} + @name_index = {} + @alias_index = {} + @language_id_index = {} @extension_index = Hash.new { |h,k| h[k] = [] } @interpreter_index = Hash.new { |h,k| h[k] = [] } @@ -84,6 +85,8 @@ def self.create(attributes = {}) @filename_index[filename] << language end + @language_id_index[language.language_id] = language + language end @@ -193,6 +196,19 @@ def self.find_by_interpreter(interpreter) @interpreter_index[interpreter] end + # Public: Look up Languages by its language_id. + # + # language_id - Integer of language_id + # + # Examples + # + # Language.find_by_id(100) + # # => [#] + # + # Returns the matching Language + def self.find_by_id(language_id) + @language_id_index[language_id.to_i] + end # Public: Look up Language by its name. # diff --git a/test/test_language.rb b/test/test_language.rb index 3db33b54bd..584304558c 100644 --- a/test/test_language.rb +++ b/test/test_language.rb @@ -77,6 +77,12 @@ def test_language_ids assert_equal 421, Language['xBase'].language_id end + def test_find_by_id + assert_equal Language['Elixir'], Language.find_by_id(100) + assert_equal Language['Ruby'], Language.find_by_id(326) + assert_equal Language['xBase'], Language.find_by_id(421) + end + def test_groups # Test a couple identity cases assert_equal Language['Perl'], Language['Perl'].group From a53423b6e070603006f790d9d480ce0542da05df Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Tue, 13 Sep 2016 11:33:20 -0700 Subject: [PATCH 0070/1214] Grammar updates --- vendor/grammars/language-javascript | 2 +- vendor/grammars/language-shellscript | 2 +- vendor/grammars/sublime-autoit | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vendor/grammars/language-javascript b/vendor/grammars/language-javascript index c30e13f94a..b3d2bb649a 160000 --- a/vendor/grammars/language-javascript +++ b/vendor/grammars/language-javascript @@ -1 +1 @@ -Subproject commit c30e13f94a3e5d725afb0acc70e05774a6c0026b +Subproject commit b3d2bb649a2a2b2f1e8bf391bcd50c603ac1e127 diff --git a/vendor/grammars/language-shellscript b/vendor/grammars/language-shellscript index 6b936daeca..6d66ca58c0 160000 --- a/vendor/grammars/language-shellscript +++ b/vendor/grammars/language-shellscript @@ -1 +1 @@ -Subproject commit 6b936daeca50d0551a44b0d014e9debbf02516e9 +Subproject commit 6d66ca58c030a9509b9e01ce57456511c529eb6a diff --git a/vendor/grammars/sublime-autoit b/vendor/grammars/sublime-autoit index eeca503056..6d87c55fd0 160000 --- a/vendor/grammars/sublime-autoit +++ b/vendor/grammars/sublime-autoit @@ -1 +1 @@ -Subproject commit eeca5030567213210108fb24d123399575fd94ae +Subproject commit 6d87c55fd089950a456c864ce50f7d227f2bb06a From 6841b4d25994bfc5b8cd638a64867ecfa0401a8d Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Tue, 13 Sep 2016 11:37:42 -0700 Subject: [PATCH 0071/1214] Updating to v4.8.11 --- lib/linguist/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/version.rb b/lib/linguist/version.rb index 0b373538a2..cc20528a5e 100644 --- a/lib/linguist/version.rb +++ b/lib/linguist/version.rb @@ -1,3 +1,3 @@ module Linguist - VERSION = "4.8.10" + VERSION = "4.8.11" end From 65491d460e3eb9905cf0e6712a95f28d247cf49f Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Wed, 14 Sep 2016 22:49:00 +0200 Subject: [PATCH 0072/1214] Remove support for .sublime-syntax --- script/convert-grammars | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/script/convert-grammars b/script/convert-grammars index e267907d96..2155827f48 100755 --- a/script/convert-grammars +++ b/script/convert-grammars @@ -42,7 +42,7 @@ class DirectoryPackage case File.extname(path.downcase) when '.plist' path.split('/')[-2] == 'Syntaxes' - when '.tmlanguage', '.yaml-tmlanguage', '.sublime-syntax' + when '.tmlanguage', '.yaml-tmlanguage' true when '.cson', '.json' path.split('/')[-2] == 'grammars' @@ -114,7 +114,7 @@ class SVNPackage def fetch(tmp_dir) `svn export -q "#{url}/Syntaxes" "#{tmp_dir}/Syntaxes"` raise "Failed to export SVN repository: #{url}: #{$?.to_s}" unless $?.success? - Dir["#{tmp_dir}/Syntaxes/*.{plist,tmLanguage,tmlanguage,YAML-tmLanguage,sublime-syntax}"] + Dir["#{tmp_dir}/Syntaxes/*.{plist,tmLanguage,tmlanguage,YAML-tmLanguage}"] end end @@ -148,7 +148,7 @@ def load_grammar(path) case File.extname(path.downcase) when '.plist', '.tmlanguage' Plist::parse_xml(path) - when '.yaml-tmlanguage', '.sublime-syntax' + when '.yaml-tmlanguage' content = File.read(path) # Attempt to parse YAML file even if it has a YAML 1.2 header if content.lines[0] =~ /^%YAML[ :]1\.2/ @@ -180,7 +180,7 @@ def load_grammars(tmp_dir, source, all_scopes) else SingleFile.new(source) end - elsif source.end_with?('.tmLanguage', '.plist', '.YAML-tmLanguage', '.sublime-syntax') + elsif source.end_with?('.tmLanguage', '.plist', '.YAML-tmLanguage') SingleGrammar.new(source) elsif source.start_with?('https://github.com') GitHubPackage.new(source) From 600115afedd9d9f13ddc0129d6bddb86013731c9 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 14 Sep 2016 16:01:19 -0700 Subject: [PATCH 0073/1214] Bumping to v4.8.12 --- lib/linguist/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/version.rb b/lib/linguist/version.rb index cc20528a5e..1fbf952ce4 100644 --- a/lib/linguist/version.rb +++ b/lib/linguist/version.rb @@ -1,3 +1,3 @@ module Linguist - VERSION = "4.8.11" + VERSION = "4.8.12" end From cd288a8ee446938d5e34a62bbd07aee59a34ef6c Mon Sep 17 00:00:00 2001 From: Alhadis Date: Thu, 15 Sep 2016 17:06:59 +1000 Subject: [PATCH 0074/1214] Add .gnus, .viper and Project.ede as Emacs Lisp extensions --- lib/linguist/languages.yml | 3 +++ samples/Emacs Lisp/filenames/.gnus | 20 ++++++++++++++ samples/Emacs Lisp/filenames/.viper | 10 +++++++ samples/Emacs Lisp/filenames/Project.ede | 34 ++++++++++++++++++++++++ 4 files changed, 67 insertions(+) create mode 100644 samples/Emacs Lisp/filenames/.gnus create mode 100644 samples/Emacs Lisp/filenames/.viper create mode 100644 samples/Emacs Lisp/filenames/Project.ede diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 861a7efa6b..495d25e1f3 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1039,7 +1039,10 @@ Emacs Lisp: filenames: - ".emacs" - ".emacs.desktop" + - ".gnus" - ".spacemacs" + - ".viper" + - "Project.ede" extensions: - ".el" - ".emacs" diff --git a/samples/Emacs Lisp/filenames/.gnus b/samples/Emacs Lisp/filenames/.gnus new file mode 100644 index 0000000000..bfd859dd6f --- /dev/null +++ b/samples/Emacs Lisp/filenames/.gnus @@ -0,0 +1,20 @@ +(setq user-full-name "Alhadis") +(setq user-mail-address "fake.account@gmail.com") + +(auto-image-file-mode) +(setq mm-inline-large-images t) +(add-to-list 'mm-attachment-override-types "image/*") + +(setq gnus-select-method + '(nnimap "gmail" + (nnimap-address "imap.gmail.com") + (nnimap-server-port 777) + (nnimap-stream ssl))) + +(setq message-send-mail-function 'smtpmail-send-it + smtpmail-starttls-credentials '(("smtp.gmail.com" 600 nil nil)) + smtpmail-auth-credentials '(("smtp.gmail.com" 700 "me@lisp.com" nil)) + smtpmail-default-smtp-server "smtp.gmail.com" + smtpmail-smtp-server "smtp.gmail.com" + smtpmail-smtp-service 800 + setq gnus-ignored-from-addresses "^from\\.Telstra[ \t\r\n]+Thanks") diff --git a/samples/Emacs Lisp/filenames/.viper b/samples/Emacs Lisp/filenames/.viper new file mode 100644 index 0000000000..c3eeb65882 --- /dev/null +++ b/samples/Emacs Lisp/filenames/.viper @@ -0,0 +1,10 @@ +(setq viper-inhibit-startup-message 't) +(setq viper-expert-level '5) + +; Key bindings +(define-key viper-vi-global-user-map "\C-d" 'end-of-line) + +; Return to top of window +(defun my-viper-return-to-top () + (interactive) + (beginning-of-buffer)) diff --git a/samples/Emacs Lisp/filenames/Project.ede b/samples/Emacs Lisp/filenames/Project.ede new file mode 100644 index 0000000000..36a0c8bd83 --- /dev/null +++ b/samples/Emacs Lisp/filenames/Project.ede @@ -0,0 +1,34 @@ +;; Object EDE +(ede-proj-project "Linguist" + :name "Linguist" + :version "4.9" + :file "Project.ede" + :targets (list + (ede-proj-target-elisp-autoloads "autoloads" + :name "autoloads" + :path "test/samples/Emacs Lisp" + :autoload-file "dude.el" + ) + (ede-proj-target-elisp "init" + :name "init" + :path "" + :source '("ede-load.el" "wait-what.el") + :compiler 'ede-emacs-preload-compiler + :pre-load-packages '("sample-names") + ) + (ede-proj-target-elisp "what" + :name "the" + :path "" + :source '("h.el" "am-i-writing.el") + :versionsource '("hell.el") + :compiler 'ede-emacs-preload-compiler + :aux-packages '("what" "the" "hell-files" "am-i-writing") + ) + ) + :web-site-url "https://github.com/github/linguist" + :web-site-directory "../" + :web-site-file "CONTRIBUTING.md" + :ftp-upload-site "/ftp@git.hub.com:/madeup" + :configuration-variables 'nil + :metasubproject 't + ) From 81ca6e776662312881b0bd1391ed495e09871b44 Mon Sep 17 00:00:00 2001 From: Alhadis Date: Thu, 15 Sep 2016 18:57:13 +1000 Subject: [PATCH 0075/1214] Add "abbrev_defs" and "_emacs" as Elisp filenames --- lib/linguist/languages.yml | 3 + samples/Emacs Lisp/filenames/.abbrev_defs | 6 ++ samples/Emacs Lisp/filenames/_emacs | 70 +++++++++++++++++++++++ samples/Emacs Lisp/filenames/abbrev_defs | 8 +++ 4 files changed, 87 insertions(+) create mode 100644 samples/Emacs Lisp/filenames/.abbrev_defs create mode 100644 samples/Emacs Lisp/filenames/_emacs create mode 100644 samples/Emacs Lisp/filenames/abbrev_defs diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 495d25e1f3..8b3d39e5ff 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1037,12 +1037,15 @@ Emacs Lisp: - elisp - emacs filenames: + - ".abbrev_defs" - ".emacs" - ".emacs.desktop" - ".gnus" - ".spacemacs" - ".viper" - "Project.ede" + - "_emacs" + - "abbrev_defs" extensions: - ".el" - ".emacs" diff --git a/samples/Emacs Lisp/filenames/.abbrev_defs b/samples/Emacs Lisp/filenames/.abbrev_defs new file mode 100644 index 0000000000..dc29dfde0f --- /dev/null +++ b/samples/Emacs Lisp/filenames/.abbrev_defs @@ -0,0 +1,6 @@ +(define-abbrev-table 'c-mode-abbrev-table '( + )) +(define-abbrev-table 'fundamental-mode-abbrev-table '( + ("TM" "™" nil 0) + ("(R)" "®" nil 0) + ("C=" "€" nil 0))) diff --git a/samples/Emacs Lisp/filenames/_emacs b/samples/Emacs Lisp/filenames/_emacs new file mode 100644 index 0000000000..4968f8ebda --- /dev/null +++ b/samples/Emacs Lisp/filenames/_emacs @@ -0,0 +1,70 @@ +;; UTF-8 support +;; (set-language-environment "UTF-8") +(setenv "LANG" "en_AU.UTF-8") +(setenv "LC_ALL" "en_AU.UTF-8") +(setq default-tab-width 4) + + +;;; Function to load all ".el" files in ~/.emacs.d/config +(defun load-directory (directory) + "Recursively load all Emacs Lisp files in a directory." + (dolist (element (directory-files-and-attributes directory nil nil nil)) + (let* ((path (car element)) + (fullpath (concat directory "/" path)) + (isdir (car (cdr element))) + (ignore-dir (or (string= path ".") (string= path "..")))) + (cond + ((and (eq isdir t) (not ignore-dir)) + (load-directory fullpath)) + ((and (eq isdir nil) (string= (substring path -3) ".el")) + (load (file-name-sans-extension fullpath))))))) + +;; Tell Emacs we'd like to use Hunspell for spell-checking +(setq ispell-program-name (executable-find "hunspell")) + +;; Load Homebrew-installed packages +(let ((default-directory "/usr/local/share/emacs/site-lisp/")) + (normal-top-level-add-subdirs-to-load-path)) +(load "aggressive-indent") +(add-hook 'emacs-lisp-mode-hook #'aggressive-indent-mode) +(autoload 'rust-mode "rust-mode" nil t) +(add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode)) + +;; Load Git-related syntax highlighting +(add-to-list 'load-path "~/.emacs.d/lisp/") +(load "git-modes") +(load "git-commit") + +;; Keybindings +(global-set-key (kbd "C-u") (lambda () + (interactive) + (kill-line 0))) + +;; Show cursor's current column number +(setq column-number-mode t) + +;; Disable autosave +(setq auto-save-default nil) + +;; Use a single directory for storing backup files +(setq backup-directory-alist `(("." . "~/.emacs.d/auto-save-list"))) +(setq backup-by-copying t) +(setq delete-old-versions t + kept-new-versions 6 + kept-old-versions 2 + version-control t) + +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(blink-cursor-mode nil) + '(column-number-mode t) + '(show-paren-mode t)) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) diff --git a/samples/Emacs Lisp/filenames/abbrev_defs b/samples/Emacs Lisp/filenames/abbrev_defs new file mode 100644 index 0000000000..87dfad8c6f --- /dev/null +++ b/samples/Emacs Lisp/filenames/abbrev_defs @@ -0,0 +1,8 @@ +(define-abbrev-table 'fundamental-mode-abbrev-table '( + ("cat" "Concatenate" nil 0) + ("WTF" "World Trade Federation " nil 0) + ("rtbtm" "Read that back to me" nil 0))) + +(define-abbrev-table 'shell-script-mode-abbrev-table '( + ("brake", "bundle rake exec" nil 0) + ("pls", "warning: setting Encoding.default_external"))) From 00efd6a463d198ae5b3c0482fb66e9f7cb71e7cd Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Thu, 15 Sep 2016 19:24:53 +0200 Subject: [PATCH 0076/1214] Add FORTRAN keyword "data" to .f and .for heuristics. (#3218) bug-185631.f sample from OpenFortranProject; BSD license. --- lib/linguist/heuristics.rb | 2 +- samples/FORTRAN/bug-185631.f | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 samples/FORTRAN/bug-185631.f diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index ea3823e9a1..1d5196f49b 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -144,7 +144,7 @@ def call(data) end end - fortran_rx = /^([c*][^abd-z]| (subroutine|program|end)\s|\s*!)/i + fortran_rx = /^([c*][^abd-z]| (subroutine|program|end|data)\s|\s*!)/i disambiguate ".f" do |data| if /^: /.match(data) diff --git a/samples/FORTRAN/bug-185631.f b/samples/FORTRAN/bug-185631.f new file mode 100644 index 0000000000..abdf87b049 --- /dev/null +++ b/samples/FORTRAN/bug-185631.f @@ -0,0 +1,6 @@ +! Codes/HYCOM/hycom/ATLb2.00/src_2.0.01_22_one/ + real onemu, twomu + data onemu/0.0098/ + data twomu/1./ + data threemu/0.e9/ + end From 5bc88814e2a88c919a95eaf6df6f797cee9d973e Mon Sep 17 00:00:00 2001 From: Alhadis Date: Fri, 16 Sep 2016 02:47:26 +1000 Subject: [PATCH 0077/1214] Swap grammar used for Vimscript highlighting --- .gitmodules | 6 ++--- grammars.yml | 4 ++-- lib/linguist/languages.yml | 1 + vendor/grammars/Sublime-VimL | 1 - vendor/grammars/language-viml | 1 + vendor/licenses/grammar/language-viml.txt | 27 +++++++++++++++++++++++ 6 files changed, 34 insertions(+), 6 deletions(-) delete mode 160000 vendor/grammars/Sublime-VimL create mode 160000 vendor/grammars/language-viml create mode 100644 vendor/licenses/grammar/language-viml.txt diff --git a/.gitmodules b/.gitmodules index fa4fd377dc..cbf7a60290 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,9 +22,9 @@ [submodule "vendor/grammars/Sublime-REBOL"] path = vendor/grammars/Sublime-REBOL url = https://github.com/Oldes/Sublime-REBOL -[submodule "vendor/grammars/Sublime-VimL"] - path = vendor/grammars/Sublime-VimL - url = https://github.com/SalGnt/Sublime-VimL +[submodule "vendor/grammars/language-viml"] + path = vendor/grammars/language-viml + url = https://github.com/Alhadis/language-viml [submodule "vendor/grammars/ColdFusion"] path = vendor/grammars/ColdFusion url = https://github.com/SublimeText/ColdFusion diff --git a/grammars.yml b/grammars.yml index e51e884868..3a38ca965c 100755 --- a/grammars.yml +++ b/grammars.yml @@ -103,8 +103,6 @@ vendor/grammars/Sublime-SQF-Language: vendor/grammars/Sublime-Text-2-OpenEdge-ABL: - source.abl - text.html.abl -vendor/grammars/Sublime-VimL: -- source.viml vendor/grammars/SublimeBrainfuck: - source.bf vendor/grammars/SublimeClarion: @@ -414,6 +412,8 @@ vendor/grammars/language-toc-wow: - source.toc vendor/grammars/language-turing: - source.turing +vendor/grammars/language-viml: +- source.viml vendor/grammars/language-wavefront: - source.wavefront.mtl - source.wavefront.obj diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 861a7efa6b..4919a9ab77 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -4001,6 +4001,7 @@ VimL: type: programming color: "#199f4b" search_term: vim + tm_scope: source.viml aliases: - vim - nvim diff --git a/vendor/grammars/Sublime-VimL b/vendor/grammars/Sublime-VimL deleted file mode 160000 index b453aff6f7..0000000000 --- a/vendor/grammars/Sublime-VimL +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b453aff6f783769b6b895986da605a2db0db7379 diff --git a/vendor/grammars/language-viml b/vendor/grammars/language-viml new file mode 160000 index 0000000000..ccdaff4535 --- /dev/null +++ b/vendor/grammars/language-viml @@ -0,0 +1 @@ +Subproject commit ccdaff4535b5720e9a89460afcc7b8dc65f46d27 diff --git a/vendor/licenses/grammar/language-viml.txt b/vendor/licenses/grammar/language-viml.txt new file mode 100644 index 0000000000..0bb64e03c1 --- /dev/null +++ b/vendor/licenses/grammar/language-viml.txt @@ -0,0 +1,27 @@ +--- +type: grammar +name: language-viml +license: mit +--- +The MIT License (MIT) + +Copyright (c) 2014-2016 Evan Hahn +Copyright (c) 2016 John Gardner + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. From 5fd8d718582480bd93ac19b612bb91e6351b76ea Mon Sep 17 00:00:00 2001 From: Alhadis Date: Fri, 16 Sep 2016 06:17:16 +1000 Subject: [PATCH 0078/1214] Remove license for old grammar --- vendor/licenses/grammar/Sublime-VimL.txt | 26 ------------------------ 1 file changed, 26 deletions(-) delete mode 100644 vendor/licenses/grammar/Sublime-VimL.txt diff --git a/vendor/licenses/grammar/Sublime-VimL.txt b/vendor/licenses/grammar/Sublime-VimL.txt deleted file mode 100644 index fe443d3eba..0000000000 --- a/vendor/licenses/grammar/Sublime-VimL.txt +++ /dev/null @@ -1,26 +0,0 @@ ---- -type: grammar -name: Sublime-VimL -license: mit ---- -The MIT License (MIT) - -Copyright (c) 2014 Max Vasiliev, Salvatore Gentile - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. From 697380336c980420f4ea1038cc8b0b6287f015ff Mon Sep 17 00:00:00 2001 From: Alhadis Date: Sat, 17 Sep 2016 19:45:43 +1000 Subject: [PATCH 0079/1214] Revise pattern for Emacs modeline detection This is a rewrite of the regex that handles Emacs modeline matching. The current one is a little flaky, causing some files to be misclassified as "E", among other things. It's worth noting malformed modelines can still change a file's language in Emacs. Provided the -*- delimiters are intact, and the mode's name is decipherable, Emacs will set the appropriate language mode *and* display a warning about a malformed modeline: -*- foo-bar mode: ruby -*- # Malformed, but understandable -*- mode: ruby--*- # Completely invalid The new pattern accommodates this leniency, making no effort to validate a modeline's syntax beyond readable mode-names. In other words, if Emacs accepts certain errors, we should too. --- lib/linguist/strategy/modeline.rb | 31 ++++++++++++++++++- .../Data/Modelines/seeplusplusEmacs10 | 3 ++ .../Data/Modelines/seeplusplusEmacs11 | 1 + .../Data/Modelines/seeplusplusEmacs12 | 1 + test/test_modelines.rb | 6 ++++ 5 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 test/fixtures/Data/Modelines/seeplusplusEmacs10 create mode 100644 test/fixtures/Data/Modelines/seeplusplusEmacs11 create mode 100644 test/fixtures/Data/Modelines/seeplusplusEmacs12 diff --git a/lib/linguist/strategy/modeline.rb b/lib/linguist/strategy/modeline.rb index 4e16a03cea..56b33aae2e 100644 --- a/lib/linguist/strategy/modeline.rb +++ b/lib/linguist/strategy/modeline.rb @@ -1,7 +1,36 @@ module Linguist module Strategy class Modeline - EMACS_MODELINE = /-\*-\s*(?:(?!mode)[\w-]+\s*:\s*(?:[\w+-]+)\s*;?\s*)*(?:mode\s*:)?\s*([\w+-]+)\s*(?:;\s*(?!mode)[\w-]+\s*:\s*[\w+-]+\s*)*;?\s*-\*-/i + EMACS_MODELINE = / + -\*- + (?: + # Short form: `-*- ruby -*-` + \s* (?= [^:;\s]+ \s* -\*-) + | + # Longer form: `-*- foo:bar; mode: ruby; -*-` + (?: + .*? # Preceding variables: `-*- foo:bar bar:baz;` + [;\s] # Which are delimited by spaces or semicolons + | + (?<=-\*-) # Not preceded by anything: `-*-mode:ruby-*-` + ) + mode # Major mode indicator + \s*:\s* # Allow whitespace around colon: `mode : ruby` + ) + ([^:;\s]+) # Name of mode + + # Ensure the mode is terminated correctly + (?= + # Followed by semicolon or whitespace + [\s;] + | + # Touching the ending sequence: `ruby-*-` + (? Date: Mon, 19 Sep 2016 22:03:57 +0300 Subject: [PATCH 0080/1214] add support for MQL4 and MQL5 --- .gitmodules | 3 + grammars.yml | 2 + lib/linguist/languages.yml | 18 + samples/MQL4/header-sample.mqh | 47 + samples/MQL4/indicator-sample.mq4 | 61 + samples/MQL4/script-sample.mq4 | 51 + samples/MQL5/Regex.mqh | 1390 ++++++++++++++++++++++ samples/MQL5/indicator-sample.mq5 | 64 + samples/MQL5/script-sample.mq5 | 56 + vendor/grammars/MQL5-sublime | 1 + vendor/licenses/grammar/MQL5-sublime.txt | 26 + 11 files changed, 1719 insertions(+) create mode 100644 samples/MQL4/header-sample.mqh create mode 100644 samples/MQL4/indicator-sample.mq4 create mode 100644 samples/MQL4/script-sample.mq4 create mode 100644 samples/MQL5/Regex.mqh create mode 100644 samples/MQL5/indicator-sample.mq5 create mode 100644 samples/MQL5/script-sample.mq5 create mode 160000 vendor/grammars/MQL5-sublime create mode 100644 vendor/licenses/grammar/MQL5-sublime.txt diff --git a/.gitmodules b/.gitmodules index fa4fd377dc..c556215243 100644 --- a/.gitmodules +++ b/.gitmodules @@ -791,3 +791,6 @@ [submodule "vendor/grammars/language-babel"] path = vendor/grammars/language-babel url = https://github.com/github-linguist/language-babel +[submodule "vendor/grammars/MQL5-sublime"] + path = vendor/grammars/MQL5-sublime + url = https://github.com/mqsoft/MQL5-sublime diff --git a/grammars.yml b/grammars.yml index e51e884868..9df93f9091 100755 --- a/grammars.yml +++ b/grammars.yml @@ -47,6 +47,8 @@ vendor/grammars/Lean.tmbundle: - source.lean vendor/grammars/LiveScript.tmbundle: - source.livescript +vendor/grammars/MQL5-sublime: +- source.mql5 vendor/grammars/MagicPython: - source.python - source.regexp.python diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 861a7efa6b..b021dcb7b4 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2208,6 +2208,24 @@ MAXScript: tm_scope: source.maxscript ace_mode: text language_id: 217 +MQL4: + type: programming + color: "#62A8D6" + extensions: + - ".mq4" + - ".mqh" + tm_scope: source.mql5 + ace_mode: c_cpp + language_id: 422 +MQL5: + type: programming + color: "#4A76B8" + extensions: + - ".mq5" + - ".mqh" + tm_scope: source.mql5 + ace_mode: c_cpp + language_id: 423 MTML: type: markup color: "#b7e1f4" diff --git a/samples/MQL4/header-sample.mqh b/samples/MQL4/header-sample.mqh new file mode 100644 index 0000000000..4b5d2a184c --- /dev/null +++ b/samples/MQL4/header-sample.mqh @@ -0,0 +1,47 @@ +//+------------------------------------------------------------------+ +//| header-sample.mqh | +//| Copyright 2016, Andrey Osorgin | +//+------------------------------------------------------------------+ +//| The MIT License (MIT) | +//| | +//| Permission is hereby granted, free of charge, to any person | +//| obtaining a copy of this software and associated documentation | +//| files (the "Software"), to deal in the Software without | +//| restriction, including without limitation the rights to use, | +//| copy, modify, merge, publish, distribute, sublicense, and/or sell| +//| copies of the Software, and to permit persons to whom the | +//| Software is furnished to do so, subject to the following | +//| conditions: | +//| | +//| The above copyright notice and this permission notice shall be | +//| included in all copies or substantial portions of the Software. | +//| | +//| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | +//| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | +//| OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | +//| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | +//| HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | +//| WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | +//| FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | +//| OTHER DEALINGS IN THE SOFTWARE. | +//| | +//| A copy of the MIT License (MIT) is available at | +//| https://opensource.org/licenses/MIT | +//+------------------------------------------------------------------+ +#property strict +//+------------------------------------------------------------------+ +//| | +//+------------------------------------------------------------------+ +class CSomeObject + { +protected: + int m_someproperty; +private: + bool SomeFunction() {return true;} +public: + CSomeObject(void): m_someproperty(0) {} + ~CSomeObject(void) {} + void SetName(int n){m_someproperty=n;}// sets somepropery + int GetName(){return(m_someproperty);} // returns someproperty + }; +//+------------------------------------------------------------------+ diff --git a/samples/MQL4/indicator-sample.mq4 b/samples/MQL4/indicator-sample.mq4 new file mode 100644 index 0000000000..e19d286880 --- /dev/null +++ b/samples/MQL4/indicator-sample.mq4 @@ -0,0 +1,61 @@ +//+------------------------------------------------------------------+ +//| indicator-sample.mq4 | +//| Copyright 2016, Andrey Osorgin | +//+------------------------------------------------------------------+ +//| The MIT License (MIT) | +//| | +//| Permission is hereby granted, free of charge, to any person | +//| obtaining a copy of this software and associated documentation | +//| files (the "Software"), to deal in the Software without | +//| restriction, including without limitation the rights to use, | +//| copy, modify, merge, publish, distribute, sublicense, and/or sell| +//| copies of the Software, and to permit persons to whom the | +//| Software is furnished to do so, subject to the following | +//| conditions: | +//| | +//| The above copyright notice and this permission notice shall be | +//| included in all copies or substantial portions of the Software. | +//| | +//| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | +//| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | +//| OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | +//| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | +//| HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | +//| WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | +//| FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | +//| OTHER DEALINGS IN THE SOFTWARE. | +//| | +//| A copy of the MIT License (MIT) is available at | +//| https://opensource.org/licenses/MIT | +//+------------------------------------------------------------------+ +#property version "1.00" +#property strict + +#property indicator_chart_window +#property indicator_plots 0 +//+------------------------------------------------------------------+ +//| Custom indicator initialization function | +//+------------------------------------------------------------------+ +void OnInit(void) + { + //--- + } +//+------------------------------------------------------------------+ +//| Bears Power | +//+------------------------------------------------------------------+ +int OnCalculate(const int rates_total, + const int prev_calculated, + const datetime &time[], + const double &open[], + const double &high[], + const double &low[], + const double &close[], + const long &tick_volume[], + const long &volume[], + const int &spread[]) + { + Print("The number of bars on the current chart: ",iBars(Symbol(),Period())); +//--- + return(rates_total); + } +//+------------------------------------------------------------------+ diff --git a/samples/MQL4/script-sample.mq4 b/samples/MQL4/script-sample.mq4 new file mode 100644 index 0000000000..b4d6812d9f --- /dev/null +++ b/samples/MQL4/script-sample.mq4 @@ -0,0 +1,51 @@ +//+------------------------------------------------------------------+ +//| script-sample.mq4 | +//| Copyright 2016, Andrey Osorgin | +//+------------------------------------------------------------------+ +//| The MIT License (MIT) | +//| | +//| Permission is hereby granted, free of charge, to any person | +//| obtaining a copy of this software and associated documentation | +//| files (the "Software"), to deal in the Software without | +//| restriction, including without limitation the rights to use, | +//| copy, modify, merge, publish, distribute, sublicense, and/or sell| +//| copies of the Software, and to permit persons to whom the | +//| Software is furnished to do so, subject to the following | +//| conditions: | +//| | +//| The above copyright notice and this permission notice shall be | +//| included in all copies or substantial portions of the Software. | +//| | +//| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | +//| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | +//| OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | +//| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | +//| HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | +//| WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | +//| FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | +//| OTHER DEALINGS IN THE SOFTWARE. | +//| | +//| A copy of the MIT License (MIT) is available at | +//| https://opensource.org/licenses/MIT | +//+------------------------------------------------------------------+ +#property version "1.00" +#property strict +#property script_show_inputs + +input int StopLoss=100; //Stop Loss +input int TakeProfit=100; //Take Profit +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + double minstoplevel=MarketInfo(Symbol(),MODE_STOPLEVEL); + Print("Minimum Stop Level=",minstoplevel," points"); +//--- + double sl=NormalizeDouble(Bid-StopLoss*Point,Digits); + double tp=NormalizeDouble(Ask+TakeProfit*Point,Digits); +//--- + int result=OrderSend(Symbol(),OP_BUY,0.01,Ask,1,sl,tp,"Test",0,0,clrNONE); + Print("Success? ",result); + } +//+------------------------------------------------------------------+ diff --git a/samples/MQL5/Regex.mqh b/samples/MQL5/Regex.mqh new file mode 100644 index 0000000000..ca7be7e11d --- /dev/null +++ b/samples/MQL5/Regex.mqh @@ -0,0 +1,1390 @@ +//+------------------------------------------------------------------+ +//| Regular Expression | +//| Copyright 2016, MetaQuotes Software Corp. | +//| https://www.mql5.com | +//+------------------------------------------------------------------+ +//| Regular Expression Library from .NET Framework 4.6.1 implemented | +//| in MetaQuotes Language 5 (MQL5) | +//| Original sources at https://github.com/Microsoft/referencesource | +//| | +//| The capabilities of the Regular Expression Library include: | +//| - Lazy quantifiers | +//| - Positive and negative lookbehind | +//| - Conditional evaluation | +//| - Balancing group definitions | +//| - Nonbacktracking subexpressions | +//| - Right-to-left matching | +//| | +//| If you find any functional differences between Regular Expression| +//| Library for MQL5 and the original .NET Framework 4.6.1 project, | +//| please contact developers of MQL5 on the Forum at www.mql5.com. | +//| | +//| You can report bugs found in the computational algorithms of the | +//| Regular Expression Library from .Net Framework 4.6.1 by notifying| +//| the project coordinators. | +//+------------------------------------------------------------------+ +//| The MIT License (MIT) | +//| | +//| Permission is hereby granted, free of charge, to any person | +//| obtaining a copy of this software and associated documentation | +//| files (the "Software"), to deal in the Software without | +//| restriction, including without limitation the rights to use, | +//| copy, modify, merge, publish, distribute, sublicense, and/or sell| +//| copies of the Software, and to permit persons to whom the | +//| Software is furnished to do so, subject to the following | +//| conditions: | +//| | +//| The above copyright notice and this permission notice shall be | +//| included in all copies or substantial portions of the Software. | +//| | +//| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | +//| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | +//| OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | +//| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | +//| HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | +//| WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | +//| FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | +//| OTHER DEALINGS IN THE SOFTWARE. | +//| | +//| A copy of the MIT License (MIT) is available at | +//| https://opensource.org/licenses/MIT | +//+------------------------------------------------------------------+ +class Match; +class MatchCollection; +class CachedCodeEntry; +class ReplacementReference; +class RunnerReference; +class RegexRunner; +//+------------------------------------------------------------------+ +//| Callback class. | +//+------------------------------------------------------------------+ +typedef string(*MatchEvaluator)(Match*); +#include +#include +#include +#include "RegexOptions.mqh" +#include "RegexCode.mqh" +#include "RegexTree.mqh" +#include "RegexParser.mqh" +#include "RegexReplacement.mqh" +#include "RegexWriter.mqh" +#include "RegexMatchCollection.mqh" +#include "RegexRunner.mqh" +#include "RegexInterpreter.mqh" +//+------------------------------------------------------------------+ +//| Purpose: The Regex class represents a single compiled instance of| +//| a regular expression. | +//+------------------------------------------------------------------+ +//+------------------------------------------------------------------+ +//| Represents an immutable, compiled regular expression. Also | +//| contains static methods that allow use of regular expressions | +//| without instantiating a Regex explicitly. | +//+------------------------------------------------------------------+ +class Regex + { +protected: + string m_pattern; + RegexOptions m_roptions; +private: + static const TimeSpan MaximumMatchTimeout; +public: + static const TimeSpan InfiniteMatchTimeout; +protected: + TimeSpan m_internalMatchTimeout;// timeout for the execution of this regex +private: + static const string DefaultMatchTimeout_ConfigKeyName; +public: + static const TimeSpan FallbackDefaultMatchTimeout; + static const TimeSpan DefaultMatchTimeout; +protected: + Dictionary*m_caps; // if captures are sparse, this is the hashtable capnum->index + Dictionary*m_capnames; // if named captures are used, this maps names->index + string m_capslist[]; // if captures are sparse or named captures are used, this is the sorted list of names + int m_capsize; // the size of the capture array + RegexTree *m_tree; + RunnerReference *m_runnerref; // cached runner + ReplacementReference*m_replref; // cached parsed replacement pattern + RegexCode *m_code; // if interpreted, this is the code for RegexIntepreter + bool m_refsInitialized;// Default is false + static LinkedListm_livecode;// the cached of code that are currently loaded + static int m_cacheSize; // Default is 15 +public: + static const int MaxOptionShift; +public: + //--- Constructors: + //+------------------------------------------------------------------+ + //| Initializes a new instance of the Regex class. | + //+------------------------------------------------------------------+ + Regex() : m_refsInitialized(false) + { + this.m_internalMatchTimeout=DefaultMatchTimeout; + } + //+------------------------------------------------------------------+ + //| Creates and compiles a regular expression object for the | + //| specified regular expression. | + //+------------------------------------------------------------------+ + Regex(const string pattern) : m_refsInitialized(0) + { + Initialize(pattern,None,DefaultMatchTimeout,false); + } + //+------------------------------------------------------------------+ + //| Creates and compiles a regular expression object for the | + //| specified regular expression with options that modify the | + //| pattern. | + //+------------------------------------------------------------------+ + Regex(const string pattern,RegexOptions options) : m_refsInitialized(0) + { + Initialize(pattern,options,DefaultMatchTimeout,false); + } + //+------------------------------------------------------------------+ + //| Initializes a new instance of the Regex class for the specified | + //| regular expression,with options that modify the pattern and a | + //| value that specifies how long a pattern matching method should | + //| attempt a match before it times out. | + //+------------------------------------------------------------------+ + Regex(const string pattern,RegexOptions options,const TimeSpan &matchTimeout) : m_refsInitialized(0) + { + Initialize(pattern,options,matchTimeout,false); + } + //--- Destructors: + //+------------------------------------------------------------------+ + //| Destructor without parameters. | + //+------------------------------------------------------------------+ + ~Regex() + { + if(CheckPointer(m_tree)==POINTER_DYNAMIC) + { + delete m_tree; + } + if(CheckPointer(m_caps)==POINTER_DYNAMIC) + { + delete m_caps; + } + bool deleteRun=true; + bool deleteRepl = true; + bool deleteCode = true; + for(LinkedListNode*current=m_livecode.First(); current!=NULL; current=current.Next()) + { + if(CheckPointer(current.Value())==POINTER_DYNAMIC) + { + if(current.Value().RunnerRef()==m_runnerref) + { + deleteRun=false; + } + if(current.Value().ReplRef()==m_replref) + { + deleteRepl=false; + } + if(current.Value().Code()==m_code) + { + deleteCode=false; + } + } + } + if(CheckPointer(m_replref)==POINTER_DYNAMIC && deleteRepl) + { + delete m_replref; + } + if(CheckPointer(m_runnerref)==POINTER_DYNAMIC && deleteRun) + { + delete m_runnerref; + } + if(CheckPointer(m_code)==POINTER_DYNAMIC && deleteCode) + { + delete m_code; + } + } +private: + //+------------------------------------------------------------------+ + //| General constructor with parameters. | + //+------------------------------------------------------------------+ + Regex(const string pattern,RegexOptions options,const TimeSpan &matchTimeout,const bool useCache) : m_refsInitialized(0) + { + Initialize(pattern,options,matchTimeout,useCache); + } + //--- Methods: + //+------------------------------------------------------------------+ + //| Initialize. | + //+------------------------------------------------------------------+ + void Initialize(const string pattern,RegexOptions options,const TimeSpan &matchTimeout,const bool useCache) + { + RegexTree *tree; + CachedCodeEntry *cached=NULL; + if(pattern==NULL) + { + Print("Argument 'pattern'= Null."); + //--- return + return; + } + if(options>MaxOptionShift)!=0) + { + Print("Argument 'options' out of range."); + //--- return + return; + } + if((options &ECMAScript)!=0 + && (options &~(ECMAScript|IgnoreCase|Multiline + #ifdef _DEBUG + |Debug + #endif + ))!=0) + { + Print("Argument 'options' out of range"); + //--- return + return; + } + ValidateMatchTimeout(matchTimeout); + //--- Try to look up this regex in the cache. We do this regardless of whether useCache is true since there's really no reason not to. + string key=IntegerToString(options)+":"+pattern; + cached=LookupCachedAndUpdate(key); + this.m_pattern=pattern; + this.m_roptions=options; + this.m_internalMatchTimeout=matchTimeout; + if(cached==NULL) + { + //--- Parse the input + tree=RegexParser::Parse(pattern,(RegexOptions)m_roptions); + //--- Extract the relevant information + m_capnames=tree.CapNames(); + tree.GetCapsList(m_capslist); + m_code = RegexWriter::Write(tree); + m_caps = m_code.Caps(); + m_capsize = m_code.CapSize(); + InitializeReferences(); + m_tree=tree; + if(useCache) + { + cached=CacheCode(key); + } + } + else + { + m_caps = cached.Caps(); + m_capnames = cached.CapNames(); + cached.GetCapList(m_capslist); + m_capsize = cached.CapSize(); + m_code = cached.Code(); + m_runnerref = cached.RunnerRef(); + m_replref = cached.ReplRef(); + m_refsInitialized=true; + } + } +public: + //--- Methods: + //+------------------------------------------------------------------+ + //| Pattern. | + //+------------------------------------------------------------------+ + string Pattern() + { + //--- return pattern + return (m_pattern); + } + //+------------------------------------------------------------------+ + //| Validates that the specified match timeout value is valid. | + //| The valid range is: | + //| TimeSpan::Zero < matchTimeout <= Regex::MaximumMatchTimeout. | + //+------------------------------------------------------------------+ + static void ValidateMatchTimeout(const TimeSpan &matchTimeout) + { + if(InfiniteMatchTimeout==matchTimeout) + { + //--- return + return; + } + //--- Change this to make sure timeout is not longer then Environment.Ticks cycle length: + if(TimeSpan::Zero()*Caps() + { + //--- + return (m_caps); + } + Dictionary*CapNames() + { + //--- return + return (m_capnames); + } + int CapSize() + { + //--- + return (m_capsize); + } + //+------------------------------------------------------------------+ + //| Returns the options passed into the constructor. | + //+------------------------------------------------------------------+ + RegexOptions Options() + { + //--- return + return (m_roptions); + } + //+------------------------------------------------------------------+ + //| Escape metacharacters within the string. | + //+------------------------------------------------------------------+ + static string Escape(const string str) + { + if(StringLen(str)==NULL) + { + Print("Argument 'str' = NULL."); + //--- return NULL + return (NULL); + } + //--- return result + return RegexParser::Escape(str); + } + //+------------------------------------------------------------------+ + //| Unescape character codes within the string. | + //+------------------------------------------------------------------+ + static string Unescape(const string str) + { + if(StringLen(str)==NULL) + { + Print("Argument 'str' = NULL."); + //--- return NULL + return (NULL); + } + //--- return result + return RegexParser::Unescape(str); + } + //+------------------------------------------------------------------+ + //| CacheCount. | + //+------------------------------------------------------------------+ + static int CacheCount() + { + //--- return count + return (m_livecode.Count()); + } + //+------------------------------------------------------------------+ + //| CacheSize. | + //+------------------------------------------------------------------+ + static int CacheSize() + { + //--- return size + return (m_cacheSize); + } + //+------------------------------------------------------------------+ + //| CacheSize. | + //+------------------------------------------------------------------+ + static void CacheSize(const int value) + { + if(value<0) + { + Print("Argument 'value' out of range."); + //--- return + return; + } + m_cacheSize=value; + if(m_livecode.Count()>m_cacheSize) + { + while(m_livecode.Count()>m_cacheSize) + { + m_livecode.RemoveLast(); + } + } + } + //+------------------------------------------------------------------+ + //| The match timeout used by this Regex instance. | + //+------------------------------------------------------------------+ + TimeSpan MatchTimeout() + { + //--- return result + return (m_internalMatchTimeout); + } + //+------------------------------------------------------------------+ + //| True if the regex is leftward. | + //| | + //| Indicates whether the regular expression matches from right to | + //| left. | + //+------------------------------------------------------------------+ + bool RightToLeft() + { + //--- return result + return UseOptionR(); + } + //+------------------------------------------------------------------+ + //| Returns the regular expression pattern passed into the | + //| constructor. | + //+------------------------------------------------------------------+ + string ToString() + { + //--- return result + return (m_pattern); + } + //+------------------------------------------------------------------+ + //| Returns an array of the group names that are used to capture | + //| groups in the regular expression. Only needed if the regex is not| + //| known until runtime, and one wants to extract captured groups. | + //| (Probably unusual, but supplied for completeness.). | + //+------------------------------------------------------------------+ + void GetGroupNames(string &result[]) + { + if(ArraySize(m_capslist)==NULL) + { + int max=m_capsize; + ArrayResize(result,max); + for(int i=0; i*de=m_caps.GetEnumerator(); + while(de.MoveNext()) + { + result[(int)de.Value()]=(int)de.Key(); + } + delete de; + } + } + //+------------------------------------------------------------------+ + //| Given a group number, maps it to a group name. Note that nubmered| + //| groups automatically get a group name that is the decimal string | + //| equivalent of its number. | + //+------------------------------------------------------------------+ + string GroupNameFromNumber(const int index) + { + int i=index; + if(ArraySize(m_capslist)==NULL) + { + if(i>=0 && i=0 && i'9' || ch<'0') + { + //--- return result + return (-1); + } + result *= 10; + result += (ch - '0'); + } + //--- return int if it's in range + if(result>=0 && resultStringLen(in)) + { + Print("Argument 'start' out of range."); + //--- return NULL + return (NULL); + } + if(length<0 || length>StringLen(in)) + { + Print("Argument 'length' out of range."); + //--- return NULL + return (NULL); + } + bool fromCache=false; + //--- There may be a cached runner; grab ownership of it if we can. + if(m_runnerref!=NULL) + { + fromCache=true; + runner=m_runnerref.Get(); + } + //--- Create a RegexRunner instance if we need to + if(runner==NULL) + { + fromCache=false; + //--- Use the compiled RegexRunner factory if the code was compiled to MSIL + runner=new RegexInterpreter(m_code); + } + //--- Do the scan starting at the requested position + match=runner.Scan(GetPointer(this),in,beginning,beginning+length,startat,prevlen,quick,m_internalMatchTimeout); + if(m_runnerref!=NULL && !fromCache) + { + if(CheckPointer(m_runnerref.Get())==POINTER_DYNAMIC) + { + delete m_runnerref.Get(); + } + //--- Release or fill the cache slot + m_runnerref.Set(runner); + } + else if(!fromCache) + { + delete runner; + } +#ifdef _DEBUG + if(Debug() && match!=NULL) + { + match.Dump(); + } +#endif + //--- return result + return (match); + } + //+------------------------------------------------------------------+ + //| Find code cache based on options+pattern. | + //+------------------------------------------------------------------+ + static CachedCodeEntry *LookupCachedAndUpdate(const string key) + { + for(LinkedListNode*current=m_livecode.First(); current!=NULL; current=current.Next()) + { + if(current.Value().Key()==key) + { + //--- If we find an entry in the cache, move it to the head at the same time. + m_livecode.Remove(current); + m_livecode.AddFirst(current); + //--- retrun result + return (current.Value()); + } + } + //--- return result + return (NULL); + } + //+------------------------------------------------------------------+ + //| Add current code to the cache. | + //+------------------------------------------------------------------+ + CachedCodeEntry *CacheCode(const string key) + { + CachedCodeEntry *newcached=NULL; + //--- first look for it in the cache and move it to the head + for(LinkedListNode*current=m_livecode.First(); current!=NULL; current=current.Next()) + { + if(current.Value().Key()==key) + { + m_livecode.Remove(current); + m_livecode.AddFirst(current); + //--- return result + return (current.Value()); + } + } + //--- it wasn't in the cache, so we'll add a new one. Shortcut out for the case where cacheSize is zero. + if(m_cacheSize!=0) + { + newcached=new CachedCodeEntry(key,m_capnames,m_capslist,m_code,m_caps,m_capsize,m_runnerref,m_replref); + m_livecode.AddFirst(newcached); + if(m_livecode.Count()>m_cacheSize) + { + m_livecode.RemoveLast(); + } + } + //--- return result + return (newcached); + } + //+------------------------------------------------------------------+ + //| Delete all objects in cache. | + //+------------------------------------------------------------------+ + static void ClearCache() + { + IEnumerator*en=m_livecode.GetEnumerator(); + while(en.MoveNext()) + { + if(CheckPointer(en.Current())==POINTER_DYNAMIC) + { + if(CheckPointer(en.Current().RunnerRef().Get().RunRegex())==POINTER_DYNAMIC) + { + delete en.Current().RunnerRef().Get().RunRegex(); + } + delete en.Current(); + } + } + delete en; + } + //+------------------------------------------------------------------+ + //| True if the O option was set. | + //+------------------------------------------------------------------+ + bool UseOptionC() + { + return(m_roptions) != 0; + } + //+------------------------------------------------------------------+ + //| True if the L option was set. | + //+------------------------------------------------------------------+ + bool UseOptionR() + { + return(m_roptions & RightToLeft) != 0; + } + //+------------------------------------------------------------------+ + //| UseOptionInvariant. | + //+------------------------------------------------------------------+ + bool UseOptionInvariant() + { + return(m_roptions) != 0; + } +#ifdef _DEBUG + //+------------------------------------------------------------------+ + //| True if the regex has debugging enabled. | + //+------------------------------------------------------------------+ + bool Debug() + { + //--- return result + return((m_roptions &Debug) != 0); + } +#endif + }; +static const TimeSpan Regex::MaximumMatchTimeout=TimeSpan::FromMilliseconds(Int32::MaxValue-1); +static const TimeSpan Regex::InfiniteMatchTimeout(0,0,0,0,-1); +static const string Regex::DefaultMatchTimeout_ConfigKeyName="REGEX_DEFAULT_MATCH_TIMEOUT"; +static const TimeSpan Regex::FallbackDefaultMatchTimeout=Regex::InfiniteMatchTimeout; +static const TimeSpan Regex::DefaultMatchTimeout=Regex::InitDefaultMatchTimeout(); +static LinkedListRegex::m_livecode(); +static int Regex::m_cacheSize=15; +static const int Regex::MaxOptionShift=10; +//+------------------------------------------------------------------+ +//| Purpose: Used to cache byte codes or compiled factories. | +//+------------------------------------------------------------------+ +class CachedCodeEntry : public IComparable + { +private: + string m_key; + RegexCode *m_code; + Dictionary*m_caps; + Dictionary*m_capnames; + string m_capslist[]; + int m_capsize; + RunnerReference *m_runnerref; + ReplacementReference *m_replref; +public: + //--- Constructors: + //+------------------------------------------------------------------+ + //| Constructor with parameters. | + //+------------------------------------------------------------------+ + CachedCodeEntry(const string key,Dictionary*capnames,const string &capslist[], + RegexCode *code,Dictionary*caps,const int capsize, + RunnerReference *runner,ReplacementReference *repl) + { + m_key=key; + m_capnames=capnames; + ArrayCopy(m_capslist,capslist); + m_code= code; + m_caps= caps; + m_capsize=capsize; + m_runnerref=runner; + m_replref=repl; + } + //--- Destructors: + //+------------------------------------------------------------------+ + //| destructor without parameters. | + //+------------------------------------------------------------------+ + ~CachedCodeEntry() + { + if(CheckPointer(m_code)==POINTER_DYNAMIC) + { + delete m_code; + } + if(CheckPointer(m_caps)==POINTER_DYNAMIC) + { + delete m_caps; + } + if(CheckPointer(m_capnames)==POINTER_DYNAMIC) + { + delete m_capnames; + } + if(CheckPointer(m_replref)==POINTER_DYNAMIC) + { + delete m_replref; + } + if(CheckPointer(m_runnerref)==POINTER_DYNAMIC) + { + delete m_runnerref; + } + } + //--- Methods: + //+------------------------------------------------------------------+ + //| Gets the runnerref. | + //+------------------------------------------------------------------+ + RunnerReference *RunnerRef() + { + //--- reurn runnerref + return (m_runnerref); + } + //+------------------------------------------------------------------+ + //| Gets the replref. | + //+------------------------------------------------------------------+ + ReplacementReference *ReplRef() + { + //--- return replref + return (m_replref); + } + //+------------------------------------------------------------------+ + //| Gets the key. | + //+------------------------------------------------------------------+ + string Key() + { + //--- return key + return (m_key); + } + //+------------------------------------------------------------------+ + //| Gets the caps. | + //+------------------------------------------------------------------+ + Dictionary*Caps() + { + //--- return caps + return (m_caps); + } + //+------------------------------------------------------------------+ + //| Gets the capnames. | + //+------------------------------------------------------------------+ + Dictionary*CapNames() + { + //--- return capnames + return (m_capnames); + } + //+------------------------------------------------------------------+ + //| Gets the capsize. | + //+------------------------------------------------------------------+ + int CapSize() + { + //--- retrun capsize + return (m_capsize); + } + //+------------------------------------------------------------------+ + //| Gets the code. | + //+------------------------------------------------------------------+ + RegexCode *Code() + { + //--- return code + return (m_code); + } + //+------------------------------------------------------------------+ + //| Gets the caplist. | + //+------------------------------------------------------------------+ + void GetCapList(string &array[]) + { + ArrayCopy(array,m_capslist); + } + }; +//+------------------------------------------------------------------+ +//| Used to cache a weak reference in a threadsafe way. | +//+------------------------------------------------------------------+ +class ReplacementReference + { +private: + RegexReplacement *m_obj; +public: + //--- Destructors: + //+------------------------------------------------------------------+ + //| Destructor without parameters. | + //+------------------------------------------------------------------+ + ~ReplacementReference() + { + if(CheckPointer(m_obj)==POINTER_DYNAMIC) + { + delete m_obj; + } + } + //--- Methods: + //+------------------------------------------------------------------+ + //| Get RegexReplacement. | + //+------------------------------------------------------------------+ + RegexReplacement *Get() + { + //--- return pointer + return (m_obj); + } + //+------------------------------------------------------------------+ + //| Set RegexReplacement. | + //+------------------------------------------------------------------+ + void Set(RegexReplacement *obj) + { + m_obj=obj; + } + }; +//+------------------------------------------------------------------+ +//| Used to cache one exclusive runner reference. | +//+------------------------------------------------------------------+ +class RunnerReference + { +private: + RegexRunner *m_obj; +public: + //--- Destructors: + //+------------------------------------------------------------------+ + //| Destructor without parameters. | + //+------------------------------------------------------------------+ + ~RunnerReference() + { + if(CheckPointer(m_obj)==POINTER_DYNAMIC) + { + delete m_obj; + } + } + //--- Methods: + //+------------------------------------------------------------------+ + //| Get RegexRunner. | + //+------------------------------------------------------------------+ + RegexRunner *Get() + { + //--- return pointer + return (m_obj); + } + //+------------------------------------------------------------------+ + //| Set RegexRunner. | + //+------------------------------------------------------------------+ + void Set(RegexRunner *obj) + { + m_obj=obj; + } + }; +//+------------------------------------------------------------------+ diff --git a/samples/MQL5/indicator-sample.mq5 b/samples/MQL5/indicator-sample.mq5 new file mode 100644 index 0000000000..fdd42f58e1 --- /dev/null +++ b/samples/MQL5/indicator-sample.mq5 @@ -0,0 +1,64 @@ +//+------------------------------------------------------------------+ +//| indicator-sample.mq5 | +//| Copyright 2016, Andrey Osorgin | +//+------------------------------------------------------------------+ +//| The MIT License (MIT) | +//| | +//| Permission is hereby granted, free of charge, to any person | +//| obtaining a copy of this software and associated documentation | +//| files (the "Software"), to deal in the Software without | +//| restriction, including without limitation the rights to use, | +//| copy, modify, merge, publish, distribute, sublicense, and/or sell| +//| copies of the Software, and to permit persons to whom the | +//| Software is furnished to do so, subject to the following | +//| conditions: | +//| | +//| The above copyright notice and this permission notice shall be | +//| included in all copies or substantial portions of the Software. | +//| | +//| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | +//| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | +//| OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | +//| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | +//| HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | +//| WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | +//| FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | +//| OTHER DEALINGS IN THE SOFTWARE. | +//| | +//| A copy of the MIT License (MIT) is available at | +//| https://opensource.org/licenses/MIT | +//+------------------------------------------------------------------+ +#property version "1.00" + +#property indicator_chart_window +#property indicator_plots 0 +//+------------------------------------------------------------------+ +//| Custom indicator initialization function | +//+------------------------------------------------------------------+ +int OnInit() + { +//--- + return(INIT_SUCCEEDED); + } +//+------------------------------------------------------------------+ +//| Custom indicator iteration function | +//+------------------------------------------------------------------+ +int OnCalculate(const int rates_total, + const int prev_calculated, + const datetime &time[], + const double &open[], + const double &high[], + const double &low[], + const double &close[], + const long &tick_volume[], + const long &volume[], + const int &spread[]) + { +//--- + int bars=Bars(Symbol(),0); + Print("Bars = ",bars,", rates_total = ",rates_total,", prev_calculated = ",prev_calculated); + Print("time[0] = ",time[0]," time[rates_total-1] = ",time[rates_total-1]); +//--- return value of prev_calculated for next call + return(rates_total); + } +//+------------------------------------------------------------------+ diff --git a/samples/MQL5/script-sample.mq5 b/samples/MQL5/script-sample.mq5 new file mode 100644 index 0000000000..c741218ac0 --- /dev/null +++ b/samples/MQL5/script-sample.mq5 @@ -0,0 +1,56 @@ +//+------------------------------------------------------------------+ +//| script-sample.mq5 | +//| Copyright 2016, Andrey Osorgin | +//+------------------------------------------------------------------+ +//| The MIT License (MIT) | +//| | +//| Permission is hereby granted, free of charge, to any person | +//| obtaining a copy of this software and associated documentation | +//| files (the "Software"), to deal in the Software without | +//| restriction, including without limitation the rights to use, | +//| copy, modify, merge, publish, distribute, sublicense, and/or sell| +//| copies of the Software, and to permit persons to whom the | +//| Software is furnished to do so, subject to the following | +//| conditions: | +//| | +//| The above copyright notice and this permission notice shall be | +//| included in all copies or substantial portions of the Software. | +//| | +//| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | +//| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | +//| OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | +//| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | +//| HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | +//| WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | +//| FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | +//| OTHER DEALINGS IN THE SOFTWARE. | +//| | +//| A copy of the MIT License (MIT) is available at | +//| https://opensource.org/licenses/MIT | +//+------------------------------------------------------------------+ +#property version "1.00" +#property script_show_inputs + +#include + +input int StopLoss=100; // Stop Loss +input int TakeProfit=100; // Take Profit +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + CTrade trade; +//--- + long stoplevel=SymbolInfoInteger(Symbol(),SYMBOL_TRADE_STOPS_LEVEL); + Print("Minimum stop level is: ",stoplevel); + double ask=SymbolInfoDouble(Symbol(),SYMBOL_ASK); + double bid=SymbolInfoDouble(Symbol(),SYMBOL_BID); + double sl = NormalizeDouble(bid - StopLoss*Point(),Digits()); + double tp = NormalizeDouble(ask + TakeProfit*Point(),Digits()); +//--- + bool result=trade.Buy(0.01,Symbol(),ask,sl,tp,"test"); +//--- + Print("Success? ",result); + } +//+------------------------------------------------------------------+ diff --git a/vendor/grammars/MQL5-sublime b/vendor/grammars/MQL5-sublime new file mode 160000 index 0000000000..a41ed3b5e5 --- /dev/null +++ b/vendor/grammars/MQL5-sublime @@ -0,0 +1 @@ +Subproject commit a41ed3b5e5af354d9faf262794549ea44bbe5912 diff --git a/vendor/licenses/grammar/MQL5-sublime.txt b/vendor/licenses/grammar/MQL5-sublime.txt new file mode 100644 index 0000000000..cea1bce812 --- /dev/null +++ b/vendor/licenses/grammar/MQL5-sublime.txt @@ -0,0 +1,26 @@ +--- +type: grammar +name: MQL5-sublime +license: mit +--- +MIT License + +Copyright (c) 2016 mqsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From cc5f1c57cac0044d827e42c30430bb8f0b4adb9c Mon Sep 17 00:00:00 2001 From: Todd Berman Date: Tue, 20 Sep 2016 23:23:22 -0700 Subject: [PATCH 0081/1214] Add Codemirror modes --- .gitignore | 1 + lib/linguist/language.rb | 12 +++ lib/linguist/languages.yml | 198 ++++++++++++++++++++++++++++++++++++- 3 files changed, 209 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c0ab5df0c5..4b360dbaf9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /Gemfile.lock .bundle/ +.idea benchmark/ lib/linguist/samples.json /grammars diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index 7ae48b17ff..7f4fd9031b 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -300,6 +300,7 @@ def initialize(attributes = {}) end @ace_mode = attributes[:ace_mode] + @codemirror_mode = attributes[:codemirror_mode] @wrap = attributes[:wrap] || false # Set legacy search term @@ -397,6 +398,17 @@ def initialize(attributes = {}) # Returns a String name or nil attr_reader :ace_mode + # Public: Get Codemirror mode + # + # Examples + # + # # => "nil" + # # => "javascript" + # # => "clike" + # + # Returns a String name or nil + attr_reader :codemirror_mode + # Public: Should language lines be wrapped # # Returns true or false diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 861a7efa6b..541fd71fad 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -6,6 +6,8 @@ # ace_mode - A String name of the Ace Mode used for highlighting whenever # a file is edited. This must match one of the filenames in http://git.io/3XO_Cg. # Use "text" if a mode does not exist. +# codemirror_mode - A String name of the Codemirror Mode used for highlighting whenever a file is edited. +# This must match a mode from https://git.io/vi9Fx # wrap - Boolean wrap to enable line wrapping (default: false) # extensions - An Array of associated extensions (the first one is # considered the primary extension, the others should be @@ -57,6 +59,7 @@ AGS Script: - ".ash" tm_scope: source.c++ ace_mode: c_cpp + codemirror_mode: clike language_id: 2 AMPL: type: programming @@ -94,6 +97,7 @@ APL: - dyalog tm_scope: source.apl ace_mode: text + codemirror_mode: apl language_id: 6 ASN.1: type: data @@ -103,6 +107,7 @@ ASN.1: - ".asn1" tm_scope: source.asn ace_mode: text + codemirror_mode: asn.1 language_id: 7 ASP: type: programming @@ -121,6 +126,7 @@ ASP: - ".aspx" - ".axd" ace_mode: text + codemirror_mode: htmlembedded language_id: 8 ATS: type: programming @@ -183,6 +189,7 @@ Alpine Abuild: - APKBUILD tm_scope: source.shell ace_mode: sh + codemirror_mode: shell language_id: 14 Ant Build System: type: data @@ -191,6 +198,7 @@ Ant Build System: - ant.xml - build.xml ace_mode: xml + codemirror_mode: xml language_id: 15 ApacheConf: type: markup @@ -209,6 +217,7 @@ Apex: - ".cls" tm_scope: source.java ace_mode: java + codemirror_mode: clike language_id: 17 Apollo Guidance Computer: type: programming @@ -218,6 +227,7 @@ Apollo Guidance Computer: - ".agc" tm_scope: source.agc ace_mode: assembly_x86 + codemirror_mode: gas language_id: 18 AppleScript: type: programming @@ -246,6 +256,7 @@ Arduino: - ".ino" tm_scope: source.c++ ace_mode: c_cpp + codemirror_mode: clike language_id: 21 AsciiDoc: type: prose @@ -278,6 +289,7 @@ Assembly: - ".nasm" tm_scope: source.assembly ace_mode: assembly_x86 + codemirror_mode: gas language_id: 24 Augeas: type: programming @@ -415,6 +427,7 @@ Brainfuck: - ".bf" tm_scope: source.bf ace_mode: text + codemirror_mode: brainfuck language_id: 38 Brightscript: type: programming @@ -441,10 +454,12 @@ C: interpreters: - tcc ace_mode: c_cpp + codemirror_mode: clike language_id: 41 C#: type: programming ace_mode: csharp + codemirror_mode: clike tm_scope: source.cs search_term: csharp color: "#178600" @@ -459,6 +474,7 @@ C#: C++: type: programming ace_mode: c_cpp + codemirror_mode: clike search_term: cpp color: "#f34b7d" aliases: @@ -486,6 +502,7 @@ C-ObjDump: - ".c-objdump" tm_scope: objdump.x86asm ace_mode: assembly_x86 + codemirror_mode: gas language_id: 44 C2hs Haskell: type: programming @@ -496,6 +513,7 @@ C2hs Haskell: - ".chs" tm_scope: source.haskell ace_mode: haskell + codemirror_mode: haskell language_id: 45 CLIPS: type: programming @@ -512,6 +530,7 @@ CMake: filenames: - CMakeLists.txt ace_mode: text + codemirror_mode: cmake language_id: 47 COBOL: type: programming @@ -522,6 +541,7 @@ COBOL: - ".cobol" - ".cpy" ace_mode: cobol + codemirror_mode: cobol language_id: 48 COLLADA: type: data @@ -529,11 +549,13 @@ COLLADA: - ".dae" tm_scope: text.xml ace_mode: xml + codemirror_mode: xml language_id: 49 CSS: type: markup tm_scope: source.css ace_mode: css + codemirror_mode: css color: "#563d7c" extensions: - ".css" @@ -589,6 +611,7 @@ ChucK: - ".ck" tm_scope: source.java ace_mode: java + codemirror_mode: clike language_id: 57 Cirru: type: programming @@ -625,6 +648,7 @@ Click: Clojure: type: programming ace_mode: clojure + codemirror_mode: clojure color: "#db5855" extensions: - ".clj" @@ -643,6 +667,7 @@ CoffeeScript: type: programming tm_scope: source.coffee ace_mode: coffee + codemirror_mode: coffeescript color: "#244776" aliases: - coffee @@ -708,6 +733,7 @@ Common Lisp: - clisp - ecl ace_mode: lisp + codemirror_mode: commonlisp language_id: 66 Component Pascal: type: programming @@ -720,6 +746,7 @@ Component Pascal: - delphi - objectpascal ace_mode: pascal + codemirror_mode: pascal language_id: 67 Cool: type: programming @@ -747,6 +774,7 @@ Cpp-ObjDump: aliases: - c++-objdump ace_mode: assembly_x86 + codemirror_mode: gas language_id: 70 Creole: type: prose @@ -762,6 +790,7 @@ Crystal: extensions: - ".cr" ace_mode: ruby + codemirror_mode: crystal tm_scope: source.crystal interpreters: - crystal @@ -811,6 +840,7 @@ Cuda: - ".cuh" tm_scope: source.cuda-c++ ace_mode: c_cpp + codemirror_mode: clike color: "#3A4E3A" language_id: 77 Cycript: @@ -819,6 +849,7 @@ Cycript: - ".cy" tm_scope: source.js ace_mode: javascript + codemirror_mode: javascript language_id: 78 Cython: type: programming @@ -830,6 +861,7 @@ Cython: aliases: - pyrex ace_mode: text + codemirror_mode: python language_id: 79 D: type: programming @@ -838,6 +870,7 @@ D: - ".d" - ".di" ace_mode: d + codemirror_mode: d language_id: 80 D-ObjDump: type: data @@ -845,6 +878,7 @@ D-ObjDump: - ".d-objdump" tm_scope: objdump.x86asm ace_mode: assembly_x86 + codemirror_mode: gas language_id: 81 DIGITAL Command Language: type: programming @@ -883,6 +917,7 @@ DTrace: - dtrace tm_scope: source.c ace_mode: c_cpp + codemirror_mode: clike language_id: 85 Darcs Patch: type: data @@ -903,6 +938,7 @@ Dart: interpreters: - dart ace_mode: dart + codemirror_mode: dart language_id: 87 Diff: type: data @@ -913,6 +949,7 @@ Diff: - udiff tm_scope: source.diff ace_mode: diff + codemirror_mode: diff language_id: 88 Dockerfile: type: data @@ -922,6 +959,7 @@ Dockerfile: filenames: - Dockerfile ace_mode: dockerfile + codemirror_mode: dockerfile language_id: 89 Dogescript: type: programming @@ -940,6 +978,7 @@ Dylan: - ".intr" - ".lid" ace_mode: text + codemirror_mode: dylan language_id: 91 E: type: programming @@ -959,6 +998,7 @@ ECL: - ".eclxml" tm_scope: none ace_mode: text + codemirror_mode: ecl language_id: 93 ECLiPSe: type: programming @@ -984,6 +1024,7 @@ EQ: - ".eq" tm_scope: source.cs ace_mode: csharp + codemirror_mode: clike language_id: 96 Eagle: type: markup @@ -993,6 +1034,7 @@ Eagle: - ".brd" tm_scope: text.xml ace_mode: xml + codemirror_mode: xml language_id: 97 Ecere Projects: type: data @@ -1001,6 +1043,7 @@ Ecere Projects: - ".epj" tm_scope: source.json ace_mode: json + codemirror_mode: json language_id: 98 Eiffel: type: programming @@ -1008,6 +1051,7 @@ Eiffel: extensions: - ".e" ace_mode: eiffel + codemirror_mode: eiffel language_id: 99 Elixir: type: programming @@ -1028,6 +1072,7 @@ Elm: - ".elm" tm_scope: source.elm ace_mode: elm + codemirror_mode: elm language_id: 101 Emacs Lisp: type: programming @@ -1045,6 +1090,7 @@ Emacs Lisp: - ".emacs" - ".emacs.desktop" ace_mode: lisp + codemirror_mode: commonlisp language_id: 102 EmberScript: type: programming @@ -1054,6 +1100,7 @@ EmberScript: - ".emberscript" tm_scope: source.coffee ace_mode: coffee + codemirror_mode: coffeescript language_id: 103 Erlang: type: programming @@ -1071,6 +1118,7 @@ Erlang: - rebar.config.lock - rebar.lock ace_mode: erlang + codemirror_mode: erlang interpreters: - escript language_id: 104 @@ -1086,6 +1134,7 @@ F#: - ".fsx" tm_scope: source.fsharp ace_mode: text + codemirror_mode: mllike language_id: 105 FLUX: type: programming @@ -1110,6 +1159,7 @@ FORTRAN: - ".fpp" tm_scope: source.fortran.modern ace_mode: text + codemirror_mode: fortran language_id: 107 Factor: type: programming @@ -1120,6 +1170,7 @@ Factor: - ".factor-boot-rc" - ".factor-rc" ace_mode: text + codemirror_mode: factor language_id: 108 Fancy: type: programming @@ -1175,6 +1226,7 @@ Forth: - ".frt" - ".fs" ace_mode: forth + codemirror_mode: forth language_id: 114 FreeMarker: type: programming @@ -1229,6 +1281,7 @@ GAS: - ".ms" tm_scope: source.assembly ace_mode: assembly_x86 + codemirror_mode: gas language_id: 120 GCC Machine Description: type: programming @@ -1236,6 +1289,7 @@ GCC Machine Description: - ".md" tm_scope: source.lisp ace_mode: lisp + codemirror_mode: commonlisp language_id: 121 GDB: type: programming @@ -1280,6 +1334,7 @@ Game Maker Language: - ".gml" tm_scope: source.c++ ace_mode: c_cpp + codemirror_mode: clike language_id: 125 Genshi: type: programming @@ -1290,6 +1345,7 @@ Genshi: - xml+genshi - xml+kid ace_mode: xml + codemirror_mode: xml language_id: 126 Gentoo Ebuild: type: programming @@ -1298,6 +1354,7 @@ Gentoo Ebuild: - ".ebuild" tm_scope: source.shell ace_mode: sh + codemirror_mode: shell language_id: 127 Gentoo Eclass: type: programming @@ -1306,6 +1363,7 @@ Gentoo Eclass: - ".eclass" tm_scope: source.shell ace_mode: sh + codemirror_mode: shell language_id: 128 Gettext Catalog: type: prose @@ -1326,6 +1384,7 @@ Glyph: - ".glf" tm_scope: source.tcl ace_mode: tcl + codemirror_mode: tcl language_id: 130 Gnuplot: type: programming @@ -1346,6 +1405,7 @@ Go: extensions: - ".go" ace_mode: golang + codemirror_mode: go language_id: 132 Golo: type: programming @@ -1391,6 +1451,7 @@ Grammatical Framework: color: "#79aa7a" tm_scope: source.haskell ace_mode: haskell + codemirror_mode: haskell language_id: 137 Graph Modeling Language: type: data @@ -1450,10 +1511,12 @@ Groff: - nroff - troff ace_mode: text + codemirror_mode: troff language_id: 141 Groovy: type: programming ace_mode: groovy + codemirror_mode: groovy color: "#e69f56" extensions: - ".groovy" @@ -1475,6 +1538,7 @@ Groovy Server Pages: - ".gsp" tm_scope: text.html.jsp ace_mode: jsp + codemirror_mode: htmlembedded language_id: 143 HCL: type: programming @@ -1482,6 +1546,7 @@ HCL: - ".hcl" - ".tf" ace_mode: ruby + codemirror_mode: ruby tm_scope: source.ruby language_id: 144 HLSL: @@ -1498,6 +1563,7 @@ HTML: type: markup tm_scope: text.html.basic ace_mode: html + codemirror_mode: html color: "#e44b23" aliases: - xhtml @@ -1523,6 +1589,7 @@ HTML+Django: - html+jinja - htmldjango ace_mode: django + codemirror_mode: django language_id: 147 HTML+ECR: type: markup @@ -1533,6 +1600,7 @@ HTML+ECR: extensions: - ".ecr" ace_mode: text + codemirror_mode: htmlembedded language_id: 148 HTML+EEX: type: markup @@ -1543,6 +1611,7 @@ HTML+EEX: extensions: - ".eex" ace_mode: text + codemirror_mode: htmlembedded language_id: 149 HTML+ERB: type: markup @@ -1554,6 +1623,7 @@ HTML+ERB: - ".erb" - ".erb.deface" ace_mode: text + codemirror_mode: htmlembedded language_id: 150 HTML+PHP: type: markup @@ -1562,6 +1632,7 @@ HTML+PHP: extensions: - ".phtml" ace_mode: php + codemirror_mode: php language_id: 151 HTTP: type: data @@ -1569,10 +1640,12 @@ HTTP: - ".http" tm_scope: source.httpspec ace_mode: text + codemirror_mode: http language_id: 152 Hack: type: programming ace_mode: php + codemirror_mode: php extensions: - ".hh" - ".php" @@ -1586,6 +1659,7 @@ Haml: - ".haml" - ".haml.deface" ace_mode: haml + codemirror_mode: haml color: "#ECE2A9" language_id: 154 Handlebars: @@ -1600,6 +1674,7 @@ Handlebars: - ".hbs" tm_scope: text.html.handlebars ace_mode: handlebars + codemirror_mode: handlebars language_id: 155 Harbour: type: programming @@ -1618,10 +1693,12 @@ Haskell: interpreters: - runhaskell ace_mode: haskell + codemirror_mode: haskell language_id: 157 Haxe: type: programming ace_mode: haxe + codemirror_mode: haxe color: "#df7900" extensions: - ".hx" @@ -1652,6 +1729,7 @@ IDL: - ".pro" - ".dlm" ace_mode: text + codemirror_mode: idl language_id: 161 IGOR Pro: type: programming @@ -1675,6 +1753,7 @@ INI: aliases: - dosini ace_mode: ini + codemirror_mode: properties language_id: 163 IRC log: type: data @@ -1774,6 +1853,7 @@ JSON: tm_scope: source.json group: JavaScript ace_mode: json + codemirror_mode: javascript searchable: false extensions: - ".json" @@ -1792,11 +1872,13 @@ JSON5: - ".json5" tm_scope: source.js ace_mode: javascript + codemirror_mode: javascript language_id: 175 JSONLD: type: data group: JavaScript ace_mode: javascript + codemirror_mode: javascript extensions: - ".jsonld" tm_scope: source.js @@ -1805,6 +1887,7 @@ JSONiq: color: "#40d47e" type: programming ace_mode: jsoniq + codemirror_mode: javascript extensions: - ".jq" tm_scope: source.jq @@ -1825,6 +1908,7 @@ Jade: - ".pug" tm_scope: text.jade ace_mode: jade + codemirror_mode: pug language_id: 179 Jasmin: type: programming @@ -1836,6 +1920,7 @@ Jasmin: Java: type: programming ace_mode: java + codemirror_mode: clike color: "#b07219" extensions: - ".java" @@ -1850,11 +1935,13 @@ Java Server Pages: - ".jsp" tm_scope: text.html.jsp ace_mode: jsp + codemirror_mode: htmlembedded language_id: 182 JavaScript: type: programming tm_scope: source.js ace_mode: javascript + codemirror_mode: javascript color: "#f1e05a" aliases: - js @@ -1903,10 +1990,12 @@ Julia: - ".jl" color: "#a270ba" ace_mode: julia + codemirror_mode: julia language_id: 184 Jupyter Notebook: type: markup ace_mode: json + codemirror_mode: javascript tm_scope: source.json color: "#DA5B0B" extensions: @@ -1936,6 +2025,7 @@ KiCad: Kit: type: markup ace_mode: html + codemirror_mode: html extensions: - ".kit" tm_scope: text.html.basic @@ -1949,6 +2039,7 @@ Kotlin: - ".kts" tm_scope: source.Kotlin ace_mode: text + codemirror_mode: kotlin language_id: 189 LFE: type: programming @@ -1958,6 +2049,7 @@ LFE: group: Erlang tm_scope: source.lisp ace_mode: lisp + codemirror_mode: commonlisp language_id: 190 LLVM: type: programming @@ -1990,6 +2082,7 @@ LabVIEW: - ".lvproj" tm_scope: text.xml ace_mode: xml + codemirror_mode: xml language_id: 194 Lasso: type: programming @@ -2013,6 +2106,7 @@ Latte: - ".latte" tm_scope: text.html.smarty ace_mode: smarty + codemirror_mode: smarty language_id: 196 Lean: type: programming @@ -2028,6 +2122,7 @@ Less: - ".less" tm_scope: source.css.less ace_mode: less + codemirror_mode: css color: "#A1D9A1" language_id: 198 Lex: @@ -2111,6 +2206,7 @@ Literate Haskell: - ".lhs" tm_scope: text.tex.latex.haskell ace_mode: text + codemirror_mode: haskell-literate language_id: 207 LiveScript: type: programming @@ -2124,6 +2220,7 @@ LiveScript: filenames: - Slakefile ace_mode: livescript + codemirror_mode: livescript language_id: 208 Logos: type: programming @@ -2144,6 +2241,7 @@ Logtalk: LookML: type: programming ace_mode: yaml + codemirror_mode: yaml color: "#652B81" extensions: - ".lookml" @@ -2159,6 +2257,7 @@ LoomScript: Lua: type: programming ace_mode: lua + codemirror_mode: lua color: "#000080" extensions: - ".lua" @@ -2177,8 +2276,8 @@ M: extensions: - ".mumps" - ".m" - tm_scope: source.lisp - ace_mode: lisp + ace_mode: text + codemirror_mode: mumps language_id: 214 M4: type: programming @@ -2215,6 +2314,7 @@ MTML: - ".mtml" tm_scope: text.html.basic ace_mode: html + codemirror_mode: html language_id: 218 MUF: type: programming @@ -2224,6 +2324,7 @@ MUF: - ".m" tm_scope: none ace_mode: forth + codemirror_mode: forth language_id: 219 Makefile: type: programming @@ -2252,6 +2353,7 @@ Makefile: interpreters: - make ace_mode: makefile + codemirror_mode: cmake language_id: 220 Mako: type: programming @@ -2264,6 +2366,7 @@ Mako: Markdown: type: prose ace_mode: markdown + codemirror_mode: markdown wrap: true extensions: - ".md" @@ -2297,6 +2400,7 @@ Mathematica: aliases: - mma ace_mode: text + codemirror_mode: mathematica language_id: 224 Matlab: type: programming @@ -2307,6 +2411,7 @@ Matlab: - ".matlab" - ".m" ace_mode: matlab + codemirror_mode: octave language_id: 225 Maven POM: type: data @@ -2314,6 +2419,7 @@ Maven POM: filenames: - pom.xml ace_mode: xml + codemirror_mode: xml language_id: 226 Max: type: programming @@ -2330,6 +2436,7 @@ Max: - ".pat" tm_scope: source.json ace_mode: json + codemirror_mode: javascript language_id: 227 MediaWiki: type: prose @@ -2358,6 +2465,7 @@ Metal: - ".metal" tm_scope: source.c++ ace_mode: c_cpp + codemirror_mode: clike language_id: 230 MiniD: type: programming @@ -2378,6 +2486,7 @@ Mirah: - ".mirah" tm_scope: source.ruby ace_mode: ruby + codemirror_mode: ruby language_id: 232 Modelica: type: programming @@ -2385,6 +2494,7 @@ Modelica: - ".mo" tm_scope: source.modelica ace_mode: text + codemirror_mode: modelica language_id: 233 Modula-2: type: programming @@ -2454,6 +2564,7 @@ NSIS: - ".nsi" - ".nsh" ace_mode: text + codemirror_mode: nsis language_id: 242 Nemerle: type: programming @@ -2487,6 +2598,7 @@ NetLogo: - ".nlogo" tm_scope: source.lisp ace_mode: lisp + codemirror_mode: commonlisp language_id: 246 NewLisp: type: programming @@ -2500,6 +2612,7 @@ NewLisp: - newlisp tm_scope: source.lisp ace_mode: lisp + codemirror_mode: commonlisp language_id: 247 Nginx: type: markup @@ -2512,6 +2625,7 @@ Nginx: aliases: - nginx configuration file ace_mode: text + codemirror_mode: nginx color: "#9469E9" language_id: 248 Nimrod: @@ -2559,6 +2673,7 @@ Nu: - Nukefile tm_scope: source.nu ace_mode: scheme + codemirror_mode: scheme interpreters: - nush language_id: 253 @@ -2571,11 +2686,13 @@ NumPy: - ".numsc" tm_scope: none ace_mode: text + codemirror_mode: python color: "#9C8AF9" language_id: 254 OCaml: type: programming ace_mode: ocaml + codemirror_mode: mllike color: "#3be133" extensions: - ".ml" @@ -2597,6 +2714,7 @@ ObjDump: - ".objdump" tm_scope: objdump.x86asm ace_mode: assembly_x86 + codemirror_mode: gas language_id: 256 Objective-C: type: programming @@ -2610,6 +2728,7 @@ Objective-C: - ".m" - ".h" ace_mode: objectivec + codemirror_mode: clike language_id: 257 Objective-C++: type: programming @@ -2622,6 +2741,7 @@ Objective-C++: extensions: - ".mm" ace_mode: objectivec + codemirror_mode: clike language_id: 258 Objective-J: type: programming @@ -2666,6 +2786,7 @@ OpenCL: - ".opencl" tm_scope: source.c ace_mode: c_cpp + codemirror_mode: clike language_id: 263 OpenEdge ABL: type: programming @@ -2688,6 +2809,7 @@ OpenRC runscript: - openrc-run tm_scope: source.shell ace_mode: sh + codemirror_mode: shell language_id: 265 OpenSCAD: type: programming @@ -2728,6 +2850,7 @@ Oz: - ".oz" tm_scope: source.oz ace_mode: text + codemirror_mode: oz language_id: 270 PAWN: type: programming @@ -2742,6 +2865,7 @@ PHP: type: programming tm_scope: text.html.php ace_mode: php + codemirror_mode: php color: "#4F5D95" extensions: - ".php" @@ -2764,6 +2888,7 @@ PHP: PLSQL: type: programming ace_mode: sql + codemirror_mode: sql tm_scope: none color: "#dad8d8" extensions: @@ -2778,6 +2903,7 @@ PLSQL: PLpgSQL: type: programming ace_mode: pgsql + codemirror_mode: sql tm_scope: source.sql extensions: - ".sql" @@ -2854,11 +2980,13 @@ Pascal: interpreters: - instantfpc ace_mode: pascal + codemirror_mode: pascal language_id: 281 Perl: type: programming tm_scope: source.perl ace_mode: perl + codemirror_mode: perl color: "#0298c3" extensions: - ".pl" @@ -2896,6 +3024,7 @@ Perl6: - perl6 tm_scope: source.perl6fe ace_mode: perl + codemirror_mode: perl language_id: 283 Pickle: type: data @@ -2935,6 +3064,7 @@ Pike: Pod: type: prose ace_mode: perl + codemirror_mode: perl wrap: true extensions: - ".pod" @@ -2980,6 +3110,7 @@ PowerBuilder: PowerShell: type: programming ace_mode: powershell + codemirror_mode: powershell aliases: - posh extensions: @@ -3025,6 +3156,7 @@ Protocol Buffer: - ".proto" tm_scope: source.protobuf ace_mode: protobuf + codemirror_mode: protobuf language_id: 297 Public Key: type: data @@ -3042,6 +3174,7 @@ Puppet: filenames: - Modulefile ace_mode: text + codemirror_mode: puppet tm_scope: source.puppet language_id: 299 Pure Data: @@ -3068,10 +3201,12 @@ PureScript: - ".purs" tm_scope: source.purescript ace_mode: haskell + codemirror_mode: haskell language_id: 302 Python: type: programming ace_mode: python + codemirror_mode: python color: "#3572A5" extensions: - ".py" @@ -3146,10 +3281,12 @@ R: interpreters: - Rscript ace_mode: r + codemirror_mode: r language_id: 307 RAML: type: markup ace_mode: yaml + codemirror_mode: yaml tm_scope: source.yaml color: "#77d9fb" extensions: @@ -3195,11 +3332,13 @@ RHTML: aliases: - html+ruby ace_mode: rhtml + codemirror_mode: htmlembedded language_id: 312 RMarkdown: type: prose wrap: true ace_mode: markdown + codemirror_mode: markdown extensions: - ".rmd" tm_scope: source.gfm @@ -3212,6 +3351,7 @@ RPM Spec: aliases: - specfile ace_mode: text + codemirror_mode: rpm language_id: 314 RUNOFF: type: markup @@ -3314,6 +3454,7 @@ RobotFramework: Rouge: type: programming ace_mode: clojure + codemirror_mode: clojure color: "#cc0088" extensions: - ".rg" @@ -3322,6 +3463,7 @@ Rouge: Ruby: type: programming ace_mode: ruby + codemirror_mode: ruby color: "#701516" aliases: - jruby @@ -3383,6 +3525,7 @@ Rust: - ".rs" - ".rs.in" ace_mode: rust + codemirror_mode: rust language_id: 327 SAS: type: programming @@ -3391,12 +3534,14 @@ SAS: - ".sas" tm_scope: source.sas ace_mode: text + codemirror_mode: sas language_id: 328 SCSS: type: markup tm_scope: source.scss group: CSS ace_mode: scss + codemirror_mode: css extensions: - ".scss" color: "#CF649A" @@ -3424,6 +3569,7 @@ SPARQL: type: data tm_scope: source.sparql ace_mode: text + codemirror_mode: sparql extensions: - ".sparql" - ".rq" @@ -3441,6 +3587,7 @@ SQL: type: data tm_scope: source.sql ace_mode: sql + codemirror_mode: sql extensions: - ".sql" - ".cql" @@ -3454,6 +3601,7 @@ SQL: SQLPL: type: programming ace_mode: sql + codemirror_mode: sql tm_scope: source.sql extensions: - ".sql" @@ -3464,6 +3612,7 @@ SRecode Template: color: "#348a34" tm_scope: source.lisp ace_mode: lisp + codemirror_mode: commonlisp extensions: - ".srt" language_id: 335 @@ -3481,6 +3630,7 @@ SVG: - ".svg" tm_scope: text.xml ace_mode: xml + codemirror_mode: xml language_id: 337 Sage: type: programming @@ -3490,6 +3640,7 @@ Sage: - ".sagews" tm_scope: source.python ace_mode: python + codemirror_mode: python language_id: 338 SaltStack: type: programming @@ -3501,6 +3652,7 @@ SaltStack: - ".sls" tm_scope: source.yaml.salt ace_mode: yaml + codemirror_mode: yaml language_id: 339 Sass: type: markup @@ -3509,11 +3661,13 @@ Sass: extensions: - ".sass" ace_mode: sass + codemirror_mode: sass color: "#CF649A" language_id: 340 Scala: type: programming ace_mode: scala + codemirror_mode: clike color: "#c22d40" extensions: - ".scala" @@ -3547,6 +3701,7 @@ Scheme: - gosh - r6rs ace_mode: scheme + codemirror_mode: scheme language_id: 343 Scilab: type: programming @@ -3598,6 +3753,7 @@ Shell: - sh - zsh ace_mode: sh + codemirror_mode: shell language_id: 346 ShellSession: type: programming @@ -3608,6 +3764,7 @@ ShellSession: - console tm_scope: text.shell-session ace_mode: sh + codemirror_mode: shell language_id: 347 Shen: type: programming @@ -3633,6 +3790,7 @@ Slim: - ".slim" tm_scope: text.slim ace_mode: text + codemirror_mode: slim language_id: 350 Smali: type: programming @@ -3650,12 +3808,14 @@ Smalltalk: aliases: - squeak ace_mode: text + codemirror_mode: smalltalk language_id: 352 Smarty: type: programming extensions: - ".tpl" ace_mode: smarty + codemirror_mode: smarty tm_scope: text.html.smarty language_id: 353 SourcePawn: @@ -3677,6 +3837,7 @@ Squirrel: - ".nut" tm_scope: source.c++ ace_mode: c_cpp + codemirror_mode: clike language_id: 355 Stan: type: programming @@ -3698,6 +3859,7 @@ Standard ML: - ".sml" tm_scope: source.ml ace_mode: text + codemirror_mode: mllike language_id: 357 Stata: type: programming @@ -3718,6 +3880,7 @@ Stylus: - ".styl" tm_scope: source.stylus ace_mode: stylus + codemirror_mode: stylus language_id: 359 SubRip Text: type: data @@ -3744,6 +3907,7 @@ Swift: extensions: - ".swift" ace_mode: text + codemirror_mode: swift language_id: 362 SystemVerilog: type: programming @@ -3753,6 +3917,7 @@ SystemVerilog: - ".svh" - ".vh" ace_mode: verilog + codemirror_mode: verilog language_id: 363 TLA: type: programming @@ -3767,6 +3932,7 @@ TOML: - ".toml" tm_scope: source.toml ace_mode: toml + codemirror_mode: toml language_id: 365 TXL: type: programming @@ -3786,6 +3952,7 @@ Tcl: - tclsh - wish ace_mode: tcl + codemirror_mode: tcl language_id: 367 Tcsh: type: programming @@ -3795,11 +3962,13 @@ Tcsh: - ".csh" tm_scope: source.shell ace_mode: sh + codemirror_mode: shell language_id: 368 TeX: type: markup color: "#3D6117" ace_mode: tex + codemirror_mode: stex wrap: true aliases: - latex @@ -3833,6 +4002,7 @@ Terra: - ".t" color: "#00004c" ace_mode: lua + codemirror_mode: lua interpreters: - lua language_id: 371 @@ -3865,6 +4035,7 @@ Text: Textile: type: prose ace_mode: textile + codemirror_mode: textile wrap: true extensions: - ".textile" @@ -3892,6 +4063,7 @@ Turtle: - ".ttl" tm_scope: source.turtle ace_mode: text + codemirror_mode: turtle language_id: 376 Twig: type: markup @@ -3900,6 +4072,7 @@ Twig: - ".twig" tm_scope: text.html.twig ace_mode: twig + codemirror_mode: twig language_id: 377 TypeScript: type: programming @@ -3911,11 +4084,13 @@ TypeScript: - ".tsx" tm_scope: source.ts ace_mode: typescript + codemirror_mode: javascript language_id: 378 Unified Parallel C: type: programming group: C ace_mode: c_cpp + codemirror_mode: clike color: "#4e3617" extensions: - ".upc" @@ -3924,6 +4099,7 @@ Unified Parallel C: Unity3D Asset: type: data ace_mode: yaml + codemirror_mode: yaml extensions: - ".anim" - ".asset" @@ -3938,6 +4114,7 @@ Uno: extensions: - ".uno" ace_mode: csharp + codemirror_mode: clike tm_scope: source.cs language_id: 381 UnrealScript: @@ -3947,6 +4124,7 @@ UnrealScript: - ".uc" tm_scope: source.java ace_mode: java + codemirror_mode: clike language_id: 382 UrWeb: type: programming @@ -3980,6 +4158,7 @@ VHDL: - ".vht" - ".vhw" ace_mode: vhdl + codemirror_mode: vhdl language_id: 385 Vala: type: programming @@ -3996,6 +4175,7 @@ Verilog: - ".v" - ".veo" ace_mode: verilog + codemirror_mode: verilog language_id: 387 VimL: type: programming @@ -4032,6 +4212,7 @@ Visual Basic: - vb.net - vbnet ace_mode: text + codemirror_mode: vb language_id: 389 Volt: type: programming @@ -4040,6 +4221,7 @@ Volt: - ".volt" tm_scope: source.d ace_mode: d + codemirror_mode: d language_id: 390 Vue: type: markup @@ -4048,6 +4230,7 @@ Vue: - ".vue" tm_scope: text.html.vue ace_mode: html + codemirror_mode: vue language_id: 391 Wavefront Material: type: data @@ -4077,6 +4260,7 @@ WebIDL: - ".webidl" tm_scope: source.webidl ace_mode: text + codemirror_mode: webidl language_id: 395 World of Warcraft Addon Data: type: data @@ -4102,10 +4286,12 @@ XC: - ".xc" tm_scope: source.xc ace_mode: c_cpp + codemirror_mode: clike language_id: 398 XML: type: data ace_mode: xml + codemirror_mode: xml aliases: - rss - xsd @@ -4214,6 +4400,7 @@ XPages: - ".xsp.metadata" tm_scope: none ace_mode: xml + codemirror_mode: xml language_id: 400 XProc: type: programming @@ -4222,6 +4409,7 @@ XProc: - ".xproc" tm_scope: text.xml ace_mode: xml + codemirror_mode: xml language_id: 401 XQuery: type: programming @@ -4233,6 +4421,7 @@ XQuery: - ".xqm" - ".xqy" ace_mode: xquery + codemirror_mode: xquery tm_scope: source.xq language_id: 402 XS: @@ -4241,6 +4430,7 @@ XS: - ".xs" tm_scope: source.c ace_mode: c_cpp + codemirror_mode: clike language_id: 403 XSLT: type: programming @@ -4251,6 +4441,7 @@ XSLT: - ".xsl" tm_scope: text.xml.xsl ace_mode: xml + codemirror_mode: xml color: "#EB8CEB" language_id: 404 Xojo: @@ -4287,6 +4478,7 @@ YAML: filenames: - ".clang-format" ace_mode: yaml + codemirror_mode: yaml language_id: 407 YANG: type: data @@ -4343,6 +4535,7 @@ eC: edn: type: data ace_mode: clojure + codemirror_mode: clojure extensions: - ".edn" tm_scope: source.clojure @@ -4390,6 +4583,7 @@ reStructuredText: - ".rest.txt" - ".rst.txt" ace_mode: text + codemirror_mode: rst language_id: 419 wisp: type: programming From 30298a9ef84964dd81446cc24e682e8302ee70cd Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 21 Sep 2016 09:27:28 -0700 Subject: [PATCH 0082/1214] Whitelist troublesome licenses --- test/test_grammars.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test_grammars.rb b/test/test_grammars.rb index 0a7260b843..69ec062784 100644 --- a/test/test_grammars.rb +++ b/test/test_grammars.rb @@ -5,7 +5,9 @@ class TestGrammars < Minitest::Test # List of projects that are allowed without licenses PROJECT_WHITELIST = [ - # Dual MIT and GPL license + "vendor/grammars/factor", + "vendor/grammars/go-tmbundle", + "vendor/grammars/jflex.tmbundle", "vendor/grammars/language-csharp", "vendor/grammars/sublimeassembly" ].freeze From 1d7ba18b158086e645aa6db6715da639b6d671da Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 21 Sep 2016 20:12:27 -0700 Subject: [PATCH 0083/1214] M scope --- lib/linguist/languages.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 541fd71fad..468f424a4c 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -17,7 +17,7 @@ # search_term - Deprecated: Some languages may be indexed under a # different alias. Avoid defining new exceptions. # language_id - Integer used as a language-name-independent indexed field so that we can rename -# languages in Linguist without reindexing all the code on GitHub. Must not be +# languages in Linguist without reindexing all the code on GitHub. Must not be # changed for existing languages without the explicit permission of GitHub staff. # color - CSS hex color to represent the language. # tm_scope - The TextMate scope that represents this programming @@ -2279,6 +2279,7 @@ M: ace_mode: text codemirror_mode: mumps language_id: 214 + tm_scope: none M4: type: programming extensions: From d6d7d38eb8349d4b57b78fef740c8f07d280dbe1 Mon Sep 17 00:00:00 2001 From: Todd Berman Date: Wed, 21 Sep 2016 20:52:49 -0700 Subject: [PATCH 0084/1214] Fix w/ a test --- lib/linguist/language.rb | 1 + test/test_language.rb | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index 7f4fd9031b..85eade2900 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -585,6 +585,7 @@ def inspect :aliases => options['aliases'], :tm_scope => options['tm_scope'], :ace_mode => options['ace_mode'], + :codemirror_mode => options['codemirror_mode'], :wrap => options['wrap'], :group_name => options['group'], :searchable => options.fetch('searchable', true), diff --git a/test/test_language.rb b/test/test_language.rb index 5c5aa02d17..fec4e29b3c 100644 --- a/test/test_language.rb +++ b/test/test_language.rb @@ -349,6 +349,10 @@ def test_ace_modes assert Language.ace_modes.include?(Language['FORTRAN']) end + def test_codemirror_mode + assert_equal 'clike', Language['C++'].codemirror_mode + end + def test_wrap assert_equal false, Language['C'].wrap assert_equal true, Language['Markdown'].wrap From 8e19aea39e70fb213ee490dfd701af70c950f44d Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 21 Sep 2016 20:58:12 -0700 Subject: [PATCH 0085/1214] Removing stray Sublime-VimL grammar reference --- vendor/grammars/Sublime-VimL | 1 - 1 file changed, 1 deletion(-) delete mode 160000 vendor/grammars/Sublime-VimL diff --git a/vendor/grammars/Sublime-VimL b/vendor/grammars/Sublime-VimL deleted file mode 160000 index b453aff6f7..0000000000 --- a/vendor/grammars/Sublime-VimL +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b453aff6f783769b6b895986da605a2db0db7379 From ecd4ae3bda486a9527f87519e4f2530e12e09786 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 21 Sep 2016 21:04:26 -0700 Subject: [PATCH 0086/1214] Bumping to v4.8.13 --- lib/linguist/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/version.rb b/lib/linguist/version.rb index 1fbf952ce4..000a9aae30 100644 --- a/lib/linguist/version.rb +++ b/lib/linguist/version.rb @@ -1,3 +1,3 @@ module Linguist - VERSION = "4.8.12" + VERSION = "4.8.13" end From a7a123a8db9e5df923ba63bc9aa2fdc1f7205a96 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Wed, 14 Sep 2016 15:48:46 +0200 Subject: [PATCH 0087/1214] Add heuristic for .inc files: the #declare keyword is unique to POV-Ray. Also added #local, #macro, and #while. --- lib/linguist/heuristics.rb | 2 ++ test/test_heuristics.rb | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index 1d5196f49b..2c99b4769b 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -202,6 +202,8 @@ def call(data) disambiguate ".inc" do |data| if /^<\?(?:php)?/.match(data) Language["PHP"] + elsif /^\s*#(declare|local|macro|while)\s/.match(data) + Language["POV-Ray SDL"] end end diff --git a/test/test_heuristics.rb b/test/test_heuristics.rb index e37da44b08..62e5a0500f 100644 --- a/test/test_heuristics.rb +++ b/test/test_heuristics.rb @@ -122,9 +122,12 @@ def test_hack_by_heuristics }) end + # Candidate languages = ["Assembly", "C++", "HTML", "PAWN", "PHP", + # "POV-Ray SDL", "Pascal", "SQL", "SourcePawn"] def test_inc_by_heuristics assert_heuristics({ - "PHP" => all_fixtures("PHP", "*.inc") + "PHP" => all_fixtures("PHP", "*.inc"), + "POV-Ray SDL" => all_fixtures("POV-Ray SDL", "*.inc") }) end From b4035a38045f7f5484f33e6ca438608a2a558e23 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Thu, 22 Sep 2016 20:33:39 -0700 Subject: [PATCH 0088/1214] Update grammars --- vendor/grammars/Docker.tmbundle | 2 +- vendor/grammars/atom-language-clean | 2 +- vendor/grammars/cython | 2 +- vendor/grammars/d.tmbundle | 2 +- vendor/grammars/elixir-tmbundle | 2 +- vendor/grammars/language-asn1 | 2 +- vendor/grammars/language-blade | 2 +- vendor/grammars/language-coffee-script | 2 +- vendor/grammars/language-csharp | 2 +- vendor/grammars/language-emacs-lisp | 2 +- vendor/grammars/language-haskell | 2 +- vendor/grammars/language-javascript | 2 +- vendor/grammars/language-less | 2 +- vendor/grammars/language-renpy | 2 +- vendor/grammars/language-roff | 2 +- vendor/grammars/language-viml | 2 +- vendor/grammars/make.tmbundle | 2 +- vendor/grammars/mediawiki.tmbundle | 2 +- vendor/grammars/sublime-rust | 2 +- vendor/grammars/vue-syntax-highlight | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/vendor/grammars/Docker.tmbundle b/vendor/grammars/Docker.tmbundle index 2d7d56af17..c6230cb62c 160000 --- a/vendor/grammars/Docker.tmbundle +++ b/vendor/grammars/Docker.tmbundle @@ -1 +1 @@ -Subproject commit 2d7d56af17fdf425fdebb34019b8cbd71110250a +Subproject commit c6230cb62c44eecea0123b54b86047517af25de1 diff --git a/vendor/grammars/atom-language-clean b/vendor/grammars/atom-language-clean index a9b837801d..7dafe70ddd 160000 --- a/vendor/grammars/atom-language-clean +++ b/vendor/grammars/atom-language-clean @@ -1 +1 @@ -Subproject commit a9b837801d887ea072bdb52b16b5e45fe88365a8 +Subproject commit 7dafe70dddd5bb87aa2d3a3c522bb1561b908bbb diff --git a/vendor/grammars/cython b/vendor/grammars/cython index e9f4d3a1e4..a816e2c05d 160000 --- a/vendor/grammars/cython +++ b/vendor/grammars/cython @@ -1 +1 @@ -Subproject commit e9f4d3a1e44a14df8f245f98591f62df34fbabd8 +Subproject commit a816e2c05d8a6f4bcf937b635c942e63afda2040 diff --git a/vendor/grammars/d.tmbundle b/vendor/grammars/d.tmbundle index 080e5343d8..039c92d9f2 160000 --- a/vendor/grammars/d.tmbundle +++ b/vendor/grammars/d.tmbundle @@ -1 +1 @@ -Subproject commit 080e5343d8979d2b9c0502e80ac82d906bb7996f +Subproject commit 039c92d9f2f583f8c51bbeb39094c9e208614001 diff --git a/vendor/grammars/elixir-tmbundle b/vendor/grammars/elixir-tmbundle index 6d0417e8eb..d632e68d09 160000 --- a/vendor/grammars/elixir-tmbundle +++ b/vendor/grammars/elixir-tmbundle @@ -1 +1 @@ -Subproject commit 6d0417e8eb7e182810755214d0a8cd6421146c01 +Subproject commit d632e68d09f179cb9fefdb5cfb16db44f39b216a diff --git a/vendor/grammars/language-asn1 b/vendor/grammars/language-asn1 index d45daeb849..bc3811c770 160000 --- a/vendor/grammars/language-asn1 +++ b/vendor/grammars/language-asn1 @@ -1 +1 @@ -Subproject commit d45daeb849f02a79d67585f629bdc83a06cc52e5 +Subproject commit bc3811c7706476e48f5085660b72b18ad028314f diff --git a/vendor/grammars/language-blade b/vendor/grammars/language-blade index fcbe2c2022..a5cdd44eb0 160000 --- a/vendor/grammars/language-blade +++ b/vendor/grammars/language-blade @@ -1 +1 @@ -Subproject commit fcbe2c202295ba1b3f3d2156b64a82999f51374d +Subproject commit a5cdd44eb03cbbba43e634079dec851f06efcc25 diff --git a/vendor/grammars/language-coffee-script b/vendor/grammars/language-coffee-script index 8f001efe73..b413773574 160000 --- a/vendor/grammars/language-coffee-script +++ b/vendor/grammars/language-coffee-script @@ -1 +1 @@ -Subproject commit 8f001efe73422d0f7a0c16121588c34e0bd5fe8c +Subproject commit b4137735740818665b0aa55bef843640aa820ca9 diff --git a/vendor/grammars/language-csharp b/vendor/grammars/language-csharp index c97c4bf74d..db4468545a 160000 --- a/vendor/grammars/language-csharp +++ b/vendor/grammars/language-csharp @@ -1 +1 @@ -Subproject commit c97c4bf74d74502c0b78901b12aab09186dc0eba +Subproject commit db4468545a8a1a5e76518e0ae2f6697dc21bf686 diff --git a/vendor/grammars/language-emacs-lisp b/vendor/grammars/language-emacs-lisp index 76ec86a3eb..77da742484 160000 --- a/vendor/grammars/language-emacs-lisp +++ b/vendor/grammars/language-emacs-lisp @@ -1 +1 @@ -Subproject commit 76ec86a3eb1bc819a4f19de7295a19602a935c09 +Subproject commit 77da74248435f559fe89724b6bb28d663201a2f0 diff --git a/vendor/grammars/language-haskell b/vendor/grammars/language-haskell index 296a7e94df..a53aca3856 160000 --- a/vendor/grammars/language-haskell +++ b/vendor/grammars/language-haskell @@ -1 +1 @@ -Subproject commit 296a7e94df6b3c89c5247510b7ba4eb71f14c55f +Subproject commit a53aca3856a1b7729a13e2311628bf323d3b7ff0 diff --git a/vendor/grammars/language-javascript b/vendor/grammars/language-javascript index b3d2bb649a..101a00adb2 160000 --- a/vendor/grammars/language-javascript +++ b/vendor/grammars/language-javascript @@ -1 +1 @@ -Subproject commit b3d2bb649a2a2b2f1e8bf391bcd50c603ac1e127 +Subproject commit 101a00adb2925e7e397bd6374b4aa04e4d17479d diff --git a/vendor/grammars/language-less b/vendor/grammars/language-less index d4f5db5fba..f34bb335c7 160000 --- a/vendor/grammars/language-less +++ b/vendor/grammars/language-less @@ -1 +1 @@ -Subproject commit d4f5db5fba671244c1f2085752d1ea9ce34f8bad +Subproject commit f34bb335c73c300b465c31f18fb540002395e050 diff --git a/vendor/grammars/language-renpy b/vendor/grammars/language-renpy index a3b9bbed66..82a4b91306 160000 --- a/vendor/grammars/language-renpy +++ b/vendor/grammars/language-renpy @@ -1 +1 @@ -Subproject commit a3b9bbed668137ab8db5dbafea4d5611957e68ee +Subproject commit 82a4b9130679d6602b9b3908fe938f9c50a04476 diff --git a/vendor/grammars/language-roff b/vendor/grammars/language-roff index f37fb6b7c4..743e1621c6 160000 --- a/vendor/grammars/language-roff +++ b/vendor/grammars/language-roff @@ -1 +1 @@ -Subproject commit f37fb6b7c45837de47cdb0bcb9e7a5a257b1ea24 +Subproject commit 743e1621c6a2ff2dd65b36c4a86ed85b97eed930 diff --git a/vendor/grammars/language-viml b/vendor/grammars/language-viml index ccdaff4535..5030fb8b02 160000 --- a/vendor/grammars/language-viml +++ b/vendor/grammars/language-viml @@ -1 +1 @@ -Subproject commit ccdaff4535b5720e9a89460afcc7b8dc65f46d27 +Subproject commit 5030fb8b0234fc5b03de7f20c9284a2208a5f449 diff --git a/vendor/grammars/make.tmbundle b/vendor/grammars/make.tmbundle index 1a1827da81..01069d2b38 160000 --- a/vendor/grammars/make.tmbundle +++ b/vendor/grammars/make.tmbundle @@ -1 +1 @@ -Subproject commit 1a1827da81e20fdce56e2658451340c070ca44b7 +Subproject commit 01069d2b38514f5d5d1519737f4be937566e195e diff --git a/vendor/grammars/mediawiki.tmbundle b/vendor/grammars/mediawiki.tmbundle index f8dead507a..bdd6eeb5ee 160000 --- a/vendor/grammars/mediawiki.tmbundle +++ b/vendor/grammars/mediawiki.tmbundle @@ -1 +1 @@ -Subproject commit f8dead507a1aed539376b9fcfde877a855842e8e +Subproject commit bdd6eeb5ee28c6fcc70cb76c7951c7da8f54e642 diff --git a/vendor/grammars/sublime-rust b/vendor/grammars/sublime-rust index d3c63dec57..bb8d73c7a2 160000 --- a/vendor/grammars/sublime-rust +++ b/vendor/grammars/sublime-rust @@ -1 +1 @@ -Subproject commit d3c63dec579be852b1d8006dc58a9a6f2a9e6cdc +Subproject commit bb8d73c7a23fab9e6cce5c6340a51f0089b40a91 diff --git a/vendor/grammars/vue-syntax-highlight b/vendor/grammars/vue-syntax-highlight index 909afa5384..f95b61a40d 160000 --- a/vendor/grammars/vue-syntax-highlight +++ b/vendor/grammars/vue-syntax-highlight @@ -1 +1 @@ -Subproject commit 909afa5384d6dcd01f7d883fe2b8b6067f970a26 +Subproject commit f95b61a40dbae2d415a5a9fed90d46a59a3df0cb From a1901fceff5780fb7f872743302aab4329556ec8 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Thu, 22 Sep 2016 21:03:33 -0700 Subject: [PATCH 0089/1214] Bump version to v4.8.14 --- lib/linguist/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/version.rb b/lib/linguist/version.rb index 000a9aae30..920b08ea63 100644 --- a/lib/linguist/version.rb +++ b/lib/linguist/version.rb @@ -1,3 +1,3 @@ module Linguist - VERSION = "4.8.13" + VERSION = "4.8.14" end From 6a54ee767fa222be2139d3529d71c670f6665b8e Mon Sep 17 00:00:00 2001 From: Josh Cheek Date: Fri, 23 Sep 2016 12:51:46 -0700 Subject: [PATCH 0090/1214] Set interpreters for Julia Eg this file is not currently highlighted: https://github.com/JoshCheek/language-sampler-for-fullpath/blob/b766dcdbd249ec63516f491390a75315e78cba95/julia/fullpath#L1 --- lib/linguist/languages.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 4bb5fbef7e..1587c10ddf 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1994,6 +1994,8 @@ Julia: type: programming extensions: - ".jl" + interpreters: + - julia color: "#a270ba" ace_mode: julia codemirror_mode: julia From 88c74fa9c2016c3af79333be301196458ffd8714 Mon Sep 17 00:00:00 2001 From: Todd Berman Date: Fri, 23 Sep 2016 13:40:19 -0700 Subject: [PATCH 0091/1214] Convert from mode names to mimetypes for better usage. --- lib/linguist/language.rb | 6 +- lib/linguist/languages.yml | 386 ++++++++++++++++++------------------- test/test_language.rb | 2 +- 3 files changed, 196 insertions(+), 198 deletions(-) diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index 85eade2900..49adbbd841 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -398,13 +398,13 @@ def initialize(attributes = {}) # Returns a String name or nil attr_reader :ace_mode - # Public: Get Codemirror mode + # Public: Get Codemirror mode (as expressed by a mimetype) # # Examples # # # => "nil" - # # => "javascript" - # # => "clike" + # # => "text/x-javascript" + # # => "text/x-csrc" # # Returns a String name or nil attr_reader :codemirror_mode diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 4bb5fbef7e..5762f715ce 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -59,7 +59,7 @@ AGS Script: - ".ash" tm_scope: source.c++ ace_mode: c_cpp - codemirror_mode: clike + codemirror_mode: text/x-c++src language_id: 2 AMPL: type: programming @@ -97,7 +97,7 @@ APL: - dyalog tm_scope: source.apl ace_mode: text - codemirror_mode: apl + codemirror_mode: text/apl language_id: 6 ASN.1: type: data @@ -107,7 +107,7 @@ ASN.1: - ".asn1" tm_scope: source.asn ace_mode: text - codemirror_mode: asn.1 + codemirror_mode: text/x-ttcn-asn language_id: 7 ASP: type: programming @@ -126,7 +126,7 @@ ASP: - ".aspx" - ".axd" ace_mode: text - codemirror_mode: htmlembedded + codemirror_mode: application/x-aspx language_id: 8 ATS: type: programming @@ -189,7 +189,7 @@ Alpine Abuild: - APKBUILD tm_scope: source.shell ace_mode: sh - codemirror_mode: shell + codemirror_mode: text/x-sh language_id: 14 Ant Build System: type: data @@ -198,7 +198,7 @@ Ant Build System: - ant.xml - build.xml ace_mode: xml - codemirror_mode: xml + codemirror_mode: application/xml language_id: 15 ApacheConf: type: markup @@ -217,7 +217,7 @@ Apex: - ".cls" tm_scope: source.java ace_mode: java - codemirror_mode: clike + codemirror_mode: text/x-java language_id: 17 Apollo Guidance Computer: type: programming @@ -227,7 +227,7 @@ Apollo Guidance Computer: - ".agc" tm_scope: source.agc ace_mode: assembly_x86 - codemirror_mode: gas + codemirror_mode: text/x-gas language_id: 18 AppleScript: type: programming @@ -256,7 +256,7 @@ Arduino: - ".ino" tm_scope: source.c++ ace_mode: c_cpp - codemirror_mode: clike + codemirror_mode: text/x-c++src language_id: 21 AsciiDoc: type: prose @@ -289,7 +289,7 @@ Assembly: - ".nasm" tm_scope: source.assembly ace_mode: assembly_x86 - codemirror_mode: gas + codemirror_mode: text/x-gas language_id: 24 Augeas: type: programming @@ -427,7 +427,7 @@ Brainfuck: - ".bf" tm_scope: source.bf ace_mode: text - codemirror_mode: brainfuck + codemirror_mode: text/x-brainfuck language_id: 38 Brightscript: type: programming @@ -454,12 +454,12 @@ C: interpreters: - tcc ace_mode: c_cpp - codemirror_mode: clike + codemirror_mode: text/x-csrc language_id: 41 C#: type: programming ace_mode: csharp - codemirror_mode: clike + codemirror_mode: text/x-csharp tm_scope: source.cs search_term: csharp color: "#178600" @@ -474,7 +474,7 @@ C#: C++: type: programming ace_mode: c_cpp - codemirror_mode: clike + codemirror_mode: text/x-c++src search_term: cpp color: "#f34b7d" aliases: @@ -502,7 +502,7 @@ C-ObjDump: - ".c-objdump" tm_scope: objdump.x86asm ace_mode: assembly_x86 - codemirror_mode: gas + codemirror_mode: text/x-gas language_id: 44 C2hs Haskell: type: programming @@ -513,7 +513,7 @@ C2hs Haskell: - ".chs" tm_scope: source.haskell ace_mode: haskell - codemirror_mode: haskell + codemirror_mode: text/x-haskell language_id: 45 CLIPS: type: programming @@ -530,7 +530,7 @@ CMake: filenames: - CMakeLists.txt ace_mode: text - codemirror_mode: cmake + codemirror_mode: text/x-cmake language_id: 47 COBOL: type: programming @@ -541,7 +541,7 @@ COBOL: - ".cobol" - ".cpy" ace_mode: cobol - codemirror_mode: cobol + codemirror_mode: text/x-cobol language_id: 48 COLLADA: type: data @@ -549,13 +549,13 @@ COLLADA: - ".dae" tm_scope: text.xml ace_mode: xml - codemirror_mode: xml + codemirror_mode: text/x-xml language_id: 49 CSS: type: markup tm_scope: source.css ace_mode: css - codemirror_mode: css + codemirror_mode: text/css color: "#563d7c" extensions: - ".css" @@ -611,7 +611,7 @@ ChucK: - ".ck" tm_scope: source.java ace_mode: java - codemirror_mode: clike + codemirror_mode: text/x-java language_id: 57 Cirru: type: programming @@ -648,7 +648,7 @@ Click: Clojure: type: programming ace_mode: clojure - codemirror_mode: clojure + codemirror_mode: text/x-clojure color: "#db5855" extensions: - ".clj" @@ -667,7 +667,7 @@ CoffeeScript: type: programming tm_scope: source.coffee ace_mode: coffee - codemirror_mode: coffeescript + codemirror_mode: text/x-coffeescript color: "#244776" aliases: - coffee @@ -733,7 +733,7 @@ Common Lisp: - clisp - ecl ace_mode: lisp - codemirror_mode: commonlisp + codemirror_mode: text/x-common-lisp language_id: 66 Component Pascal: type: programming @@ -746,7 +746,7 @@ Component Pascal: - delphi - objectpascal ace_mode: pascal - codemirror_mode: pascal + codemirror_mode: text/x-pascal language_id: 67 Cool: type: programming @@ -774,7 +774,7 @@ Cpp-ObjDump: aliases: - c++-objdump ace_mode: assembly_x86 - codemirror_mode: gas + codemirror_mode: text/x-gas language_id: 70 Creole: type: prose @@ -790,7 +790,7 @@ Crystal: extensions: - ".cr" ace_mode: ruby - codemirror_mode: crystal + codemirror_mode: text/x-crystal tm_scope: source.crystal interpreters: - crystal @@ -840,7 +840,7 @@ Cuda: - ".cuh" tm_scope: source.cuda-c++ ace_mode: c_cpp - codemirror_mode: clike + codemirror_mode: text/x-c++src color: "#3A4E3A" language_id: 77 Cycript: @@ -849,7 +849,7 @@ Cycript: - ".cy" tm_scope: source.js ace_mode: javascript - codemirror_mode: javascript + codemirror_mode: text/javascript language_id: 78 Cython: type: programming @@ -861,7 +861,7 @@ Cython: aliases: - pyrex ace_mode: text - codemirror_mode: python + codemirror_mode: text/x-cython language_id: 79 D: type: programming @@ -870,7 +870,7 @@ D: - ".d" - ".di" ace_mode: d - codemirror_mode: d + codemirror_mode: text/x-d language_id: 80 D-ObjDump: type: data @@ -878,7 +878,7 @@ D-ObjDump: - ".d-objdump" tm_scope: objdump.x86asm ace_mode: assembly_x86 - codemirror_mode: gas + codemirror_mode: text/x-gas language_id: 81 DIGITAL Command Language: type: programming @@ -917,7 +917,7 @@ DTrace: - dtrace tm_scope: source.c ace_mode: c_cpp - codemirror_mode: clike + codemirror_mode: text/x-csrc language_id: 85 Darcs Patch: type: data @@ -938,7 +938,7 @@ Dart: interpreters: - dart ace_mode: dart - codemirror_mode: dart + codemirror_mode: text/x-dart language_id: 87 Diff: type: data @@ -949,7 +949,7 @@ Diff: - udiff tm_scope: source.diff ace_mode: diff - codemirror_mode: diff + codemirror_mode: text/x-diff language_id: 88 Dockerfile: type: data @@ -959,7 +959,7 @@ Dockerfile: filenames: - Dockerfile ace_mode: dockerfile - codemirror_mode: dockerfile + codemirror_mode: text/x-dockerfile language_id: 89 Dogescript: type: programming @@ -978,7 +978,7 @@ Dylan: - ".intr" - ".lid" ace_mode: text - codemirror_mode: dylan + codemirror_mode: text/x-dylan language_id: 91 E: type: programming @@ -998,7 +998,7 @@ ECL: - ".eclxml" tm_scope: none ace_mode: text - codemirror_mode: ecl + codemirror_mode: text/x-ecl language_id: 93 ECLiPSe: type: programming @@ -1024,7 +1024,7 @@ EQ: - ".eq" tm_scope: source.cs ace_mode: csharp - codemirror_mode: clike + codemirror_mode: text/x-csharp language_id: 96 Eagle: type: markup @@ -1034,7 +1034,7 @@ Eagle: - ".brd" tm_scope: text.xml ace_mode: xml - codemirror_mode: xml + codemirror_mode: text/xml language_id: 97 Ecere Projects: type: data @@ -1043,7 +1043,7 @@ Ecere Projects: - ".epj" tm_scope: source.json ace_mode: json - codemirror_mode: json + codemirror_mode: application/json language_id: 98 Eiffel: type: programming @@ -1051,7 +1051,7 @@ Eiffel: extensions: - ".e" ace_mode: eiffel - codemirror_mode: eiffel + codemirror_mode: text/x-eiffel language_id: 99 Elixir: type: programming @@ -1072,7 +1072,7 @@ Elm: - ".elm" tm_scope: source.elm ace_mode: elm - codemirror_mode: elm + codemirror_mode: text/x-elm language_id: 101 Emacs Lisp: type: programming @@ -1096,7 +1096,7 @@ Emacs Lisp: - ".emacs" - ".emacs.desktop" ace_mode: lisp - codemirror_mode: commonlisp + codemirror_mode: text/x-common-lisp language_id: 102 EmberScript: type: programming @@ -1106,7 +1106,7 @@ EmberScript: - ".emberscript" tm_scope: source.coffee ace_mode: coffee - codemirror_mode: coffeescript + codemirror_mode: text/x-coffeescript language_id: 103 Erlang: type: programming @@ -1124,7 +1124,7 @@ Erlang: - rebar.config.lock - rebar.lock ace_mode: erlang - codemirror_mode: erlang + codemirror_mode: text/x-erlang interpreters: - escript language_id: 104 @@ -1140,7 +1140,7 @@ F#: - ".fsx" tm_scope: source.fsharp ace_mode: text - codemirror_mode: mllike + codemirror_mode: text/x-fsharp language_id: 105 FLUX: type: programming @@ -1165,7 +1165,7 @@ FORTRAN: - ".fpp" tm_scope: source.fortran.modern ace_mode: text - codemirror_mode: fortran + codemirror_mode: text/x-fortran language_id: 107 Factor: type: programming @@ -1176,7 +1176,7 @@ Factor: - ".factor-boot-rc" - ".factor-rc" ace_mode: text - codemirror_mode: factor + codemirror_mode: text/x-factor language_id: 108 Fancy: type: programming @@ -1232,7 +1232,7 @@ Forth: - ".frt" - ".fs" ace_mode: forth - codemirror_mode: forth + codemirror_mode: text/x-forth language_id: 114 FreeMarker: type: programming @@ -1287,7 +1287,7 @@ GAS: - ".ms" tm_scope: source.assembly ace_mode: assembly_x86 - codemirror_mode: gas + codemirror_mode: text/x-gas language_id: 120 GCC Machine Description: type: programming @@ -1295,7 +1295,7 @@ GCC Machine Description: - ".md" tm_scope: source.lisp ace_mode: lisp - codemirror_mode: commonlisp + codemirror_mode: text/x-common-lisp language_id: 121 GDB: type: programming @@ -1340,7 +1340,7 @@ Game Maker Language: - ".gml" tm_scope: source.c++ ace_mode: c_cpp - codemirror_mode: clike + codemirror_mode: text/x-c++src language_id: 125 Genshi: type: programming @@ -1351,7 +1351,7 @@ Genshi: - xml+genshi - xml+kid ace_mode: xml - codemirror_mode: xml + codemirror_mode: text/xml language_id: 126 Gentoo Ebuild: type: programming @@ -1360,7 +1360,7 @@ Gentoo Ebuild: - ".ebuild" tm_scope: source.shell ace_mode: sh - codemirror_mode: shell + codemirror_mode: text/x-sh language_id: 127 Gentoo Eclass: type: programming @@ -1369,7 +1369,7 @@ Gentoo Eclass: - ".eclass" tm_scope: source.shell ace_mode: sh - codemirror_mode: shell + codemirror_mode: text/x-sh language_id: 128 Gettext Catalog: type: prose @@ -1390,7 +1390,7 @@ Glyph: - ".glf" tm_scope: source.tcl ace_mode: tcl - codemirror_mode: tcl + codemirror_mode: text/x-tcl language_id: 130 Gnuplot: type: programming @@ -1411,7 +1411,7 @@ Go: extensions: - ".go" ace_mode: golang - codemirror_mode: go + codemirror_mode: text/x-go language_id: 132 Golo: type: programming @@ -1457,7 +1457,7 @@ Grammatical Framework: color: "#79aa7a" tm_scope: source.haskell ace_mode: haskell - codemirror_mode: haskell + codemirror_mode: text/x-haskell language_id: 137 Graph Modeling Language: type: data @@ -1517,12 +1517,12 @@ Groff: - nroff - troff ace_mode: text - codemirror_mode: troff + codemirror_mode: text/troff language_id: 141 Groovy: type: programming ace_mode: groovy - codemirror_mode: groovy + codemirror_mode: text/x-groovy color: "#e69f56" extensions: - ".groovy" @@ -1544,7 +1544,7 @@ Groovy Server Pages: - ".gsp" tm_scope: text.html.jsp ace_mode: jsp - codemirror_mode: htmlembedded + codemirror_mode: application/x-jsp language_id: 143 HCL: type: programming @@ -1552,7 +1552,7 @@ HCL: - ".hcl" - ".tf" ace_mode: ruby - codemirror_mode: ruby + codemirror_mode: text/x-ruby tm_scope: source.ruby language_id: 144 HLSL: @@ -1569,7 +1569,7 @@ HTML: type: markup tm_scope: text.html.basic ace_mode: html - codemirror_mode: html + codemirror_mode: text/html color: "#e44b23" aliases: - xhtml @@ -1595,7 +1595,7 @@ HTML+Django: - html+jinja - htmldjango ace_mode: django - codemirror_mode: django + codemirror_mode: text/x-django language_id: 147 HTML+ECR: type: markup @@ -1606,7 +1606,7 @@ HTML+ECR: extensions: - ".ecr" ace_mode: text - codemirror_mode: htmlembedded + codemirror_mode: text/html language_id: 148 HTML+EEX: type: markup @@ -1617,7 +1617,7 @@ HTML+EEX: extensions: - ".eex" ace_mode: text - codemirror_mode: htmlembedded + codemirror_mode: text/html language_id: 149 HTML+ERB: type: markup @@ -1629,7 +1629,7 @@ HTML+ERB: - ".erb" - ".erb.deface" ace_mode: text - codemirror_mode: htmlembedded + codemirror_mode: application/x-erb language_id: 150 HTML+PHP: type: markup @@ -1638,7 +1638,7 @@ HTML+PHP: extensions: - ".phtml" ace_mode: php - codemirror_mode: php + codemirror_mode: application/x-httpd-php language_id: 151 HTTP: type: data @@ -1646,12 +1646,12 @@ HTTP: - ".http" tm_scope: source.httpspec ace_mode: text - codemirror_mode: http + codemirror_mode: message/http language_id: 152 Hack: type: programming ace_mode: php - codemirror_mode: php + codemirror_mode: application/x-httpd-php extensions: - ".hh" - ".php" @@ -1665,7 +1665,7 @@ Haml: - ".haml" - ".haml.deface" ace_mode: haml - codemirror_mode: haml + codemirror_mode: text/x-haml color: "#ECE2A9" language_id: 154 Handlebars: @@ -1680,7 +1680,6 @@ Handlebars: - ".hbs" tm_scope: text.html.handlebars ace_mode: handlebars - codemirror_mode: handlebars language_id: 155 Harbour: type: programming @@ -1699,12 +1698,12 @@ Haskell: interpreters: - runhaskell ace_mode: haskell - codemirror_mode: haskell + codemirror_mode: text/x-haskell language_id: 157 Haxe: type: programming ace_mode: haxe - codemirror_mode: haxe + codemirror_mode: text/x-haxe color: "#df7900" extensions: - ".hx" @@ -1735,7 +1734,7 @@ IDL: - ".pro" - ".dlm" ace_mode: text - codemirror_mode: idl + codemirror_mode: text/x-idl language_id: 161 IGOR Pro: type: programming @@ -1759,7 +1758,7 @@ INI: aliases: - dosini ace_mode: ini - codemirror_mode: properties + codemirror_mode: text/x-properties language_id: 163 IRC log: type: data @@ -1859,7 +1858,7 @@ JSON: tm_scope: source.json group: JavaScript ace_mode: json - codemirror_mode: javascript + codemirror_mode: application/json searchable: false extensions: - ".json" @@ -1878,13 +1877,13 @@ JSON5: - ".json5" tm_scope: source.js ace_mode: javascript - codemirror_mode: javascript + codemirror_mode: application/json language_id: 175 JSONLD: type: data group: JavaScript ace_mode: javascript - codemirror_mode: javascript + codemirror_mode: application/ld+json extensions: - ".jsonld" tm_scope: source.js @@ -1893,7 +1892,7 @@ JSONiq: color: "#40d47e" type: programming ace_mode: jsoniq - codemirror_mode: javascript + codemirror_mode: application/json extensions: - ".jq" tm_scope: source.jq @@ -1904,7 +1903,7 @@ JSX: extensions: - ".jsx" tm_scope: source.js.jsx - ace_mode: javascript + ace_mode: text/jsx language_id: 178 Jade: group: HTML @@ -1914,7 +1913,7 @@ Jade: - ".pug" tm_scope: text.jade ace_mode: jade - codemirror_mode: pug + codemirror_mode: text/x-pug language_id: 179 Jasmin: type: programming @@ -1926,7 +1925,7 @@ Jasmin: Java: type: programming ace_mode: java - codemirror_mode: clike + codemirror_mode: text/x-java color: "#b07219" extensions: - ".java" @@ -1941,13 +1940,13 @@ Java Server Pages: - ".jsp" tm_scope: text.html.jsp ace_mode: jsp - codemirror_mode: htmlembedded + codemirror_mode: application/x-jsp language_id: 182 JavaScript: type: programming tm_scope: source.js ace_mode: javascript - codemirror_mode: javascript + codemirror_mode: text/javascript color: "#f1e05a" aliases: - js @@ -1996,12 +1995,12 @@ Julia: - ".jl" color: "#a270ba" ace_mode: julia - codemirror_mode: julia + codemirror_mode: text/x-julia language_id: 184 Jupyter Notebook: type: markup ace_mode: json - codemirror_mode: javascript + codemirror_mode: application/json tm_scope: source.json color: "#DA5B0B" extensions: @@ -2031,7 +2030,7 @@ KiCad: Kit: type: markup ace_mode: html - codemirror_mode: html + codemirror_mode: text/html extensions: - ".kit" tm_scope: text.html.basic @@ -2045,7 +2044,7 @@ Kotlin: - ".kts" tm_scope: source.Kotlin ace_mode: text - codemirror_mode: kotlin + codemirror_mode: text/x-kotlin language_id: 189 LFE: type: programming @@ -2055,7 +2054,7 @@ LFE: group: Erlang tm_scope: source.lisp ace_mode: lisp - codemirror_mode: commonlisp + codemirror_mode: text/x-common-lisp language_id: 190 LLVM: type: programming @@ -2088,7 +2087,7 @@ LabVIEW: - ".lvproj" tm_scope: text.xml ace_mode: xml - codemirror_mode: xml + codemirror_mode: text/xml language_id: 194 Lasso: type: programming @@ -2112,7 +2111,7 @@ Latte: - ".latte" tm_scope: text.html.smarty ace_mode: smarty - codemirror_mode: smarty + codemirror_mode: text/x-smarty language_id: 196 Lean: type: programming @@ -2128,7 +2127,7 @@ Less: - ".less" tm_scope: source.css.less ace_mode: less - codemirror_mode: css + codemirror_mode: text/css color: "#A1D9A1" language_id: 198 Lex: @@ -2212,7 +2211,7 @@ Literate Haskell: - ".lhs" tm_scope: text.tex.latex.haskell ace_mode: text - codemirror_mode: haskell-literate + codemirror_mode: text/x-literate-haskell language_id: 207 LiveScript: type: programming @@ -2226,7 +2225,7 @@ LiveScript: filenames: - Slakefile ace_mode: livescript - codemirror_mode: livescript + codemirror_mode: text/x-livescript language_id: 208 Logos: type: programming @@ -2247,7 +2246,7 @@ Logtalk: LookML: type: programming ace_mode: yaml - codemirror_mode: yaml + codemirror_mode: text/x-yaml color: "#652B81" extensions: - ".lookml" @@ -2263,7 +2262,7 @@ LoomScript: Lua: type: programming ace_mode: lua - codemirror_mode: lua + codemirror_mode: text/x-lua color: "#000080" extensions: - ".lua" @@ -2283,7 +2282,7 @@ M: - ".mumps" - ".m" ace_mode: text - codemirror_mode: mumps + codemirror_mode: text/x-mumps language_id: 214 tm_scope: none M4: @@ -2321,7 +2320,7 @@ MTML: - ".mtml" tm_scope: text.html.basic ace_mode: html - codemirror_mode: html + codemirror_mode: text/html language_id: 218 MUF: type: programming @@ -2331,7 +2330,7 @@ MUF: - ".m" tm_scope: none ace_mode: forth - codemirror_mode: forth + codemirror_mode: text/x-forth language_id: 219 Makefile: type: programming @@ -2360,7 +2359,7 @@ Makefile: interpreters: - make ace_mode: makefile - codemirror_mode: cmake + codemirror_mode: text/x-cmake language_id: 220 Mako: type: programming @@ -2373,7 +2372,7 @@ Mako: Markdown: type: prose ace_mode: markdown - codemirror_mode: markdown + codemirror_mode: text/x-gfm wrap: true extensions: - ".md" @@ -2407,7 +2406,7 @@ Mathematica: aliases: - mma ace_mode: text - codemirror_mode: mathematica + codemirror_mode: text/x-mathematica language_id: 224 Matlab: type: programming @@ -2418,7 +2417,7 @@ Matlab: - ".matlab" - ".m" ace_mode: matlab - codemirror_mode: octave + codemirror_mode: text/x-octave language_id: 225 Maven POM: type: data @@ -2426,7 +2425,7 @@ Maven POM: filenames: - pom.xml ace_mode: xml - codemirror_mode: xml + codemirror_mode: text/xml language_id: 226 Max: type: programming @@ -2443,7 +2442,7 @@ Max: - ".pat" tm_scope: source.json ace_mode: json - codemirror_mode: javascript + codemirror_mode: application/json language_id: 227 MediaWiki: type: prose @@ -2472,7 +2471,7 @@ Metal: - ".metal" tm_scope: source.c++ ace_mode: c_cpp - codemirror_mode: clike + codemirror_mode: text/x-c++src language_id: 230 MiniD: type: programming @@ -2493,7 +2492,7 @@ Mirah: - ".mirah" tm_scope: source.ruby ace_mode: ruby - codemirror_mode: ruby + codemirror_mode: text/x-ruby language_id: 232 Modelica: type: programming @@ -2501,7 +2500,7 @@ Modelica: - ".mo" tm_scope: source.modelica ace_mode: text - codemirror_mode: modelica + codemirror_mode: text/x-modelica language_id: 233 Modula-2: type: programming @@ -2571,7 +2570,7 @@ NSIS: - ".nsi" - ".nsh" ace_mode: text - codemirror_mode: nsis + codemirror_mode: text/x-nsis language_id: 242 Nemerle: type: programming @@ -2605,7 +2604,7 @@ NetLogo: - ".nlogo" tm_scope: source.lisp ace_mode: lisp - codemirror_mode: commonlisp + codemirror_mode: text/x-common-lisp language_id: 246 NewLisp: type: programming @@ -2619,7 +2618,7 @@ NewLisp: - newlisp tm_scope: source.lisp ace_mode: lisp - codemirror_mode: commonlisp + codemirror_mode: text/x-common-lisp language_id: 247 Nginx: type: markup @@ -2632,7 +2631,7 @@ Nginx: aliases: - nginx configuration file ace_mode: text - codemirror_mode: nginx + codemirror_mode: text/x-nginx-conf color: "#9469E9" language_id: 248 Nimrod: @@ -2680,7 +2679,7 @@ Nu: - Nukefile tm_scope: source.nu ace_mode: scheme - codemirror_mode: scheme + codemirror_mode: text/x-scheme interpreters: - nush language_id: 253 @@ -2693,13 +2692,13 @@ NumPy: - ".numsc" tm_scope: none ace_mode: text - codemirror_mode: python + codemirror_mode: text/x-python color: "#9C8AF9" language_id: 254 OCaml: type: programming ace_mode: ocaml - codemirror_mode: mllike + codemirror_mode: text/x-ocaml color: "#3be133" extensions: - ".ml" @@ -2721,7 +2720,7 @@ ObjDump: - ".objdump" tm_scope: objdump.x86asm ace_mode: assembly_x86 - codemirror_mode: gas + codemirror_mode: text/x-gas language_id: 256 Objective-C: type: programming @@ -2735,7 +2734,7 @@ Objective-C: - ".m" - ".h" ace_mode: objectivec - codemirror_mode: clike + codemirror_mode: text/x-objectivec language_id: 257 Objective-C++: type: programming @@ -2748,7 +2747,7 @@ Objective-C++: extensions: - ".mm" ace_mode: objectivec - codemirror_mode: clike + codemirror_mode: text/x-objectivec language_id: 258 Objective-J: type: programming @@ -2793,7 +2792,7 @@ OpenCL: - ".opencl" tm_scope: source.c ace_mode: c_cpp - codemirror_mode: clike + codemirror_mode: text/x-csrc language_id: 263 OpenEdge ABL: type: programming @@ -2816,7 +2815,7 @@ OpenRC runscript: - openrc-run tm_scope: source.shell ace_mode: sh - codemirror_mode: shell + codemirror_mode: text/x-sh language_id: 265 OpenSCAD: type: programming @@ -2857,7 +2856,7 @@ Oz: - ".oz" tm_scope: source.oz ace_mode: text - codemirror_mode: oz + codemirror_mode: text/x-oz language_id: 270 PAWN: type: programming @@ -2872,7 +2871,7 @@ PHP: type: programming tm_scope: text.html.php ace_mode: php - codemirror_mode: php + codemirror_mode: application/x-httpd-php color: "#4F5D95" extensions: - ".php" @@ -2895,7 +2894,7 @@ PHP: PLSQL: type: programming ace_mode: sql - codemirror_mode: sql + codemirror_mode: text/x-plsql tm_scope: none color: "#dad8d8" extensions: @@ -2910,7 +2909,7 @@ PLSQL: PLpgSQL: type: programming ace_mode: pgsql - codemirror_mode: sql + codemirror_mode: text/x-sql tm_scope: source.sql extensions: - ".sql" @@ -2987,13 +2986,13 @@ Pascal: interpreters: - instantfpc ace_mode: pascal - codemirror_mode: pascal + codemirror_mode: text/x-pascal language_id: 281 Perl: type: programming tm_scope: source.perl ace_mode: perl - codemirror_mode: perl + codemirror_mode: text/x-perl color: "#0298c3" extensions: - ".pl" @@ -3031,7 +3030,7 @@ Perl6: - perl6 tm_scope: source.perl6fe ace_mode: perl - codemirror_mode: perl + codemirror_mode: text/x-perl language_id: 283 Pickle: type: data @@ -3071,7 +3070,7 @@ Pike: Pod: type: prose ace_mode: perl - codemirror_mode: perl + codemirror_mode: text/x-perl wrap: true extensions: - ".pod" @@ -3117,7 +3116,7 @@ PowerBuilder: PowerShell: type: programming ace_mode: powershell - codemirror_mode: powershell + codemirror_mode: text/x-powershell aliases: - posh extensions: @@ -3163,7 +3162,7 @@ Protocol Buffer: - ".proto" tm_scope: source.protobuf ace_mode: protobuf - codemirror_mode: protobuf + codemirror_mode: text/x-protobuf language_id: 297 Public Key: type: data @@ -3181,7 +3180,7 @@ Puppet: filenames: - Modulefile ace_mode: text - codemirror_mode: puppet + codemirror_mode: text/x-puppet tm_scope: source.puppet language_id: 299 Pure Data: @@ -3208,12 +3207,12 @@ PureScript: - ".purs" tm_scope: source.purescript ace_mode: haskell - codemirror_mode: haskell + codemirror_mode: text/x-haskell language_id: 302 Python: type: programming ace_mode: python - codemirror_mode: python + codemirror_mode: text/x-python color: "#3572A5" extensions: - ".py" @@ -3288,12 +3287,12 @@ R: interpreters: - Rscript ace_mode: r - codemirror_mode: r + codemirror_mode: text/x-rsrc language_id: 307 RAML: type: markup ace_mode: yaml - codemirror_mode: yaml + codemirror_mode: text/x-yaml tm_scope: source.yaml color: "#77d9fb" extensions: @@ -3339,13 +3338,13 @@ RHTML: aliases: - html+ruby ace_mode: rhtml - codemirror_mode: htmlembedded + codemirror_mode: application/x-erb language_id: 312 RMarkdown: type: prose wrap: true ace_mode: markdown - codemirror_mode: markdown + codemirror_mode: text/x-gfm extensions: - ".rmd" tm_scope: source.gfm @@ -3358,7 +3357,7 @@ RPM Spec: aliases: - specfile ace_mode: text - codemirror_mode: rpm + codemirror_mode: text/x-rpm-spec language_id: 314 RUNOFF: type: markup @@ -3461,7 +3460,7 @@ RobotFramework: Rouge: type: programming ace_mode: clojure - codemirror_mode: clojure + codemirror_mode: text/x-clojure color: "#cc0088" extensions: - ".rg" @@ -3470,7 +3469,7 @@ Rouge: Ruby: type: programming ace_mode: ruby - codemirror_mode: ruby + codemirror_mode: text/x-ruby color: "#701516" aliases: - jruby @@ -3532,7 +3531,7 @@ Rust: - ".rs" - ".rs.in" ace_mode: rust - codemirror_mode: rust + codemirror_mode: text/x-rustsrc language_id: 327 SAS: type: programming @@ -3541,14 +3540,14 @@ SAS: - ".sas" tm_scope: source.sas ace_mode: text - codemirror_mode: sas + codemirror_mode: text/x-sas language_id: 328 SCSS: type: markup tm_scope: source.scss group: CSS ace_mode: scss - codemirror_mode: css + codemirror_mode: text/x-scss extensions: - ".scss" color: "#CF649A" @@ -3576,7 +3575,7 @@ SPARQL: type: data tm_scope: source.sparql ace_mode: text - codemirror_mode: sparql + codemirror_mode: application/sparql-query extensions: - ".sparql" - ".rq" @@ -3594,7 +3593,7 @@ SQL: type: data tm_scope: source.sql ace_mode: sql - codemirror_mode: sql + codemirror_mode: text/x-sql extensions: - ".sql" - ".cql" @@ -3608,7 +3607,7 @@ SQL: SQLPL: type: programming ace_mode: sql - codemirror_mode: sql + codemirror_mode: text/x-sql tm_scope: source.sql extensions: - ".sql" @@ -3619,7 +3618,7 @@ SRecode Template: color: "#348a34" tm_scope: source.lisp ace_mode: lisp - codemirror_mode: commonlisp + codemirror_mode: text/x-common-lisp extensions: - ".srt" language_id: 335 @@ -3637,7 +3636,7 @@ SVG: - ".svg" tm_scope: text.xml ace_mode: xml - codemirror_mode: xml + codemirror_mode: text/xml language_id: 337 Sage: type: programming @@ -3647,7 +3646,7 @@ Sage: - ".sagews" tm_scope: source.python ace_mode: python - codemirror_mode: python + codemirror_mode: text/x-python language_id: 338 SaltStack: type: programming @@ -3659,7 +3658,7 @@ SaltStack: - ".sls" tm_scope: source.yaml.salt ace_mode: yaml - codemirror_mode: yaml + codemirror_mode: text/x-yaml language_id: 339 Sass: type: markup @@ -3668,13 +3667,13 @@ Sass: extensions: - ".sass" ace_mode: sass - codemirror_mode: sass + codemirror_mode: text/x-sass color: "#CF649A" language_id: 340 Scala: type: programming ace_mode: scala - codemirror_mode: clike + codemirror_mode: text/x-scala color: "#c22d40" extensions: - ".scala" @@ -3708,7 +3707,7 @@ Scheme: - gosh - r6rs ace_mode: scheme - codemirror_mode: scheme + codemirror_mode: text/x-scheme language_id: 343 Scilab: type: programming @@ -3760,7 +3759,7 @@ Shell: - sh - zsh ace_mode: sh - codemirror_mode: shell + codemirror_mode: text/x-sh language_id: 346 ShellSession: type: programming @@ -3771,7 +3770,7 @@ ShellSession: - console tm_scope: text.shell-session ace_mode: sh - codemirror_mode: shell + codemirror_mode: text/x-sh language_id: 347 Shen: type: programming @@ -3797,7 +3796,7 @@ Slim: - ".slim" tm_scope: text.slim ace_mode: text - codemirror_mode: slim + codemirror_mode: text/x-slim language_id: 350 Smali: type: programming @@ -3815,14 +3814,14 @@ Smalltalk: aliases: - squeak ace_mode: text - codemirror_mode: smalltalk + codemirror_mode: text/x-stsrc language_id: 352 Smarty: type: programming extensions: - ".tpl" ace_mode: smarty - codemirror_mode: smarty + codemirror_mode: text/x-smarty tm_scope: text.html.smarty language_id: 353 SourcePawn: @@ -3844,7 +3843,7 @@ Squirrel: - ".nut" tm_scope: source.c++ ace_mode: c_cpp - codemirror_mode: clike + codemirror_mode: text/x-c++src language_id: 355 Stan: type: programming @@ -3866,7 +3865,7 @@ Standard ML: - ".sml" tm_scope: source.ml ace_mode: text - codemirror_mode: mllike + codemirror_mode: text/x-ocaml language_id: 357 Stata: type: programming @@ -3887,7 +3886,6 @@ Stylus: - ".styl" tm_scope: source.stylus ace_mode: stylus - codemirror_mode: stylus language_id: 359 SubRip Text: type: data @@ -3914,7 +3912,7 @@ Swift: extensions: - ".swift" ace_mode: text - codemirror_mode: swift + codemirror_mode: text/x-swift language_id: 362 SystemVerilog: type: programming @@ -3924,7 +3922,7 @@ SystemVerilog: - ".svh" - ".vh" ace_mode: verilog - codemirror_mode: verilog + codemirror_mode: text/x-systemverilog language_id: 363 TLA: type: programming @@ -3939,7 +3937,7 @@ TOML: - ".toml" tm_scope: source.toml ace_mode: toml - codemirror_mode: toml + codemirror_mode: text/x-toml language_id: 365 TXL: type: programming @@ -3959,7 +3957,7 @@ Tcl: - tclsh - wish ace_mode: tcl - codemirror_mode: tcl + codemirror_mode: text/x-tcl language_id: 367 Tcsh: type: programming @@ -3969,13 +3967,13 @@ Tcsh: - ".csh" tm_scope: source.shell ace_mode: sh - codemirror_mode: shell + codemirror_mode: text/x-sh language_id: 368 TeX: type: markup color: "#3D6117" ace_mode: tex - codemirror_mode: stex + codemirror_mode: text/x-stex wrap: true aliases: - latex @@ -4009,7 +4007,7 @@ Terra: - ".t" color: "#00004c" ace_mode: lua - codemirror_mode: lua + codemirror_mode: text/x-lua interpreters: - lua language_id: 371 @@ -4042,7 +4040,7 @@ Text: Textile: type: prose ace_mode: textile - codemirror_mode: textile + codemirror_mode: text/x-textile wrap: true extensions: - ".textile" @@ -4070,7 +4068,7 @@ Turtle: - ".ttl" tm_scope: source.turtle ace_mode: text - codemirror_mode: turtle + codemirror_mode: text/turtle language_id: 376 Twig: type: markup @@ -4079,7 +4077,7 @@ Twig: - ".twig" tm_scope: text.html.twig ace_mode: twig - codemirror_mode: twig + codemirror_mode: text/x-twig language_id: 377 TypeScript: type: programming @@ -4091,13 +4089,13 @@ TypeScript: - ".tsx" tm_scope: source.ts ace_mode: typescript - codemirror_mode: javascript + codemirror_mode: text/x-typescript language_id: 378 Unified Parallel C: type: programming group: C ace_mode: c_cpp - codemirror_mode: clike + codemirror_mode: text/x-csrc color: "#4e3617" extensions: - ".upc" @@ -4106,7 +4104,7 @@ Unified Parallel C: Unity3D Asset: type: data ace_mode: yaml - codemirror_mode: yaml + codemirror_mode: text/x-yaml extensions: - ".anim" - ".asset" @@ -4121,7 +4119,7 @@ Uno: extensions: - ".uno" ace_mode: csharp - codemirror_mode: clike + codemirror_mode: text/x-csharp tm_scope: source.cs language_id: 381 UnrealScript: @@ -4131,7 +4129,7 @@ UnrealScript: - ".uc" tm_scope: source.java ace_mode: java - codemirror_mode: clike + codemirror_mode: text/x-java language_id: 382 UrWeb: type: programming @@ -4165,7 +4163,7 @@ VHDL: - ".vht" - ".vhw" ace_mode: vhdl - codemirror_mode: vhdl + codemirror_mode: text/x-vhdl language_id: 385 Vala: type: programming @@ -4182,7 +4180,7 @@ Verilog: - ".v" - ".veo" ace_mode: verilog - codemirror_mode: verilog + codemirror_mode: text/x-verilog language_id: 387 VimL: type: programming @@ -4220,7 +4218,7 @@ Visual Basic: - vb.net - vbnet ace_mode: text - codemirror_mode: vb + codemirror_mode: text/x-vb language_id: 389 Volt: type: programming @@ -4229,7 +4227,7 @@ Volt: - ".volt" tm_scope: source.d ace_mode: d - codemirror_mode: d + codemirror_mode: text/x-d language_id: 390 Vue: type: markup @@ -4238,7 +4236,6 @@ Vue: - ".vue" tm_scope: text.html.vue ace_mode: html - codemirror_mode: vue language_id: 391 Wavefront Material: type: data @@ -4268,7 +4265,7 @@ WebIDL: - ".webidl" tm_scope: source.webidl ace_mode: text - codemirror_mode: webidl + codemirror_mode: text/x-webidl language_id: 395 World of Warcraft Addon Data: type: data @@ -4294,12 +4291,12 @@ XC: - ".xc" tm_scope: source.xc ace_mode: c_cpp - codemirror_mode: clike + codemirror_mode: text/x-csrc language_id: 398 XML: type: data ace_mode: xml - codemirror_mode: xml + codemirror_mode: text/xml aliases: - rss - xsd @@ -4408,7 +4405,7 @@ XPages: - ".xsp.metadata" tm_scope: none ace_mode: xml - codemirror_mode: xml + codemirror_mode: text/xml language_id: 400 XProc: type: programming @@ -4417,7 +4414,7 @@ XProc: - ".xproc" tm_scope: text.xml ace_mode: xml - codemirror_mode: xml + codemirror_mode: text/xml language_id: 401 XQuery: type: programming @@ -4429,7 +4426,7 @@ XQuery: - ".xqm" - ".xqy" ace_mode: xquery - codemirror_mode: xquery + codemirror_mode: application/xquery tm_scope: source.xq language_id: 402 XS: @@ -4438,7 +4435,7 @@ XS: - ".xs" tm_scope: source.c ace_mode: c_cpp - codemirror_mode: clike + codemirror_mode: text/x-csrc language_id: 403 XSLT: type: programming @@ -4449,7 +4446,7 @@ XSLT: - ".xsl" tm_scope: text.xml.xsl ace_mode: xml - codemirror_mode: xml + codemirror_mode: text/xml color: "#EB8CEB" language_id: 404 Xojo: @@ -4486,7 +4483,7 @@ YAML: filenames: - ".clang-format" ace_mode: yaml - codemirror_mode: yaml + codemirror_mode: text/x-yaml language_id: 407 YANG: type: data @@ -4543,7 +4540,7 @@ eC: edn: type: data ace_mode: clojure - codemirror_mode: clojure + codemirror_mode: text/x-clojure extensions: - ".edn" tm_scope: source.clojure @@ -4591,11 +4588,12 @@ reStructuredText: - ".rest.txt" - ".rst.txt" ace_mode: text - codemirror_mode: rst + codemirror_mode: text/x-rst language_id: 419 wisp: type: programming ace_mode: clojure + codemirror_mode: text/x-clojure color: "#7582D1" extensions: - ".wisp" diff --git a/test/test_language.rb b/test/test_language.rb index fec4e29b3c..4409ae4e73 100644 --- a/test/test_language.rb +++ b/test/test_language.rb @@ -350,7 +350,7 @@ def test_ace_modes end def test_codemirror_mode - assert_equal 'clike', Language['C++'].codemirror_mode + assert_equal 'text/x-c++src', Language['C++'].codemirror_mode end def test_wrap From c525e3fbefadef76dde6efc5435427a1abcd355d Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Fri, 23 Sep 2016 13:48:24 -0700 Subject: [PATCH 0092/1214] Ignore default external warnings --- test/test_blob.rb | 22 +++++++++++++++++----- test/test_file_blob.rb | 22 +++++++++++++++++----- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/test/test_blob.rb b/test/test_blob.rb index 3322cc41bb..a781e4664a 100644 --- a/test/test_blob.rb +++ b/test/test_blob.rb @@ -3,15 +3,27 @@ class TestBlob < Minitest::Test include Linguist + def silence_warnings + original_verbosity = $VERBOSE + $VERBOSE = nil + yield + ensure + $VERBOSE = original_verbosity + end + def setup - # git blobs are normally loaded as ASCII-8BIT since they may contain data - # with arbitrary encoding not known ahead of time - @original_external = Encoding.default_external - Encoding.default_external = Encoding.find("ASCII-8BIT") + silence_warnings do + # git blobs are normally loaded as ASCII-8BIT since they may contain data + # with arbitrary encoding not known ahead of time + @original_external = Encoding.default_external + Encoding.default_external = Encoding.find("ASCII-8BIT") + end end def teardown - Encoding.default_external = @original_external + silence_warnings do + Encoding.default_external = @original_external + end end def script_blob(name) diff --git a/test/test_file_blob.rb b/test/test_file_blob.rb index 82f3059caf..383b170e6d 100644 --- a/test/test_file_blob.rb +++ b/test/test_file_blob.rb @@ -3,15 +3,27 @@ class TestFileBlob < Minitest::Test include Linguist + def silence_warnings + original_verbosity = $VERBOSE + $VERBOSE = nil + yield + ensure + $VERBOSE = original_verbosity + end + def setup - # git blobs are normally loaded as ASCII-8BIT since they may contain data - # with arbitrary encoding not known ahead of time - @original_external = Encoding.default_external - Encoding.default_external = Encoding.find("ASCII-8BIT") + silence_warnings do + # git blobs are normally loaded as ASCII-8BIT since they may contain data + # with arbitrary encoding not known ahead of time + @original_external = Encoding.default_external + Encoding.default_external = Encoding.find("ASCII-8BIT") + end end def teardown - Encoding.default_external = @original_external + silence_warnings do + Encoding.default_external = @original_external + end end def script_blob(name) From 152b5ade5ead83462099c3fef2332bebcd55964c Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Fri, 23 Sep 2016 13:50:01 -0700 Subject: [PATCH 0093/1214] Fix shadowed path warning --- test/test_grammars.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_grammars.rb b/test/test_grammars.rb index bc193b3c4d..3b03ca818c 100644 --- a/test/test_grammars.rb +++ b/test/test_grammars.rb @@ -154,7 +154,7 @@ def submodule_license(submodule) # Neither Licensee nor our own regex was able to detect the license, let's check the readme files = Dir[File.join(ROOT, submodule, "*")] - if readme = files.find { |path| File.basename(path) =~ /\Areadme\b/i } + if readme = files.find { |file| File.basename(file) =~ /\Areadme\b/i } classify_license(readme) end end From 39ea9be5f8aa96e4dab10567feb26b799a35af0a Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Fri, 23 Sep 2016 13:53:38 -0700 Subject: [PATCH 0094/1214] Ignore ace mode warning while testing --- lib/linguist/language.rb | 3 ++- test/helper.rb | 8 ++++++++ test/test_blob.rb | 8 -------- test/test_language.rb | 6 ++++-- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index 85eade2900..e823d6cf08 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -267,6 +267,7 @@ def self.colors # Returns an Array of Languages. def self.ace_modes warn "This method will be deprecated in a future 5.x release. Every language now has an `ace_mode` set." + warn caller @ace_modes ||= all.select(&:ace_mode).sort_by { |lang| lang.name.downcase } end @@ -306,7 +307,7 @@ def initialize(attributes = {}) # Set legacy search term @search_term = attributes[:search_term] || default_alias_name - # Set the language_id + # Set the language_id @language_id = attributes[:language_id] # Set extensions or default to []. diff --git a/test/helper.rb b/test/helper.rb index deb7ef5bc3..5f7eeb87a1 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -35,3 +35,11 @@ def sample_blob_memory(name) content = File.read(filepath) Linguist::Blob.new(name, content) end + +def silence_warnings + original_verbosity = $VERBOSE + $VERBOSE = nil + yield +ensure + $VERBOSE = original_verbosity +end diff --git a/test/test_blob.rb b/test/test_blob.rb index a781e4664a..65b88ba4ee 100644 --- a/test/test_blob.rb +++ b/test/test_blob.rb @@ -3,14 +3,6 @@ class TestBlob < Minitest::Test include Linguist - def silence_warnings - original_verbosity = $VERBOSE - $VERBOSE = nil - yield - ensure - $VERBOSE = original_verbosity - end - def setup silence_warnings do # git blobs are normally loaded as ASCII-8BIT since they may contain data diff --git a/test/test_language.rb b/test/test_language.rb index fec4e29b3c..1456fb8441 100644 --- a/test/test_language.rb +++ b/test/test_language.rb @@ -345,8 +345,10 @@ def test_ace_mode end def test_ace_modes - assert Language.ace_modes.include?(Language['Ruby']) - assert Language.ace_modes.include?(Language['FORTRAN']) + silence_warnings do + assert Language.ace_modes.include?(Language['Ruby']) + assert Language.ace_modes.include?(Language['FORTRAN']) + end end def test_codemirror_mode From fdb962518f9a3ecfce32377e1e59c07523eb5253 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Fri, 23 Sep 2016 13:54:55 -0700 Subject: [PATCH 0095/1214] Consistent CodeMirror casing --- lib/linguist/language.rb | 2 +- lib/linguist/languages.yml | 2 +- lib/linguist/vendor.yml | 2 +- test/test_file_blob.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index c84ad08f34..310fd7983d 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -399,7 +399,7 @@ def initialize(attributes = {}) # Returns a String name or nil attr_reader :ace_mode - # Public: Get Codemirror mode (as expressed by a mimetype) + # Public: Get CodeMirror mode (as expressed by a mimetype) # # Examples # diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 5762f715ce..735ba2f09d 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -6,7 +6,7 @@ # ace_mode - A String name of the Ace Mode used for highlighting whenever # a file is edited. This must match one of the filenames in http://git.io/3XO_Cg. # Use "text" if a mode does not exist. -# codemirror_mode - A String name of the Codemirror Mode used for highlighting whenever a file is edited. +# codemirror_mode - A String name of the CodeMirror Mode used for highlighting whenever a file is edited. # This must match a mode from https://git.io/vi9Fx # wrap - Boolean wrap to enable line wrapping (default: false) # extensions - An Array of associated extensions (the first one is diff --git a/lib/linguist/vendor.yml b/lib/linguist/vendor.yml index 6b8c7364af..e500f85d05 100644 --- a/lib/linguist/vendor.yml +++ b/lib/linguist/vendor.yml @@ -165,7 +165,7 @@ # Chart.js - (^|/)Chart\.js$ -# Codemirror +# CodeMirror - (^|/)[Cc]ode[Mm]irror/(\d+\.\d+/)?(lib|mode|theme|addon|keymap|demo) # SyntaxHighlighter - http://alexgorbatchev.com/ diff --git a/test/test_file_blob.rb b/test/test_file_blob.rb index 383b170e6d..84cee723f3 100644 --- a/test/test_file_blob.rb +++ b/test/test_file_blob.rb @@ -317,7 +317,7 @@ def test_vendored assert sample_blob("some/vendored/path/Chart.js").vendored? assert !sample_blob("some/vendored/path/chart.js").vendored? - # Codemirror deps + # CodeMirror deps assert sample_blob("codemirror/mode/blah.js").vendored? assert sample_blob("codemirror/5.0/mode/blah.js").vendored? From daefff86ff188cf3ae87e17051558d8f79535367 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Fri, 23 Sep 2016 13:57:50 -0700 Subject: [PATCH 0096/1214] Fix JSX mode --- lib/linguist/languages.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 735ba2f09d..e9ff1c5fce 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1903,7 +1903,8 @@ JSX: extensions: - ".jsx" tm_scope: source.js.jsx - ace_mode: text/jsx + ace_mode: jsx + codemirror_mode: text/jsx language_id: 178 Jade: group: HTML From 0108ef438661994c929cc378a6d113d1ccb3d369 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Fri, 23 Sep 2016 14:35:02 -0700 Subject: [PATCH 0097/1214] Restore old mode --- lib/linguist/language.rb | 17 +- lib/linguist/languages.yml | 581 +++++++++++++++++++++++++------------ test/test_language.rb | 12 +- 3 files changed, 414 insertions(+), 196 deletions(-) diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index 310fd7983d..ea88b87fc3 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -302,6 +302,7 @@ def initialize(attributes = {}) @ace_mode = attributes[:ace_mode] @codemirror_mode = attributes[:codemirror_mode] + @codemirror_mime_mode = attributes[:codemirror_mime_mode] @wrap = attributes[:wrap] || false # Set legacy search term @@ -399,7 +400,18 @@ def initialize(attributes = {}) # Returns a String name or nil attr_reader :ace_mode - # Public: Get CodeMirror mode (as expressed by a mimetype) + # Public: Get CodeMirror mode + # + # Examples + # + # # => "nil" + # # => "javascript" + # # => "clike" + # + # Returns a String name or nil + attr_reader :codemirror_mode + + # Public: Get CodeMirror MIME type mode # # Examples # @@ -408,7 +420,7 @@ def initialize(attributes = {}) # # => "text/x-csrc" # # Returns a String name or nil - attr_reader :codemirror_mode + attr_reader :codemirror_mime_mode # Public: Should language lines be wrapped # @@ -587,6 +599,7 @@ def inspect :tm_scope => options['tm_scope'], :ace_mode => options['ace_mode'], :codemirror_mode => options['codemirror_mode'], + :codemirror_mime_mode => options['codemirror_mime_mode'], :wrap => options['wrap'], :group_name => options['group'], :searchable => options.fetch('searchable', true), diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index e9ff1c5fce..36b61047de 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -59,7 +59,8 @@ AGS Script: - ".ash" tm_scope: source.c++ ace_mode: c_cpp - codemirror_mode: text/x-c++src + codemirror_mode: clike + codemirror_mime_mode: text/x-c++src language_id: 2 AMPL: type: programming @@ -97,7 +98,8 @@ APL: - dyalog tm_scope: source.apl ace_mode: text - codemirror_mode: text/apl + codemirror_mode: apl + codemirror_mime_mode: text/apl language_id: 6 ASN.1: type: data @@ -107,7 +109,8 @@ ASN.1: - ".asn1" tm_scope: source.asn ace_mode: text - codemirror_mode: text/x-ttcn-asn + codemirror_mode: asn.1 + codemirror_mime_mode: text/x-ttcn-asn language_id: 7 ASP: type: programming @@ -126,7 +129,8 @@ ASP: - ".aspx" - ".axd" ace_mode: text - codemirror_mode: application/x-aspx + codemirror_mode: htmlembedded + codemirror_mime_mode: application/x-aspx language_id: 8 ATS: type: programming @@ -189,7 +193,8 @@ Alpine Abuild: - APKBUILD tm_scope: source.shell ace_mode: sh - codemirror_mode: text/x-sh + codemirror_mode: shell + codemirror_mime_mode: text/x-sh language_id: 14 Ant Build System: type: data @@ -198,7 +203,8 @@ Ant Build System: - ant.xml - build.xml ace_mode: xml - codemirror_mode: application/xml + codemirror_mode: xml + codemirror_mime_mode: application/xml language_id: 15 ApacheConf: type: markup @@ -217,7 +223,8 @@ Apex: - ".cls" tm_scope: source.java ace_mode: java - codemirror_mode: text/x-java + codemirror_mode: clike + codemirror_mime_mode: text/x-java language_id: 17 Apollo Guidance Computer: type: programming @@ -227,7 +234,8 @@ Apollo Guidance Computer: - ".agc" tm_scope: source.agc ace_mode: assembly_x86 - codemirror_mode: text/x-gas + codemirror_mode: gas + codemirror_mime_mode: text/x-gas language_id: 18 AppleScript: type: programming @@ -256,7 +264,8 @@ Arduino: - ".ino" tm_scope: source.c++ ace_mode: c_cpp - codemirror_mode: text/x-c++src + codemirror_mode: clike + codemirror_mime_mode: text/x-c++src language_id: 21 AsciiDoc: type: prose @@ -289,7 +298,8 @@ Assembly: - ".nasm" tm_scope: source.assembly ace_mode: assembly_x86 - codemirror_mode: text/x-gas + codemirror_mode: gas + codemirror_mime_mode: text/x-gas language_id: 24 Augeas: type: programming @@ -427,7 +437,8 @@ Brainfuck: - ".bf" tm_scope: source.bf ace_mode: text - codemirror_mode: text/x-brainfuck + codemirror_mode: brainfuck + codemirror_mime_mode: text/x-brainfuck language_id: 38 Brightscript: type: programming @@ -454,12 +465,14 @@ C: interpreters: - tcc ace_mode: c_cpp - codemirror_mode: text/x-csrc + codemirror_mode: clike + codemirror_mime_mode: text/x-csrc language_id: 41 C#: type: programming ace_mode: csharp - codemirror_mode: text/x-csharp + codemirror_mode: clike + codemirror_mime_mode: text/x-csharp tm_scope: source.cs search_term: csharp color: "#178600" @@ -474,7 +487,8 @@ C#: C++: type: programming ace_mode: c_cpp - codemirror_mode: text/x-c++src + codemirror_mode: clike + codemirror_mime_mode: text/x-c++src search_term: cpp color: "#f34b7d" aliases: @@ -502,7 +516,8 @@ C-ObjDump: - ".c-objdump" tm_scope: objdump.x86asm ace_mode: assembly_x86 - codemirror_mode: text/x-gas + codemirror_mode: gas + codemirror_mime_mode: text/x-gas language_id: 44 C2hs Haskell: type: programming @@ -513,7 +528,8 @@ C2hs Haskell: - ".chs" tm_scope: source.haskell ace_mode: haskell - codemirror_mode: text/x-haskell + codemirror_mode: haskell + codemirror_mime_mode: text/x-haskell language_id: 45 CLIPS: type: programming @@ -530,7 +546,8 @@ CMake: filenames: - CMakeLists.txt ace_mode: text - codemirror_mode: text/x-cmake + codemirror_mode: cmake + codemirror_mime_mode: text/x-cmake language_id: 47 COBOL: type: programming @@ -541,7 +558,8 @@ COBOL: - ".cobol" - ".cpy" ace_mode: cobol - codemirror_mode: text/x-cobol + codemirror_mode: cobol + codemirror_mime_mode: text/x-cobol language_id: 48 COLLADA: type: data @@ -549,13 +567,15 @@ COLLADA: - ".dae" tm_scope: text.xml ace_mode: xml - codemirror_mode: text/x-xml + codemirror_mode: xml + codemirror_mime_mode: text/x-xml language_id: 49 CSS: type: markup tm_scope: source.css ace_mode: css - codemirror_mode: text/css + codemirror_mode: css + codemirror_mime_mode: text/css color: "#563d7c" extensions: - ".css" @@ -611,7 +631,8 @@ ChucK: - ".ck" tm_scope: source.java ace_mode: java - codemirror_mode: text/x-java + codemirror_mode: clike + codemirror_mime_mode: text/x-java language_id: 57 Cirru: type: programming @@ -648,7 +669,8 @@ Click: Clojure: type: programming ace_mode: clojure - codemirror_mode: text/x-clojure + codemirror_mode: clojure + codemirror_mime_mode: text/x-clojure color: "#db5855" extensions: - ".clj" @@ -667,7 +689,8 @@ CoffeeScript: type: programming tm_scope: source.coffee ace_mode: coffee - codemirror_mode: text/x-coffeescript + codemirror_mode: coffeescript + codemirror_mime_mode: text/x-coffeescript color: "#244776" aliases: - coffee @@ -733,7 +756,8 @@ Common Lisp: - clisp - ecl ace_mode: lisp - codemirror_mode: text/x-common-lisp + codemirror_mode: commonlisp + codemirror_mime_mode: text/x-common-lisp language_id: 66 Component Pascal: type: programming @@ -746,7 +770,8 @@ Component Pascal: - delphi - objectpascal ace_mode: pascal - codemirror_mode: text/x-pascal + codemirror_mode: pascal + codemirror_mime_mode: text/x-pascal language_id: 67 Cool: type: programming @@ -774,7 +799,8 @@ Cpp-ObjDump: aliases: - c++-objdump ace_mode: assembly_x86 - codemirror_mode: text/x-gas + codemirror_mode: gas + codemirror_mime_mode: text/x-gas language_id: 70 Creole: type: prose @@ -790,7 +816,8 @@ Crystal: extensions: - ".cr" ace_mode: ruby - codemirror_mode: text/x-crystal + codemirror_mode: crystal + codemirror_mime_mode: text/x-crystal tm_scope: source.crystal interpreters: - crystal @@ -840,7 +867,8 @@ Cuda: - ".cuh" tm_scope: source.cuda-c++ ace_mode: c_cpp - codemirror_mode: text/x-c++src + codemirror_mode: clike + codemirror_mime_mode: text/x-c++src color: "#3A4E3A" language_id: 77 Cycript: @@ -849,7 +877,8 @@ Cycript: - ".cy" tm_scope: source.js ace_mode: javascript - codemirror_mode: text/javascript + codemirror_mode: javascript + codemirror_mime_mode: text/javascript language_id: 78 Cython: type: programming @@ -861,7 +890,8 @@ Cython: aliases: - pyrex ace_mode: text - codemirror_mode: text/x-cython + codemirror_mode: python + codemirror_mime_mode: text/x-cython language_id: 79 D: type: programming @@ -870,7 +900,8 @@ D: - ".d" - ".di" ace_mode: d - codemirror_mode: text/x-d + codemirror_mode: d + codemirror_mime_mode: text/x-d language_id: 80 D-ObjDump: type: data @@ -878,7 +909,8 @@ D-ObjDump: - ".d-objdump" tm_scope: objdump.x86asm ace_mode: assembly_x86 - codemirror_mode: text/x-gas + codemirror_mode: gas + codemirror_mime_mode: text/x-gas language_id: 81 DIGITAL Command Language: type: programming @@ -917,7 +949,8 @@ DTrace: - dtrace tm_scope: source.c ace_mode: c_cpp - codemirror_mode: text/x-csrc + codemirror_mode: clike + codemirror_mime_mode: text/x-csrc language_id: 85 Darcs Patch: type: data @@ -938,7 +971,8 @@ Dart: interpreters: - dart ace_mode: dart - codemirror_mode: text/x-dart + codemirror_mode: dart + codemirror_mime_mode: text/x-dart language_id: 87 Diff: type: data @@ -949,7 +983,8 @@ Diff: - udiff tm_scope: source.diff ace_mode: diff - codemirror_mode: text/x-diff + codemirror_mode: diff + codemirror_mime_mode: text/x-diff language_id: 88 Dockerfile: type: data @@ -959,7 +994,8 @@ Dockerfile: filenames: - Dockerfile ace_mode: dockerfile - codemirror_mode: text/x-dockerfile + codemirror_mode: dockerfile + codemirror_mime_mode: text/x-dockerfile language_id: 89 Dogescript: type: programming @@ -978,7 +1014,8 @@ Dylan: - ".intr" - ".lid" ace_mode: text - codemirror_mode: text/x-dylan + codemirror_mode: dylan + codemirror_mime_mode: text/x-dylan language_id: 91 E: type: programming @@ -998,7 +1035,8 @@ ECL: - ".eclxml" tm_scope: none ace_mode: text - codemirror_mode: text/x-ecl + codemirror_mode: ecl + codemirror_mime_mode: text/x-ecl language_id: 93 ECLiPSe: type: programming @@ -1024,7 +1062,8 @@ EQ: - ".eq" tm_scope: source.cs ace_mode: csharp - codemirror_mode: text/x-csharp + codemirror_mode: clike + codemirror_mime_mode: text/x-csharp language_id: 96 Eagle: type: markup @@ -1034,7 +1073,8 @@ Eagle: - ".brd" tm_scope: text.xml ace_mode: xml - codemirror_mode: text/xml + codemirror_mode: xml + codemirror_mime_mode: text/xml language_id: 97 Ecere Projects: type: data @@ -1043,7 +1083,8 @@ Ecere Projects: - ".epj" tm_scope: source.json ace_mode: json - codemirror_mode: application/json + codemirror_mode: json + codemirror_mime_mode: application/json language_id: 98 Eiffel: type: programming @@ -1051,7 +1092,8 @@ Eiffel: extensions: - ".e" ace_mode: eiffel - codemirror_mode: text/x-eiffel + codemirror_mode: eiffel + codemirror_mime_mode: text/x-eiffel language_id: 99 Elixir: type: programming @@ -1072,7 +1114,8 @@ Elm: - ".elm" tm_scope: source.elm ace_mode: elm - codemirror_mode: text/x-elm + codemirror_mode: elm + codemirror_mime_mode: text/x-elm language_id: 101 Emacs Lisp: type: programming @@ -1096,7 +1139,8 @@ Emacs Lisp: - ".emacs" - ".emacs.desktop" ace_mode: lisp - codemirror_mode: text/x-common-lisp + codemirror_mode: commonlisp + codemirror_mime_mode: text/x-common-lisp language_id: 102 EmberScript: type: programming @@ -1106,7 +1150,8 @@ EmberScript: - ".emberscript" tm_scope: source.coffee ace_mode: coffee - codemirror_mode: text/x-coffeescript + codemirror_mode: coffeescript + codemirror_mime_mode: text/x-coffeescript language_id: 103 Erlang: type: programming @@ -1124,7 +1169,8 @@ Erlang: - rebar.config.lock - rebar.lock ace_mode: erlang - codemirror_mode: text/x-erlang + codemirror_mode: erlang + codemirror_mime_mode: text/x-erlang interpreters: - escript language_id: 104 @@ -1140,7 +1186,8 @@ F#: - ".fsx" tm_scope: source.fsharp ace_mode: text - codemirror_mode: text/x-fsharp + codemirror_mode: mllike + codemirror_mime_mode: text/x-fsharp language_id: 105 FLUX: type: programming @@ -1165,7 +1212,8 @@ FORTRAN: - ".fpp" tm_scope: source.fortran.modern ace_mode: text - codemirror_mode: text/x-fortran + codemirror_mode: fortran + codemirror_mime_mode: text/x-fortran language_id: 107 Factor: type: programming @@ -1176,7 +1224,8 @@ Factor: - ".factor-boot-rc" - ".factor-rc" ace_mode: text - codemirror_mode: text/x-factor + codemirror_mode: factor + codemirror_mime_mode: text/x-factor language_id: 108 Fancy: type: programming @@ -1232,7 +1281,8 @@ Forth: - ".frt" - ".fs" ace_mode: forth - codemirror_mode: text/x-forth + codemirror_mode: forth + codemirror_mime_mode: text/x-forth language_id: 114 FreeMarker: type: programming @@ -1287,7 +1337,8 @@ GAS: - ".ms" tm_scope: source.assembly ace_mode: assembly_x86 - codemirror_mode: text/x-gas + codemirror_mode: gas + codemirror_mime_mode: text/x-gas language_id: 120 GCC Machine Description: type: programming @@ -1295,7 +1346,8 @@ GCC Machine Description: - ".md" tm_scope: source.lisp ace_mode: lisp - codemirror_mode: text/x-common-lisp + codemirror_mode: commonlisp + codemirror_mime_mode: text/x-common-lisp language_id: 121 GDB: type: programming @@ -1340,7 +1392,8 @@ Game Maker Language: - ".gml" tm_scope: source.c++ ace_mode: c_cpp - codemirror_mode: text/x-c++src + codemirror_mode: clike + codemirror_mime_mode: text/x-c++src language_id: 125 Genshi: type: programming @@ -1351,7 +1404,8 @@ Genshi: - xml+genshi - xml+kid ace_mode: xml - codemirror_mode: text/xml + codemirror_mode: xml + codemirror_mime_mode: text/xml language_id: 126 Gentoo Ebuild: type: programming @@ -1360,7 +1414,8 @@ Gentoo Ebuild: - ".ebuild" tm_scope: source.shell ace_mode: sh - codemirror_mode: text/x-sh + codemirror_mode: shell + codemirror_mime_mode: text/x-sh language_id: 127 Gentoo Eclass: type: programming @@ -1369,7 +1424,8 @@ Gentoo Eclass: - ".eclass" tm_scope: source.shell ace_mode: sh - codemirror_mode: text/x-sh + codemirror_mode: shell + codemirror_mime_mode: text/x-sh language_id: 128 Gettext Catalog: type: prose @@ -1390,7 +1446,8 @@ Glyph: - ".glf" tm_scope: source.tcl ace_mode: tcl - codemirror_mode: text/x-tcl + codemirror_mode: tcl + codemirror_mime_mode: text/x-tcl language_id: 130 Gnuplot: type: programming @@ -1411,7 +1468,8 @@ Go: extensions: - ".go" ace_mode: golang - codemirror_mode: text/x-go + codemirror_mode: go + codemirror_mime_mode: text/x-go language_id: 132 Golo: type: programming @@ -1457,7 +1515,8 @@ Grammatical Framework: color: "#79aa7a" tm_scope: source.haskell ace_mode: haskell - codemirror_mode: text/x-haskell + codemirror_mode: haskell + codemirror_mime_mode: text/x-haskell language_id: 137 Graph Modeling Language: type: data @@ -1517,12 +1576,14 @@ Groff: - nroff - troff ace_mode: text - codemirror_mode: text/troff + codemirror_mode: troff + codemirror_mime_mode: text/troff language_id: 141 Groovy: type: programming ace_mode: groovy - codemirror_mode: text/x-groovy + codemirror_mode: groovy + codemirror_mime_mode: text/x-groovy color: "#e69f56" extensions: - ".groovy" @@ -1544,7 +1605,8 @@ Groovy Server Pages: - ".gsp" tm_scope: text.html.jsp ace_mode: jsp - codemirror_mode: application/x-jsp + codemirror_mode: htmlembedded + codemirror_mime_mode: application/x-jsp language_id: 143 HCL: type: programming @@ -1552,7 +1614,8 @@ HCL: - ".hcl" - ".tf" ace_mode: ruby - codemirror_mode: text/x-ruby + codemirror_mode: ruby + codemirror_mime_mode: text/x-ruby tm_scope: source.ruby language_id: 144 HLSL: @@ -1569,7 +1632,8 @@ HTML: type: markup tm_scope: text.html.basic ace_mode: html - codemirror_mode: text/html + codemirror_mode: html + codemirror_mime_mode: text/html color: "#e44b23" aliases: - xhtml @@ -1595,7 +1659,8 @@ HTML+Django: - html+jinja - htmldjango ace_mode: django - codemirror_mode: text/x-django + codemirror_mode: django + codemirror_mime_mode: text/x-django language_id: 147 HTML+ECR: type: markup @@ -1606,7 +1671,8 @@ HTML+ECR: extensions: - ".ecr" ace_mode: text - codemirror_mode: text/html + codemirror_mode: htmlembedded + codemirror_mime_mode: text/html language_id: 148 HTML+EEX: type: markup @@ -1617,7 +1683,8 @@ HTML+EEX: extensions: - ".eex" ace_mode: text - codemirror_mode: text/html + codemirror_mode: htmlembedded + codemirror_mime_mode: text/html language_id: 149 HTML+ERB: type: markup @@ -1629,7 +1696,8 @@ HTML+ERB: - ".erb" - ".erb.deface" ace_mode: text - codemirror_mode: application/x-erb + codemirror_mode: htmlembedded + codemirror_mime_mode: application/x-erb language_id: 150 HTML+PHP: type: markup @@ -1638,7 +1706,8 @@ HTML+PHP: extensions: - ".phtml" ace_mode: php - codemirror_mode: application/x-httpd-php + codemirror_mode: php + codemirror_mime_mode: application/x-httpd-php language_id: 151 HTTP: type: data @@ -1646,12 +1715,14 @@ HTTP: - ".http" tm_scope: source.httpspec ace_mode: text - codemirror_mode: message/http + codemirror_mode: http + codemirror_mime_mode: message/http language_id: 152 Hack: type: programming ace_mode: php - codemirror_mode: application/x-httpd-php + codemirror_mode: php + codemirror_mime_mode: application/x-httpd-php extensions: - ".hh" - ".php" @@ -1665,7 +1736,8 @@ Haml: - ".haml" - ".haml.deface" ace_mode: haml - codemirror_mode: text/x-haml + codemirror_mode: haml + codemirror_mime_mode: text/x-haml color: "#ECE2A9" language_id: 154 Handlebars: @@ -1680,6 +1752,7 @@ Handlebars: - ".hbs" tm_scope: text.html.handlebars ace_mode: handlebars + codemirror_mode: handlebars language_id: 155 Harbour: type: programming @@ -1698,12 +1771,14 @@ Haskell: interpreters: - runhaskell ace_mode: haskell - codemirror_mode: text/x-haskell + codemirror_mode: haskell + codemirror_mime_mode: text/x-haskell language_id: 157 Haxe: type: programming ace_mode: haxe - codemirror_mode: text/x-haxe + codemirror_mode: haxe + codemirror_mime_mode: text/x-haxe color: "#df7900" extensions: - ".hx" @@ -1734,7 +1809,8 @@ IDL: - ".pro" - ".dlm" ace_mode: text - codemirror_mode: text/x-idl + codemirror_mode: idl + codemirror_mime_mode: text/x-idl language_id: 161 IGOR Pro: type: programming @@ -1758,7 +1834,8 @@ INI: aliases: - dosini ace_mode: ini - codemirror_mode: text/x-properties + codemirror_mode: properties + codemirror_mime_mode: text/x-properties language_id: 163 IRC log: type: data @@ -1858,7 +1935,8 @@ JSON: tm_scope: source.json group: JavaScript ace_mode: json - codemirror_mode: application/json + codemirror_mode: javascript + codemirror_mime_mode: application/json searchable: false extensions: - ".json" @@ -1877,13 +1955,15 @@ JSON5: - ".json5" tm_scope: source.js ace_mode: javascript - codemirror_mode: application/json + codemirror_mode: javascript + codemirror_mime_mode: application/json language_id: 175 JSONLD: type: data group: JavaScript ace_mode: javascript - codemirror_mode: application/ld+json + codemirror_mode: javascript + codemirror_mime_mode: application/ld+json extensions: - ".jsonld" tm_scope: source.js @@ -1892,7 +1972,8 @@ JSONiq: color: "#40d47e" type: programming ace_mode: jsoniq - codemirror_mode: application/json + codemirror_mode: javascript + codemirror_mime_mode: application/json extensions: - ".jq" tm_scope: source.jq @@ -1903,8 +1984,8 @@ JSX: extensions: - ".jsx" tm_scope: source.js.jsx - ace_mode: jsx - codemirror_mode: text/jsx + ace_mode: javascript + codemirror_mime_mode: text/jsx language_id: 178 Jade: group: HTML @@ -1914,7 +1995,8 @@ Jade: - ".pug" tm_scope: text.jade ace_mode: jade - codemirror_mode: text/x-pug + codemirror_mode: pug + codemirror_mime_mode: text/x-pug language_id: 179 Jasmin: type: programming @@ -1926,7 +2008,8 @@ Jasmin: Java: type: programming ace_mode: java - codemirror_mode: text/x-java + codemirror_mode: clike + codemirror_mime_mode: text/x-java color: "#b07219" extensions: - ".java" @@ -1941,13 +2024,15 @@ Java Server Pages: - ".jsp" tm_scope: text.html.jsp ace_mode: jsp - codemirror_mode: application/x-jsp + codemirror_mode: htmlembedded + codemirror_mime_mode: application/x-jsp language_id: 182 JavaScript: type: programming tm_scope: source.js ace_mode: javascript - codemirror_mode: text/javascript + codemirror_mode: javascript + codemirror_mime_mode: text/javascript color: "#f1e05a" aliases: - js @@ -1996,12 +2081,14 @@ Julia: - ".jl" color: "#a270ba" ace_mode: julia - codemirror_mode: text/x-julia + codemirror_mode: julia + codemirror_mime_mode: text/x-julia language_id: 184 Jupyter Notebook: type: markup ace_mode: json - codemirror_mode: application/json + codemirror_mode: javascript + codemirror_mime_mode: application/json tm_scope: source.json color: "#DA5B0B" extensions: @@ -2031,7 +2118,8 @@ KiCad: Kit: type: markup ace_mode: html - codemirror_mode: text/html + codemirror_mode: html + codemirror_mime_mode: text/html extensions: - ".kit" tm_scope: text.html.basic @@ -2045,7 +2133,8 @@ Kotlin: - ".kts" tm_scope: source.Kotlin ace_mode: text - codemirror_mode: text/x-kotlin + codemirror_mode: kotlin + codemirror_mime_mode: text/x-kotlin language_id: 189 LFE: type: programming @@ -2055,7 +2144,8 @@ LFE: group: Erlang tm_scope: source.lisp ace_mode: lisp - codemirror_mode: text/x-common-lisp + codemirror_mode: commonlisp + codemirror_mime_mode: text/x-common-lisp language_id: 190 LLVM: type: programming @@ -2088,7 +2178,8 @@ LabVIEW: - ".lvproj" tm_scope: text.xml ace_mode: xml - codemirror_mode: text/xml + codemirror_mode: xml + codemirror_mime_mode: text/xml language_id: 194 Lasso: type: programming @@ -2112,7 +2203,8 @@ Latte: - ".latte" tm_scope: text.html.smarty ace_mode: smarty - codemirror_mode: text/x-smarty + codemirror_mode: smarty + codemirror_mime_mode: text/x-smarty language_id: 196 Lean: type: programming @@ -2128,7 +2220,8 @@ Less: - ".less" tm_scope: source.css.less ace_mode: less - codemirror_mode: text/css + codemirror_mode: css + codemirror_mime_mode: text/css color: "#A1D9A1" language_id: 198 Lex: @@ -2212,7 +2305,8 @@ Literate Haskell: - ".lhs" tm_scope: text.tex.latex.haskell ace_mode: text - codemirror_mode: text/x-literate-haskell + codemirror_mode: haskell-literate + codemirror_mime_mode: text/x-literate-haskell language_id: 207 LiveScript: type: programming @@ -2226,7 +2320,8 @@ LiveScript: filenames: - Slakefile ace_mode: livescript - codemirror_mode: text/x-livescript + codemirror_mode: livescript + codemirror_mime_mode: text/x-livescript language_id: 208 Logos: type: programming @@ -2247,7 +2342,8 @@ Logtalk: LookML: type: programming ace_mode: yaml - codemirror_mode: text/x-yaml + codemirror_mode: yaml + codemirror_mime_mode: text/x-yaml color: "#652B81" extensions: - ".lookml" @@ -2263,7 +2359,8 @@ LoomScript: Lua: type: programming ace_mode: lua - codemirror_mode: text/x-lua + codemirror_mode: lua + codemirror_mime_mode: text/x-lua color: "#000080" extensions: - ".lua" @@ -2283,7 +2380,8 @@ M: - ".mumps" - ".m" ace_mode: text - codemirror_mode: text/x-mumps + codemirror_mode: mumps + codemirror_mime_mode: text/x-mumps language_id: 214 tm_scope: none M4: @@ -2321,7 +2419,8 @@ MTML: - ".mtml" tm_scope: text.html.basic ace_mode: html - codemirror_mode: text/html + codemirror_mode: html + codemirror_mime_mode: text/html language_id: 218 MUF: type: programming @@ -2331,7 +2430,8 @@ MUF: - ".m" tm_scope: none ace_mode: forth - codemirror_mode: text/x-forth + codemirror_mode: forth + codemirror_mime_mode: text/x-forth language_id: 219 Makefile: type: programming @@ -2360,7 +2460,8 @@ Makefile: interpreters: - make ace_mode: makefile - codemirror_mode: text/x-cmake + codemirror_mode: cmake + codemirror_mime_mode: text/x-cmake language_id: 220 Mako: type: programming @@ -2373,7 +2474,8 @@ Mako: Markdown: type: prose ace_mode: markdown - codemirror_mode: text/x-gfm + codemirror_mode: markdown + codemirror_mime_mode: text/x-gfm wrap: true extensions: - ".md" @@ -2407,7 +2509,8 @@ Mathematica: aliases: - mma ace_mode: text - codemirror_mode: text/x-mathematica + codemirror_mode: mathematica + codemirror_mime_mode: text/x-mathematica language_id: 224 Matlab: type: programming @@ -2418,7 +2521,8 @@ Matlab: - ".matlab" - ".m" ace_mode: matlab - codemirror_mode: text/x-octave + codemirror_mode: octave + codemirror_mime_mode: text/x-octave language_id: 225 Maven POM: type: data @@ -2426,7 +2530,8 @@ Maven POM: filenames: - pom.xml ace_mode: xml - codemirror_mode: text/xml + codemirror_mode: xml + codemirror_mime_mode: text/xml language_id: 226 Max: type: programming @@ -2443,7 +2548,8 @@ Max: - ".pat" tm_scope: source.json ace_mode: json - codemirror_mode: application/json + codemirror_mode: javascript + codemirror_mime_mode: application/json language_id: 227 MediaWiki: type: prose @@ -2472,7 +2578,8 @@ Metal: - ".metal" tm_scope: source.c++ ace_mode: c_cpp - codemirror_mode: text/x-c++src + codemirror_mode: clike + codemirror_mime_mode: text/x-c++src language_id: 230 MiniD: type: programming @@ -2493,7 +2600,8 @@ Mirah: - ".mirah" tm_scope: source.ruby ace_mode: ruby - codemirror_mode: text/x-ruby + codemirror_mode: ruby + codemirror_mime_mode: text/x-ruby language_id: 232 Modelica: type: programming @@ -2501,7 +2609,8 @@ Modelica: - ".mo" tm_scope: source.modelica ace_mode: text - codemirror_mode: text/x-modelica + codemirror_mode: modelica + codemirror_mime_mode: text/x-modelica language_id: 233 Modula-2: type: programming @@ -2571,7 +2680,8 @@ NSIS: - ".nsi" - ".nsh" ace_mode: text - codemirror_mode: text/x-nsis + codemirror_mode: nsis + codemirror_mime_mode: text/x-nsis language_id: 242 Nemerle: type: programming @@ -2605,7 +2715,8 @@ NetLogo: - ".nlogo" tm_scope: source.lisp ace_mode: lisp - codemirror_mode: text/x-common-lisp + codemirror_mode: commonlisp + codemirror_mime_mode: text/x-common-lisp language_id: 246 NewLisp: type: programming @@ -2619,7 +2730,8 @@ NewLisp: - newlisp tm_scope: source.lisp ace_mode: lisp - codemirror_mode: text/x-common-lisp + codemirror_mode: commonlisp + codemirror_mime_mode: text/x-common-lisp language_id: 247 Nginx: type: markup @@ -2632,7 +2744,8 @@ Nginx: aliases: - nginx configuration file ace_mode: text - codemirror_mode: text/x-nginx-conf + codemirror_mode: nginx + codemirror_mime_mode: text/x-nginx-conf color: "#9469E9" language_id: 248 Nimrod: @@ -2680,7 +2793,8 @@ Nu: - Nukefile tm_scope: source.nu ace_mode: scheme - codemirror_mode: text/x-scheme + codemirror_mode: scheme + codemirror_mime_mode: text/x-scheme interpreters: - nush language_id: 253 @@ -2693,13 +2807,15 @@ NumPy: - ".numsc" tm_scope: none ace_mode: text - codemirror_mode: text/x-python + codemirror_mode: python + codemirror_mime_mode: text/x-python color: "#9C8AF9" language_id: 254 OCaml: type: programming ace_mode: ocaml - codemirror_mode: text/x-ocaml + codemirror_mode: mllike + codemirror_mime_mode: text/x-ocaml color: "#3be133" extensions: - ".ml" @@ -2721,7 +2837,8 @@ ObjDump: - ".objdump" tm_scope: objdump.x86asm ace_mode: assembly_x86 - codemirror_mode: text/x-gas + codemirror_mode: gas + codemirror_mime_mode: text/x-gas language_id: 256 Objective-C: type: programming @@ -2735,7 +2852,8 @@ Objective-C: - ".m" - ".h" ace_mode: objectivec - codemirror_mode: text/x-objectivec + codemirror_mode: clike + codemirror_mime_mode: text/x-objectivec language_id: 257 Objective-C++: type: programming @@ -2748,7 +2866,8 @@ Objective-C++: extensions: - ".mm" ace_mode: objectivec - codemirror_mode: text/x-objectivec + codemirror_mode: clike + codemirror_mime_mode: text/x-objectivec language_id: 258 Objective-J: type: programming @@ -2793,7 +2912,8 @@ OpenCL: - ".opencl" tm_scope: source.c ace_mode: c_cpp - codemirror_mode: text/x-csrc + codemirror_mode: clike + codemirror_mime_mode: text/x-csrc language_id: 263 OpenEdge ABL: type: programming @@ -2816,7 +2936,8 @@ OpenRC runscript: - openrc-run tm_scope: source.shell ace_mode: sh - codemirror_mode: text/x-sh + codemirror_mode: shell + codemirror_mime_mode: text/x-sh language_id: 265 OpenSCAD: type: programming @@ -2857,7 +2978,8 @@ Oz: - ".oz" tm_scope: source.oz ace_mode: text - codemirror_mode: text/x-oz + codemirror_mode: oz + codemirror_mime_mode: text/x-oz language_id: 270 PAWN: type: programming @@ -2872,7 +2994,8 @@ PHP: type: programming tm_scope: text.html.php ace_mode: php - codemirror_mode: application/x-httpd-php + codemirror_mode: php + codemirror_mime_mode: application/x-httpd-php color: "#4F5D95" extensions: - ".php" @@ -2895,7 +3018,8 @@ PHP: PLSQL: type: programming ace_mode: sql - codemirror_mode: text/x-plsql + codemirror_mode: sql + codemirror_mime_mode: text/x-plsql tm_scope: none color: "#dad8d8" extensions: @@ -2910,7 +3034,8 @@ PLSQL: PLpgSQL: type: programming ace_mode: pgsql - codemirror_mode: text/x-sql + codemirror_mode: sql + codemirror_mime_mode: text/x-sql tm_scope: source.sql extensions: - ".sql" @@ -2987,13 +3112,15 @@ Pascal: interpreters: - instantfpc ace_mode: pascal - codemirror_mode: text/x-pascal + codemirror_mode: pascal + codemirror_mime_mode: text/x-pascal language_id: 281 Perl: type: programming tm_scope: source.perl ace_mode: perl - codemirror_mode: text/x-perl + codemirror_mode: perl + codemirror_mime_mode: text/x-perl color: "#0298c3" extensions: - ".pl" @@ -3031,7 +3158,8 @@ Perl6: - perl6 tm_scope: source.perl6fe ace_mode: perl - codemirror_mode: text/x-perl + codemirror_mode: perl + codemirror_mime_mode: text/x-perl language_id: 283 Pickle: type: data @@ -3071,7 +3199,8 @@ Pike: Pod: type: prose ace_mode: perl - codemirror_mode: text/x-perl + codemirror_mode: perl + codemirror_mime_mode: text/x-perl wrap: true extensions: - ".pod" @@ -3117,7 +3246,8 @@ PowerBuilder: PowerShell: type: programming ace_mode: powershell - codemirror_mode: text/x-powershell + codemirror_mode: powershell + codemirror_mime_mode: text/x-powershell aliases: - posh extensions: @@ -3163,7 +3293,8 @@ Protocol Buffer: - ".proto" tm_scope: source.protobuf ace_mode: protobuf - codemirror_mode: text/x-protobuf + codemirror_mode: protobuf + codemirror_mime_mode: text/x-protobuf language_id: 297 Public Key: type: data @@ -3181,7 +3312,8 @@ Puppet: filenames: - Modulefile ace_mode: text - codemirror_mode: text/x-puppet + codemirror_mode: puppet + codemirror_mime_mode: text/x-puppet tm_scope: source.puppet language_id: 299 Pure Data: @@ -3208,12 +3340,14 @@ PureScript: - ".purs" tm_scope: source.purescript ace_mode: haskell - codemirror_mode: text/x-haskell + codemirror_mode: haskell + codemirror_mime_mode: text/x-haskell language_id: 302 Python: type: programming ace_mode: python - codemirror_mode: text/x-python + codemirror_mode: python + codemirror_mime_mode: text/x-python color: "#3572A5" extensions: - ".py" @@ -3288,12 +3422,14 @@ R: interpreters: - Rscript ace_mode: r - codemirror_mode: text/x-rsrc + codemirror_mode: r + codemirror_mime_mode: text/x-rsrc language_id: 307 RAML: type: markup ace_mode: yaml - codemirror_mode: text/x-yaml + codemirror_mode: yaml + codemirror_mime_mode: text/x-yaml tm_scope: source.yaml color: "#77d9fb" extensions: @@ -3339,13 +3475,15 @@ RHTML: aliases: - html+ruby ace_mode: rhtml - codemirror_mode: application/x-erb + codemirror_mode: htmlembedded + codemirror_mime_mode: application/x-erb language_id: 312 RMarkdown: type: prose wrap: true ace_mode: markdown - codemirror_mode: text/x-gfm + codemirror_mode: markdown + codemirror_mime_mode: text/x-gfm extensions: - ".rmd" tm_scope: source.gfm @@ -3358,7 +3496,8 @@ RPM Spec: aliases: - specfile ace_mode: text - codemirror_mode: text/x-rpm-spec + codemirror_mode: rpm + codemirror_mime_mode: text/x-rpm-spec language_id: 314 RUNOFF: type: markup @@ -3461,7 +3600,8 @@ RobotFramework: Rouge: type: programming ace_mode: clojure - codemirror_mode: text/x-clojure + codemirror_mode: clojure + codemirror_mime_mode: text/x-clojure color: "#cc0088" extensions: - ".rg" @@ -3470,7 +3610,8 @@ Rouge: Ruby: type: programming ace_mode: ruby - codemirror_mode: text/x-ruby + codemirror_mode: ruby + codemirror_mime_mode: text/x-ruby color: "#701516" aliases: - jruby @@ -3532,7 +3673,8 @@ Rust: - ".rs" - ".rs.in" ace_mode: rust - codemirror_mode: text/x-rustsrc + codemirror_mode: rust + codemirror_mime_mode: text/x-rustsrc language_id: 327 SAS: type: programming @@ -3541,14 +3683,16 @@ SAS: - ".sas" tm_scope: source.sas ace_mode: text - codemirror_mode: text/x-sas + codemirror_mode: sas + codemirror_mime_mode: text/x-sas language_id: 328 SCSS: type: markup tm_scope: source.scss group: CSS ace_mode: scss - codemirror_mode: text/x-scss + codemirror_mode: css + codemirror_mime_mode: text/x-scss extensions: - ".scss" color: "#CF649A" @@ -3576,7 +3720,8 @@ SPARQL: type: data tm_scope: source.sparql ace_mode: text - codemirror_mode: application/sparql-query + codemirror_mode: sparql + codemirror_mime_mode: application/sparql-query extensions: - ".sparql" - ".rq" @@ -3594,7 +3739,8 @@ SQL: type: data tm_scope: source.sql ace_mode: sql - codemirror_mode: text/x-sql + codemirror_mode: sql + codemirror_mime_mode: text/x-sql extensions: - ".sql" - ".cql" @@ -3608,7 +3754,8 @@ SQL: SQLPL: type: programming ace_mode: sql - codemirror_mode: text/x-sql + codemirror_mode: sql + codemirror_mime_mode: text/x-sql tm_scope: source.sql extensions: - ".sql" @@ -3619,7 +3766,8 @@ SRecode Template: color: "#348a34" tm_scope: source.lisp ace_mode: lisp - codemirror_mode: text/x-common-lisp + codemirror_mode: commonlisp + codemirror_mime_mode: text/x-common-lisp extensions: - ".srt" language_id: 335 @@ -3637,7 +3785,8 @@ SVG: - ".svg" tm_scope: text.xml ace_mode: xml - codemirror_mode: text/xml + codemirror_mode: xml + codemirror_mime_mode: text/xml language_id: 337 Sage: type: programming @@ -3647,7 +3796,8 @@ Sage: - ".sagews" tm_scope: source.python ace_mode: python - codemirror_mode: text/x-python + codemirror_mode: python + codemirror_mime_mode: text/x-python language_id: 338 SaltStack: type: programming @@ -3659,7 +3809,8 @@ SaltStack: - ".sls" tm_scope: source.yaml.salt ace_mode: yaml - codemirror_mode: text/x-yaml + codemirror_mode: yaml + codemirror_mime_mode: text/x-yaml language_id: 339 Sass: type: markup @@ -3668,13 +3819,15 @@ Sass: extensions: - ".sass" ace_mode: sass - codemirror_mode: text/x-sass + codemirror_mode: sass + codemirror_mime_mode: text/x-sass color: "#CF649A" language_id: 340 Scala: type: programming ace_mode: scala - codemirror_mode: text/x-scala + codemirror_mode: clike + codemirror_mime_mode: text/x-scala color: "#c22d40" extensions: - ".scala" @@ -3708,7 +3861,8 @@ Scheme: - gosh - r6rs ace_mode: scheme - codemirror_mode: text/x-scheme + codemirror_mode: scheme + codemirror_mime_mode: text/x-scheme language_id: 343 Scilab: type: programming @@ -3760,7 +3914,8 @@ Shell: - sh - zsh ace_mode: sh - codemirror_mode: text/x-sh + codemirror_mode: shell + codemirror_mime_mode: text/x-sh language_id: 346 ShellSession: type: programming @@ -3771,7 +3926,8 @@ ShellSession: - console tm_scope: text.shell-session ace_mode: sh - codemirror_mode: text/x-sh + codemirror_mode: shell + codemirror_mime_mode: text/x-sh language_id: 347 Shen: type: programming @@ -3797,7 +3953,8 @@ Slim: - ".slim" tm_scope: text.slim ace_mode: text - codemirror_mode: text/x-slim + codemirror_mode: slim + codemirror_mime_mode: text/x-slim language_id: 350 Smali: type: programming @@ -3815,14 +3972,16 @@ Smalltalk: aliases: - squeak ace_mode: text - codemirror_mode: text/x-stsrc + codemirror_mode: smalltalk + codemirror_mime_mode: text/x-stsrc language_id: 352 Smarty: type: programming extensions: - ".tpl" ace_mode: smarty - codemirror_mode: text/x-smarty + codemirror_mode: smarty + codemirror_mime_mode: text/x-smarty tm_scope: text.html.smarty language_id: 353 SourcePawn: @@ -3844,7 +4003,8 @@ Squirrel: - ".nut" tm_scope: source.c++ ace_mode: c_cpp - codemirror_mode: text/x-c++src + codemirror_mode: clike + codemirror_mime_mode: text/x-c++src language_id: 355 Stan: type: programming @@ -3866,7 +4026,8 @@ Standard ML: - ".sml" tm_scope: source.ml ace_mode: text - codemirror_mode: text/x-ocaml + codemirror_mode: mllike + codemirror_mime_mode: text/x-ocaml language_id: 357 Stata: type: programming @@ -3887,6 +4048,7 @@ Stylus: - ".styl" tm_scope: source.stylus ace_mode: stylus + codemirror_mode: stylus language_id: 359 SubRip Text: type: data @@ -3913,7 +4075,8 @@ Swift: extensions: - ".swift" ace_mode: text - codemirror_mode: text/x-swift + codemirror_mode: swift + codemirror_mime_mode: text/x-swift language_id: 362 SystemVerilog: type: programming @@ -3923,7 +4086,8 @@ SystemVerilog: - ".svh" - ".vh" ace_mode: verilog - codemirror_mode: text/x-systemverilog + codemirror_mode: verilog + codemirror_mime_mode: text/x-systemverilog language_id: 363 TLA: type: programming @@ -3938,7 +4102,8 @@ TOML: - ".toml" tm_scope: source.toml ace_mode: toml - codemirror_mode: text/x-toml + codemirror_mode: toml + codemirror_mime_mode: text/x-toml language_id: 365 TXL: type: programming @@ -3958,7 +4123,8 @@ Tcl: - tclsh - wish ace_mode: tcl - codemirror_mode: text/x-tcl + codemirror_mode: tcl + codemirror_mime_mode: text/x-tcl language_id: 367 Tcsh: type: programming @@ -3968,13 +4134,15 @@ Tcsh: - ".csh" tm_scope: source.shell ace_mode: sh - codemirror_mode: text/x-sh + codemirror_mode: shell + codemirror_mime_mode: text/x-sh language_id: 368 TeX: type: markup color: "#3D6117" ace_mode: tex - codemirror_mode: text/x-stex + codemirror_mode: stex + codemirror_mime_mode: text/x-stex wrap: true aliases: - latex @@ -4008,7 +4176,8 @@ Terra: - ".t" color: "#00004c" ace_mode: lua - codemirror_mode: text/x-lua + codemirror_mode: lua + codemirror_mime_mode: text/x-lua interpreters: - lua language_id: 371 @@ -4041,7 +4210,8 @@ Text: Textile: type: prose ace_mode: textile - codemirror_mode: text/x-textile + codemirror_mode: textile + codemirror_mime_mode: text/x-textile wrap: true extensions: - ".textile" @@ -4069,7 +4239,8 @@ Turtle: - ".ttl" tm_scope: source.turtle ace_mode: text - codemirror_mode: text/turtle + codemirror_mode: turtle + codemirror_mime_mode: text/turtle language_id: 376 Twig: type: markup @@ -4078,7 +4249,8 @@ Twig: - ".twig" tm_scope: text.html.twig ace_mode: twig - codemirror_mode: text/x-twig + codemirror_mode: twig + codemirror_mime_mode: text/x-twig language_id: 377 TypeScript: type: programming @@ -4090,13 +4262,16 @@ TypeScript: - ".tsx" tm_scope: source.ts ace_mode: typescript - codemirror_mode: text/x-typescript + codemirror_mode: javascript + codemirror_mode: typescript + codemirror_mime_mode: text/x-typescript language_id: 378 Unified Parallel C: type: programming group: C ace_mode: c_cpp - codemirror_mode: text/x-csrc + codemirror_mode: clike + codemirror_mime_mode: text/x-csrc color: "#4e3617" extensions: - ".upc" @@ -4105,7 +4280,8 @@ Unified Parallel C: Unity3D Asset: type: data ace_mode: yaml - codemirror_mode: text/x-yaml + codemirror_mode: yaml + codemirror_mime_mode: text/x-yaml extensions: - ".anim" - ".asset" @@ -4120,7 +4296,8 @@ Uno: extensions: - ".uno" ace_mode: csharp - codemirror_mode: text/x-csharp + codemirror_mode: clike + codemirror_mime_mode: text/x-csharp tm_scope: source.cs language_id: 381 UnrealScript: @@ -4130,7 +4307,8 @@ UnrealScript: - ".uc" tm_scope: source.java ace_mode: java - codemirror_mode: text/x-java + codemirror_mode: clike + codemirror_mime_mode: text/x-java language_id: 382 UrWeb: type: programming @@ -4164,7 +4342,8 @@ VHDL: - ".vht" - ".vhw" ace_mode: vhdl - codemirror_mode: text/x-vhdl + codemirror_mode: vhdl + codemirror_mime_mode: text/x-vhdl language_id: 385 Vala: type: programming @@ -4181,7 +4360,8 @@ Verilog: - ".v" - ".veo" ace_mode: verilog - codemirror_mode: text/x-verilog + codemirror_mode: verilog + codemirror_mime_mode: text/x-verilog language_id: 387 VimL: type: programming @@ -4219,7 +4399,8 @@ Visual Basic: - vb.net - vbnet ace_mode: text - codemirror_mode: text/x-vb + codemirror_mode: vb + codemirror_mime_mode: text/x-vb language_id: 389 Volt: type: programming @@ -4228,7 +4409,8 @@ Volt: - ".volt" tm_scope: source.d ace_mode: d - codemirror_mode: text/x-d + codemirror_mode: d + codemirror_mime_mode: text/x-d language_id: 390 Vue: type: markup @@ -4237,6 +4419,7 @@ Vue: - ".vue" tm_scope: text.html.vue ace_mode: html + codemirror_mode: vue language_id: 391 Wavefront Material: type: data @@ -4266,7 +4449,8 @@ WebIDL: - ".webidl" tm_scope: source.webidl ace_mode: text - codemirror_mode: text/x-webidl + codemirror_mode: webidl + codemirror_mime_mode: text/x-webidl language_id: 395 World of Warcraft Addon Data: type: data @@ -4292,12 +4476,14 @@ XC: - ".xc" tm_scope: source.xc ace_mode: c_cpp - codemirror_mode: text/x-csrc + codemirror_mode: clike + codemirror_mime_mode: text/x-csrc language_id: 398 XML: type: data ace_mode: xml - codemirror_mode: text/xml + codemirror_mode: xml + codemirror_mime_mode: text/xml aliases: - rss - xsd @@ -4406,7 +4592,8 @@ XPages: - ".xsp.metadata" tm_scope: none ace_mode: xml - codemirror_mode: text/xml + codemirror_mode: xml + codemirror_mime_mode: text/xml language_id: 400 XProc: type: programming @@ -4415,7 +4602,8 @@ XProc: - ".xproc" tm_scope: text.xml ace_mode: xml - codemirror_mode: text/xml + codemirror_mode: xml + codemirror_mime_mode: text/xml language_id: 401 XQuery: type: programming @@ -4427,7 +4615,8 @@ XQuery: - ".xqm" - ".xqy" ace_mode: xquery - codemirror_mode: application/xquery + codemirror_mode: xquery + codemirror_mime_mode: application/xquery tm_scope: source.xq language_id: 402 XS: @@ -4436,7 +4625,8 @@ XS: - ".xs" tm_scope: source.c ace_mode: c_cpp - codemirror_mode: text/x-csrc + codemirror_mode: clike + codemirror_mime_mode: text/x-csrc language_id: 403 XSLT: type: programming @@ -4447,7 +4637,8 @@ XSLT: - ".xsl" tm_scope: text.xml.xsl ace_mode: xml - codemirror_mode: text/xml + codemirror_mode: xml + codemirror_mime_mode: text/xml color: "#EB8CEB" language_id: 404 Xojo: @@ -4484,7 +4675,8 @@ YAML: filenames: - ".clang-format" ace_mode: yaml - codemirror_mode: text/x-yaml + codemirror_mode: yaml + codemirror_mime_mode: text/x-yaml language_id: 407 YANG: type: data @@ -4541,7 +4733,8 @@ eC: edn: type: data ace_mode: clojure - codemirror_mode: text/x-clojure + codemirror_mode: clojure + codemirror_mime_mode: text/x-clojure extensions: - ".edn" tm_scope: source.clojure @@ -4589,12 +4782,14 @@ reStructuredText: - ".rest.txt" - ".rst.txt" ace_mode: text - codemirror_mode: text/x-rst + codemirror_mode: rst + codemirror_mime_mode: text/x-rst language_id: 419 wisp: type: programming ace_mode: clojure - codemirror_mode: text/x-clojure + codemirror_mode: clojure + codemirror_mime_mode: text/x-clojure color: "#7582D1" extensions: - ".wisp" diff --git a/test/test_language.rb b/test/test_language.rb index 04c136830d..eda2db2a07 100644 --- a/test/test_language.rb +++ b/test/test_language.rb @@ -352,7 +352,17 @@ def test_ace_modes end def test_codemirror_mode - assert_equal 'text/x-c++src', Language['C++'].codemirror_mode + assert_equal 'ruby', Language['Ruby'].codemirror_mode + assert_equal 'javascript', Language['JavaScript'].codemirror_mode + assert_equal 'clike', Language['C'].codemirror_mode + assert_equal 'clike', Language['C++'].codemirror_mode + end + + def test_codemirror_mime_mode + assert_equal 'text/x-ruby', Language['Ruby'].codemirror_mime_mode + assert_equal 'text/javascript', Language['JavaScript'].codemirror_mime_mode + assert_equal 'text/x-csrc', Language['C'].codemirror_mime_mode + assert_equal 'text/x-c++src', Language['C++'].codemirror_mime_mode end def test_wrap From 0406a5b326dab3f3356ae64d86a7cc0641f9b04f Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Fri, 23 Sep 2016 14:39:15 -0700 Subject: [PATCH 0098/1214] Fix typescript indent --- lib/linguist/languages.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 36b61047de..9562efb3a2 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -4262,8 +4262,7 @@ TypeScript: - ".tsx" tm_scope: source.ts ace_mode: typescript - codemirror_mode: javascript - codemirror_mode: typescript + codemirror_mode: typescript codemirror_mime_mode: text/x-typescript language_id: 378 Unified Parallel C: From 855f1a1f865675ae4f984f1cfbb28a775732f3be Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Fri, 23 Sep 2016 14:47:49 -0700 Subject: [PATCH 0099/1214] Validate CodeMirror modes --- .gitmodules | 3 +++ lib/linguist/language.rb | 3 +++ lib/linguist/languages.yml | 12 ++++++------ test/test_language.rb | 8 ++++++++ vendor/CodeMirror | 1 + 5 files changed, 21 insertions(+), 6 deletions(-) create mode 160000 vendor/CodeMirror diff --git a/.gitmodules b/.gitmodules index cbf7a60290..832b6423ce 100644 --- a/.gitmodules +++ b/.gitmodules @@ -791,3 +791,6 @@ [submodule "vendor/grammars/language-babel"] path = vendor/grammars/language-babel url = https://github.com/github-linguist/language-babel +[submodule "vendor/CodeMirror"] + path = vendor/CodeMirror + url = https://github.com/codemirror/CodeMirror diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index ea88b87fc3..e4d3cf71e3 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -402,6 +402,9 @@ def initialize(attributes = {}) # Public: Get CodeMirror mode # + # Maps to a directory in the `mode/` source code. + # https://github.com/codemirror/CodeMirror/tree/master/mode + # # Examples # # # => "nil" diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 9562efb3a2..2b816a9250 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1083,7 +1083,7 @@ Ecere Projects: - ".epj" tm_scope: source.json ace_mode: json - codemirror_mode: json + codemirror_mode: javascript codemirror_mime_mode: application/json language_id: 98 Eiffel: @@ -1632,7 +1632,7 @@ HTML: type: markup tm_scope: text.html.basic ace_mode: html - codemirror_mode: html + codemirror_mode: htmlembedded codemirror_mime_mode: text/html color: "#e44b23" aliases: @@ -2118,7 +2118,7 @@ KiCad: Kit: type: markup ace_mode: html - codemirror_mode: html + codemirror_mode: htmlembedded codemirror_mime_mode: text/html extensions: - ".kit" @@ -2133,7 +2133,7 @@ Kotlin: - ".kts" tm_scope: source.Kotlin ace_mode: text - codemirror_mode: kotlin + codemirror_mode: clike codemirror_mime_mode: text/x-kotlin language_id: 189 LFE: @@ -2419,7 +2419,7 @@ MTML: - ".mtml" tm_scope: text.html.basic ace_mode: html - codemirror_mode: html + codemirror_mode: htmlembedded codemirror_mime_mode: text/html language_id: 218 MUF: @@ -4262,7 +4262,7 @@ TypeScript: - ".tsx" tm_scope: source.ts ace_mode: typescript - codemirror_mode: typescript + codemirror_mode: javascript codemirror_mime_mode: text/x-typescript language_id: 378 Unified Parallel C: diff --git a/test/test_language.rb b/test/test_language.rb index eda2db2a07..0d711d364a 100644 --- a/test/test_language.rb +++ b/test/test_language.rb @@ -452,6 +452,14 @@ def test_all_languages_have_a_valid_ace_mode assert missing.empty?, message end + def test_valid_codemirror_mode + Language.all.each do |language| + if mode = language.codemirror_mode + assert File.exist?(File.expand_path("../../vendor/CodeMirror/mode/#{mode}", __FILE__)), "#{mode} isn't a valid CodeMirror mode" + end + end + end + def test_all_popular_languages_exist popular = YAML.load(File.read(File.expand_path("../../lib/linguist/popular.yml", __FILE__))) diff --git a/vendor/CodeMirror b/vendor/CodeMirror new file mode 160000 index 0000000000..562e8eff5b --- /dev/null +++ b/vendor/CodeMirror @@ -0,0 +1 @@ +Subproject commit 562e8eff5b0916d3b63fc59eda9540f8f455c6ed From d3f3c0345c3d56fe605f6ef140c33bb52231cc12 Mon Sep 17 00:00:00 2001 From: Josh Cheek Date: Fri, 23 Sep 2016 15:29:02 -0700 Subject: [PATCH 0100/1214] Add a sample showing the Julia interpreter is correctly analyzed --- samples/Julia/julia | 60 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 samples/Julia/julia diff --git a/samples/Julia/julia b/samples/Julia/julia new file mode 100644 index 0000000000..c8fbb1f3ea --- /dev/null +++ b/samples/Julia/julia @@ -0,0 +1,60 @@ +#!/usr/bin/env julia + +# From https://github.com/JoshCheek/language-sampler-for-fullpath/blob/b766dcdbd249ec63516f491390a75315e78cba95/julia/fullpath +help_screen = """ +usage: fullpath *[relative-paths] [-c] + + Prints the fullpath of the paths + If no paths are given as args, it will read them from stdin + + If there is only one path, the trailing newline is omitted + + The -c flag will copy the results into your pasteboard +""" + +help = false +copy = false +dir = pwd() +paths = [] + +for arg = ARGS + if arg == "-h" || arg == "--help" + help = true + elseif arg == "-c" || arg == "--copy" + copy = true + elseif arg != "" + push!(paths, arg) + end +end + +if help + print(help_screen) + exit() +end + +function notempty(string) + return !isempty(string) +end + +if length(paths) == 0 + paths = filter(notempty, map(chomp, readlines())) +end + +function print_paths(stream, paths) + if length(paths) == 1 + path = paths[1] + print(stream, "$dir/$path") + else + for path = paths + println(stream, "$dir/$path") + end + end +end + +if copy + read, write, process = readandwrite(`pbcopy`) + print_paths(write, paths) + close(write) +end + +print_paths(STDOUT, paths) From 3abe081560ca924caaa425bd38212feb3e7daeb9 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Fri, 23 Sep 2016 16:30:38 -0700 Subject: [PATCH 0101/1214] Validate codemirror modes --- lib/linguist/languages.yml | 42 +++++++++++--------------------------- test/test_language.rb | 26 +++++++++++++++++++++++ 2 files changed, 38 insertions(+), 30 deletions(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 2b816a9250..9bb32f8a7d 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -234,8 +234,6 @@ Apollo Guidance Computer: - ".agc" tm_scope: source.agc ace_mode: assembly_x86 - codemirror_mode: gas - codemirror_mime_mode: text/x-gas language_id: 18 AppleScript: type: programming @@ -298,8 +296,6 @@ Assembly: - ".nasm" tm_scope: source.assembly ace_mode: assembly_x86 - codemirror_mode: gas - codemirror_mime_mode: text/x-gas language_id: 24 Augeas: type: programming @@ -516,8 +512,6 @@ C-ObjDump: - ".c-objdump" tm_scope: objdump.x86asm ace_mode: assembly_x86 - codemirror_mode: gas - codemirror_mime_mode: text/x-gas language_id: 44 C2hs Haskell: type: programming @@ -568,7 +562,7 @@ COLLADA: tm_scope: text.xml ace_mode: xml codemirror_mode: xml - codemirror_mime_mode: text/x-xml + codemirror_mime_mode: text/xml language_id: 49 CSS: type: markup @@ -799,8 +793,6 @@ Cpp-ObjDump: aliases: - c++-objdump ace_mode: assembly_x86 - codemirror_mode: gas - codemirror_mime_mode: text/x-gas language_id: 70 Creole: type: prose @@ -909,8 +901,6 @@ D-ObjDump: - ".d-objdump" tm_scope: objdump.x86asm ace_mode: assembly_x86 - codemirror_mode: gas - codemirror_mime_mode: text/x-gas language_id: 81 DIGITAL Command Language: type: programming @@ -972,7 +962,7 @@ Dart: - dart ace_mode: dart codemirror_mode: dart - codemirror_mime_mode: text/x-dart + codemirror_mime_mode: application/dart language_id: 87 Diff: type: data @@ -1337,8 +1327,6 @@ GAS: - ".ms" tm_scope: source.assembly ace_mode: assembly_x86 - codemirror_mode: gas - codemirror_mime_mode: text/x-gas language_id: 120 GCC Machine Description: type: programming @@ -1632,7 +1620,7 @@ HTML: type: markup tm_scope: text.html.basic ace_mode: html - codemirror_mode: htmlembedded + codemirror_mode: htmlmixed codemirror_mime_mode: text/html color: "#e44b23" aliases: @@ -1671,7 +1659,7 @@ HTML+ECR: extensions: - ".ecr" ace_mode: text - codemirror_mode: htmlembedded + codemirror_mode: htmlmixed codemirror_mime_mode: text/html language_id: 148 HTML+EEX: @@ -1683,7 +1671,7 @@ HTML+EEX: extensions: - ".eex" ace_mode: text - codemirror_mode: htmlembedded + codemirror_mode: htmlmixed codemirror_mime_mode: text/html language_id: 149 HTML+ERB: @@ -1752,7 +1740,6 @@ Handlebars: - ".hbs" tm_scope: text.html.handlebars ace_mode: handlebars - codemirror_mode: handlebars language_id: 155 Harbour: type: programming @@ -1962,8 +1949,6 @@ JSONLD: type: data group: JavaScript ace_mode: javascript - codemirror_mode: javascript - codemirror_mime_mode: application/ld+json extensions: - ".jsonld" tm_scope: source.js @@ -1985,6 +1970,7 @@ JSX: - ".jsx" tm_scope: source.js.jsx ace_mode: javascript + codemirror_mode: jsx codemirror_mime_mode: text/jsx language_id: 178 Jade: @@ -2118,7 +2104,7 @@ KiCad: Kit: type: markup ace_mode: html - codemirror_mode: htmlembedded + codemirror_mode: htmlmixed codemirror_mime_mode: text/html extensions: - ".kit" @@ -2419,7 +2405,7 @@ MTML: - ".mtml" tm_scope: text.html.basic ace_mode: html - codemirror_mode: htmlembedded + codemirror_mode: htmlmixed codemirror_mime_mode: text/html language_id: 218 MUF: @@ -2474,7 +2460,7 @@ Mako: Markdown: type: prose ace_mode: markdown - codemirror_mode: markdown + codemirror_mode: gfm codemirror_mime_mode: text/x-gfm wrap: true extensions: @@ -2837,8 +2823,6 @@ ObjDump: - ".objdump" tm_scope: objdump.x86asm ace_mode: assembly_x86 - codemirror_mode: gas - codemirror_mime_mode: text/x-gas language_id: 256 Objective-C: type: programming @@ -3247,7 +3231,7 @@ PowerShell: type: programming ace_mode: powershell codemirror_mode: powershell - codemirror_mime_mode: text/x-powershell + codemirror_mime_mode: application/x-powershell aliases: - posh extensions: @@ -3482,7 +3466,7 @@ RMarkdown: type: prose wrap: true ace_mode: markdown - codemirror_mode: markdown + codemirror_mode: gfm codemirror_mime_mode: text/x-gfm extensions: - ".rmd" @@ -4048,7 +4032,6 @@ Stylus: - ".styl" tm_scope: source.stylus ace_mode: stylus - codemirror_mode: stylus language_id: 359 SubRip Text: type: data @@ -4263,7 +4246,7 @@ TypeScript: tm_scope: source.ts ace_mode: typescript codemirror_mode: javascript - codemirror_mime_mode: text/x-typescript + codemirror_mime_mode: application/typescript language_id: 378 Unified Parallel C: type: programming @@ -4418,7 +4401,6 @@ Vue: - ".vue" tm_scope: text.html.vue ace_mode: html - codemirror_mode: vue language_id: 391 Wavefront Material: type: data diff --git a/test/test_language.rb b/test/test_language.rb index 0d711d364a..48391e598c 100644 --- a/test/test_language.rb +++ b/test/test_language.rb @@ -452,6 +452,15 @@ def test_all_languages_have_a_valid_ace_mode assert missing.empty?, message end + def test_codemirror_modes_present + Language.all.each do |language| + if language.codemirror_mode || language.codemirror_mime_mode + assert language.codemirror_mode, "#{language.inspect} missing CodeMirror mode" + assert language.codemirror_mime_mode, "#{language.inspect} missing CodeMirror MIME mode" + end + end + end + def test_valid_codemirror_mode Language.all.each do |language| if mode = language.codemirror_mode @@ -460,6 +469,23 @@ def test_valid_codemirror_mode end end + def test_codemirror_mode_and_mime_defined_by_meta_mapping + meta = File.read(File.expand_path("../../vendor/CodeMirror/mode/meta.js", __FILE__)) + Language.all.each do |language| + next unless language.codemirror_mode && language.codemirror_mime_mode + assert meta.match(/^.+#{Regexp.escape(language.codemirror_mime_mode)}.+#{Regexp.escape(language.codemirror_mode)}.+$/), "#{language.inspect}: #{language.codemirror_mime_mode} not defined under #{language.codemirror_mode}" + end + end + + def test_codemirror_mime_declared_in_mode_file + Language.all.each do |language| + next unless language.codemirror_mode && language.codemirror_mime_mode + filename = File.expand_path("../../vendor/CodeMirror/mode/#{language.codemirror_mode}/#{language.codemirror_mode}.js", __FILE__) + assert File.exist?(filename), "#{filename} does not exist" + assert File.read(filename).match(language.codemirror_mime_mode), "#{language.inspect}: #{language.codemirror_mime_mode} not defined in #{filename}" + end + end + def test_all_popular_languages_exist popular = YAML.load(File.read(File.expand_path("../../lib/linguist/popular.yml", __FILE__))) From 67ed060d378f7e39992c0f520bbb4a408f2f5f81 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Fri, 23 Sep 2016 16:33:12 -0700 Subject: [PATCH 0102/1214] Assert CodeMirror modes and mime types are valid against source --- lib/linguist/language.rb | 6 +- lib/linguist/languages.yml | 368 ++++++++++++++++++------------------- test/test_grammars.rb | 2 +- test/test_language.rb | 22 +-- 4 files changed, 199 insertions(+), 199 deletions(-) diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index e4d3cf71e3..875ef956b3 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -302,7 +302,7 @@ def initialize(attributes = {}) @ace_mode = attributes[:ace_mode] @codemirror_mode = attributes[:codemirror_mode] - @codemirror_mime_mode = attributes[:codemirror_mime_mode] + @codemirror_mime_type = attributes[:codemirror_mime_type] @wrap = attributes[:wrap] || false # Set legacy search term @@ -423,7 +423,7 @@ def initialize(attributes = {}) # # => "text/x-csrc" # # Returns a String name or nil - attr_reader :codemirror_mime_mode + attr_reader :codemirror_mime_type # Public: Should language lines be wrapped # @@ -602,7 +602,7 @@ def inspect :tm_scope => options['tm_scope'], :ace_mode => options['ace_mode'], :codemirror_mode => options['codemirror_mode'], - :codemirror_mime_mode => options['codemirror_mime_mode'], + :codemirror_mime_type => options['codemirror_mime_type'], :wrap => options['wrap'], :group_name => options['group'], :searchable => options.fetch('searchable', true), diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 9bb32f8a7d..269525ce0f 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -60,7 +60,7 @@ AGS Script: tm_scope: source.c++ ace_mode: c_cpp codemirror_mode: clike - codemirror_mime_mode: text/x-c++src + codemirror_mime_type: text/x-c++src language_id: 2 AMPL: type: programming @@ -99,7 +99,7 @@ APL: tm_scope: source.apl ace_mode: text codemirror_mode: apl - codemirror_mime_mode: text/apl + codemirror_mime_type: text/apl language_id: 6 ASN.1: type: data @@ -110,7 +110,7 @@ ASN.1: tm_scope: source.asn ace_mode: text codemirror_mode: asn.1 - codemirror_mime_mode: text/x-ttcn-asn + codemirror_mime_type: text/x-ttcn-asn language_id: 7 ASP: type: programming @@ -130,7 +130,7 @@ ASP: - ".axd" ace_mode: text codemirror_mode: htmlembedded - codemirror_mime_mode: application/x-aspx + codemirror_mime_type: application/x-aspx language_id: 8 ATS: type: programming @@ -194,7 +194,7 @@ Alpine Abuild: tm_scope: source.shell ace_mode: sh codemirror_mode: shell - codemirror_mime_mode: text/x-sh + codemirror_mime_type: text/x-sh language_id: 14 Ant Build System: type: data @@ -204,7 +204,7 @@ Ant Build System: - build.xml ace_mode: xml codemirror_mode: xml - codemirror_mime_mode: application/xml + codemirror_mime_type: application/xml language_id: 15 ApacheConf: type: markup @@ -224,7 +224,7 @@ Apex: tm_scope: source.java ace_mode: java codemirror_mode: clike - codemirror_mime_mode: text/x-java + codemirror_mime_type: text/x-java language_id: 17 Apollo Guidance Computer: type: programming @@ -263,7 +263,7 @@ Arduino: tm_scope: source.c++ ace_mode: c_cpp codemirror_mode: clike - codemirror_mime_mode: text/x-c++src + codemirror_mime_type: text/x-c++src language_id: 21 AsciiDoc: type: prose @@ -434,7 +434,7 @@ Brainfuck: tm_scope: source.bf ace_mode: text codemirror_mode: brainfuck - codemirror_mime_mode: text/x-brainfuck + codemirror_mime_type: text/x-brainfuck language_id: 38 Brightscript: type: programming @@ -462,13 +462,13 @@ C: - tcc ace_mode: c_cpp codemirror_mode: clike - codemirror_mime_mode: text/x-csrc + codemirror_mime_type: text/x-csrc language_id: 41 C#: type: programming ace_mode: csharp codemirror_mode: clike - codemirror_mime_mode: text/x-csharp + codemirror_mime_type: text/x-csharp tm_scope: source.cs search_term: csharp color: "#178600" @@ -484,7 +484,7 @@ C++: type: programming ace_mode: c_cpp codemirror_mode: clike - codemirror_mime_mode: text/x-c++src + codemirror_mime_type: text/x-c++src search_term: cpp color: "#f34b7d" aliases: @@ -523,7 +523,7 @@ C2hs Haskell: tm_scope: source.haskell ace_mode: haskell codemirror_mode: haskell - codemirror_mime_mode: text/x-haskell + codemirror_mime_type: text/x-haskell language_id: 45 CLIPS: type: programming @@ -541,7 +541,7 @@ CMake: - CMakeLists.txt ace_mode: text codemirror_mode: cmake - codemirror_mime_mode: text/x-cmake + codemirror_mime_type: text/x-cmake language_id: 47 COBOL: type: programming @@ -553,7 +553,7 @@ COBOL: - ".cpy" ace_mode: cobol codemirror_mode: cobol - codemirror_mime_mode: text/x-cobol + codemirror_mime_type: text/x-cobol language_id: 48 COLLADA: type: data @@ -562,14 +562,14 @@ COLLADA: tm_scope: text.xml ace_mode: xml codemirror_mode: xml - codemirror_mime_mode: text/xml + codemirror_mime_type: text/xml language_id: 49 CSS: type: markup tm_scope: source.css ace_mode: css codemirror_mode: css - codemirror_mime_mode: text/css + codemirror_mime_type: text/css color: "#563d7c" extensions: - ".css" @@ -626,7 +626,7 @@ ChucK: tm_scope: source.java ace_mode: java codemirror_mode: clike - codemirror_mime_mode: text/x-java + codemirror_mime_type: text/x-java language_id: 57 Cirru: type: programming @@ -664,7 +664,7 @@ Clojure: type: programming ace_mode: clojure codemirror_mode: clojure - codemirror_mime_mode: text/x-clojure + codemirror_mime_type: text/x-clojure color: "#db5855" extensions: - ".clj" @@ -684,7 +684,7 @@ CoffeeScript: tm_scope: source.coffee ace_mode: coffee codemirror_mode: coffeescript - codemirror_mime_mode: text/x-coffeescript + codemirror_mime_type: text/x-coffeescript color: "#244776" aliases: - coffee @@ -751,7 +751,7 @@ Common Lisp: - ecl ace_mode: lisp codemirror_mode: commonlisp - codemirror_mime_mode: text/x-common-lisp + codemirror_mime_type: text/x-common-lisp language_id: 66 Component Pascal: type: programming @@ -765,7 +765,7 @@ Component Pascal: - objectpascal ace_mode: pascal codemirror_mode: pascal - codemirror_mime_mode: text/x-pascal + codemirror_mime_type: text/x-pascal language_id: 67 Cool: type: programming @@ -809,7 +809,7 @@ Crystal: - ".cr" ace_mode: ruby codemirror_mode: crystal - codemirror_mime_mode: text/x-crystal + codemirror_mime_type: text/x-crystal tm_scope: source.crystal interpreters: - crystal @@ -860,7 +860,7 @@ Cuda: tm_scope: source.cuda-c++ ace_mode: c_cpp codemirror_mode: clike - codemirror_mime_mode: text/x-c++src + codemirror_mime_type: text/x-c++src color: "#3A4E3A" language_id: 77 Cycript: @@ -870,7 +870,7 @@ Cycript: tm_scope: source.js ace_mode: javascript codemirror_mode: javascript - codemirror_mime_mode: text/javascript + codemirror_mime_type: text/javascript language_id: 78 Cython: type: programming @@ -883,7 +883,7 @@ Cython: - pyrex ace_mode: text codemirror_mode: python - codemirror_mime_mode: text/x-cython + codemirror_mime_type: text/x-cython language_id: 79 D: type: programming @@ -893,7 +893,7 @@ D: - ".di" ace_mode: d codemirror_mode: d - codemirror_mime_mode: text/x-d + codemirror_mime_type: text/x-d language_id: 80 D-ObjDump: type: data @@ -940,7 +940,7 @@ DTrace: tm_scope: source.c ace_mode: c_cpp codemirror_mode: clike - codemirror_mime_mode: text/x-csrc + codemirror_mime_type: text/x-csrc language_id: 85 Darcs Patch: type: data @@ -962,7 +962,7 @@ Dart: - dart ace_mode: dart codemirror_mode: dart - codemirror_mime_mode: application/dart + codemirror_mime_type: application/dart language_id: 87 Diff: type: data @@ -974,7 +974,7 @@ Diff: tm_scope: source.diff ace_mode: diff codemirror_mode: diff - codemirror_mime_mode: text/x-diff + codemirror_mime_type: text/x-diff language_id: 88 Dockerfile: type: data @@ -985,7 +985,7 @@ Dockerfile: - Dockerfile ace_mode: dockerfile codemirror_mode: dockerfile - codemirror_mime_mode: text/x-dockerfile + codemirror_mime_type: text/x-dockerfile language_id: 89 Dogescript: type: programming @@ -1005,7 +1005,7 @@ Dylan: - ".lid" ace_mode: text codemirror_mode: dylan - codemirror_mime_mode: text/x-dylan + codemirror_mime_type: text/x-dylan language_id: 91 E: type: programming @@ -1026,7 +1026,7 @@ ECL: tm_scope: none ace_mode: text codemirror_mode: ecl - codemirror_mime_mode: text/x-ecl + codemirror_mime_type: text/x-ecl language_id: 93 ECLiPSe: type: programming @@ -1053,7 +1053,7 @@ EQ: tm_scope: source.cs ace_mode: csharp codemirror_mode: clike - codemirror_mime_mode: text/x-csharp + codemirror_mime_type: text/x-csharp language_id: 96 Eagle: type: markup @@ -1064,7 +1064,7 @@ Eagle: tm_scope: text.xml ace_mode: xml codemirror_mode: xml - codemirror_mime_mode: text/xml + codemirror_mime_type: text/xml language_id: 97 Ecere Projects: type: data @@ -1074,7 +1074,7 @@ Ecere Projects: tm_scope: source.json ace_mode: json codemirror_mode: javascript - codemirror_mime_mode: application/json + codemirror_mime_type: application/json language_id: 98 Eiffel: type: programming @@ -1083,7 +1083,7 @@ Eiffel: - ".e" ace_mode: eiffel codemirror_mode: eiffel - codemirror_mime_mode: text/x-eiffel + codemirror_mime_type: text/x-eiffel language_id: 99 Elixir: type: programming @@ -1105,7 +1105,7 @@ Elm: tm_scope: source.elm ace_mode: elm codemirror_mode: elm - codemirror_mime_mode: text/x-elm + codemirror_mime_type: text/x-elm language_id: 101 Emacs Lisp: type: programming @@ -1130,7 +1130,7 @@ Emacs Lisp: - ".emacs.desktop" ace_mode: lisp codemirror_mode: commonlisp - codemirror_mime_mode: text/x-common-lisp + codemirror_mime_type: text/x-common-lisp language_id: 102 EmberScript: type: programming @@ -1141,7 +1141,7 @@ EmberScript: tm_scope: source.coffee ace_mode: coffee codemirror_mode: coffeescript - codemirror_mime_mode: text/x-coffeescript + codemirror_mime_type: text/x-coffeescript language_id: 103 Erlang: type: programming @@ -1160,7 +1160,7 @@ Erlang: - rebar.lock ace_mode: erlang codemirror_mode: erlang - codemirror_mime_mode: text/x-erlang + codemirror_mime_type: text/x-erlang interpreters: - escript language_id: 104 @@ -1177,7 +1177,7 @@ F#: tm_scope: source.fsharp ace_mode: text codemirror_mode: mllike - codemirror_mime_mode: text/x-fsharp + codemirror_mime_type: text/x-fsharp language_id: 105 FLUX: type: programming @@ -1203,7 +1203,7 @@ FORTRAN: tm_scope: source.fortran.modern ace_mode: text codemirror_mode: fortran - codemirror_mime_mode: text/x-fortran + codemirror_mime_type: text/x-fortran language_id: 107 Factor: type: programming @@ -1215,7 +1215,7 @@ Factor: - ".factor-rc" ace_mode: text codemirror_mode: factor - codemirror_mime_mode: text/x-factor + codemirror_mime_type: text/x-factor language_id: 108 Fancy: type: programming @@ -1272,7 +1272,7 @@ Forth: - ".fs" ace_mode: forth codemirror_mode: forth - codemirror_mime_mode: text/x-forth + codemirror_mime_type: text/x-forth language_id: 114 FreeMarker: type: programming @@ -1335,7 +1335,7 @@ GCC Machine Description: tm_scope: source.lisp ace_mode: lisp codemirror_mode: commonlisp - codemirror_mime_mode: text/x-common-lisp + codemirror_mime_type: text/x-common-lisp language_id: 121 GDB: type: programming @@ -1381,7 +1381,7 @@ Game Maker Language: tm_scope: source.c++ ace_mode: c_cpp codemirror_mode: clike - codemirror_mime_mode: text/x-c++src + codemirror_mime_type: text/x-c++src language_id: 125 Genshi: type: programming @@ -1393,7 +1393,7 @@ Genshi: - xml+kid ace_mode: xml codemirror_mode: xml - codemirror_mime_mode: text/xml + codemirror_mime_type: text/xml language_id: 126 Gentoo Ebuild: type: programming @@ -1403,7 +1403,7 @@ Gentoo Ebuild: tm_scope: source.shell ace_mode: sh codemirror_mode: shell - codemirror_mime_mode: text/x-sh + codemirror_mime_type: text/x-sh language_id: 127 Gentoo Eclass: type: programming @@ -1413,7 +1413,7 @@ Gentoo Eclass: tm_scope: source.shell ace_mode: sh codemirror_mode: shell - codemirror_mime_mode: text/x-sh + codemirror_mime_type: text/x-sh language_id: 128 Gettext Catalog: type: prose @@ -1435,7 +1435,7 @@ Glyph: tm_scope: source.tcl ace_mode: tcl codemirror_mode: tcl - codemirror_mime_mode: text/x-tcl + codemirror_mime_type: text/x-tcl language_id: 130 Gnuplot: type: programming @@ -1457,7 +1457,7 @@ Go: - ".go" ace_mode: golang codemirror_mode: go - codemirror_mime_mode: text/x-go + codemirror_mime_type: text/x-go language_id: 132 Golo: type: programming @@ -1504,7 +1504,7 @@ Grammatical Framework: tm_scope: source.haskell ace_mode: haskell codemirror_mode: haskell - codemirror_mime_mode: text/x-haskell + codemirror_mime_type: text/x-haskell language_id: 137 Graph Modeling Language: type: data @@ -1565,13 +1565,13 @@ Groff: - troff ace_mode: text codemirror_mode: troff - codemirror_mime_mode: text/troff + codemirror_mime_type: text/troff language_id: 141 Groovy: type: programming ace_mode: groovy codemirror_mode: groovy - codemirror_mime_mode: text/x-groovy + codemirror_mime_type: text/x-groovy color: "#e69f56" extensions: - ".groovy" @@ -1594,7 +1594,7 @@ Groovy Server Pages: tm_scope: text.html.jsp ace_mode: jsp codemirror_mode: htmlembedded - codemirror_mime_mode: application/x-jsp + codemirror_mime_type: application/x-jsp language_id: 143 HCL: type: programming @@ -1603,7 +1603,7 @@ HCL: - ".tf" ace_mode: ruby codemirror_mode: ruby - codemirror_mime_mode: text/x-ruby + codemirror_mime_type: text/x-ruby tm_scope: source.ruby language_id: 144 HLSL: @@ -1621,7 +1621,7 @@ HTML: tm_scope: text.html.basic ace_mode: html codemirror_mode: htmlmixed - codemirror_mime_mode: text/html + codemirror_mime_type: text/html color: "#e44b23" aliases: - xhtml @@ -1648,7 +1648,7 @@ HTML+Django: - htmldjango ace_mode: django codemirror_mode: django - codemirror_mime_mode: text/x-django + codemirror_mime_type: text/x-django language_id: 147 HTML+ECR: type: markup @@ -1660,7 +1660,7 @@ HTML+ECR: - ".ecr" ace_mode: text codemirror_mode: htmlmixed - codemirror_mime_mode: text/html + codemirror_mime_type: text/html language_id: 148 HTML+EEX: type: markup @@ -1672,7 +1672,7 @@ HTML+EEX: - ".eex" ace_mode: text codemirror_mode: htmlmixed - codemirror_mime_mode: text/html + codemirror_mime_type: text/html language_id: 149 HTML+ERB: type: markup @@ -1685,7 +1685,7 @@ HTML+ERB: - ".erb.deface" ace_mode: text codemirror_mode: htmlembedded - codemirror_mime_mode: application/x-erb + codemirror_mime_type: application/x-erb language_id: 150 HTML+PHP: type: markup @@ -1695,7 +1695,7 @@ HTML+PHP: - ".phtml" ace_mode: php codemirror_mode: php - codemirror_mime_mode: application/x-httpd-php + codemirror_mime_type: application/x-httpd-php language_id: 151 HTTP: type: data @@ -1704,13 +1704,13 @@ HTTP: tm_scope: source.httpspec ace_mode: text codemirror_mode: http - codemirror_mime_mode: message/http + codemirror_mime_type: message/http language_id: 152 Hack: type: programming ace_mode: php codemirror_mode: php - codemirror_mime_mode: application/x-httpd-php + codemirror_mime_type: application/x-httpd-php extensions: - ".hh" - ".php" @@ -1725,7 +1725,7 @@ Haml: - ".haml.deface" ace_mode: haml codemirror_mode: haml - codemirror_mime_mode: text/x-haml + codemirror_mime_type: text/x-haml color: "#ECE2A9" language_id: 154 Handlebars: @@ -1759,13 +1759,13 @@ Haskell: - runhaskell ace_mode: haskell codemirror_mode: haskell - codemirror_mime_mode: text/x-haskell + codemirror_mime_type: text/x-haskell language_id: 157 Haxe: type: programming ace_mode: haxe codemirror_mode: haxe - codemirror_mime_mode: text/x-haxe + codemirror_mime_type: text/x-haxe color: "#df7900" extensions: - ".hx" @@ -1797,7 +1797,7 @@ IDL: - ".dlm" ace_mode: text codemirror_mode: idl - codemirror_mime_mode: text/x-idl + codemirror_mime_type: text/x-idl language_id: 161 IGOR Pro: type: programming @@ -1822,7 +1822,7 @@ INI: - dosini ace_mode: ini codemirror_mode: properties - codemirror_mime_mode: text/x-properties + codemirror_mime_type: text/x-properties language_id: 163 IRC log: type: data @@ -1923,7 +1923,7 @@ JSON: group: JavaScript ace_mode: json codemirror_mode: javascript - codemirror_mime_mode: application/json + codemirror_mime_type: application/json searchable: false extensions: - ".json" @@ -1943,7 +1943,7 @@ JSON5: tm_scope: source.js ace_mode: javascript codemirror_mode: javascript - codemirror_mime_mode: application/json + codemirror_mime_type: application/json language_id: 175 JSONLD: type: data @@ -1958,7 +1958,7 @@ JSONiq: type: programming ace_mode: jsoniq codemirror_mode: javascript - codemirror_mime_mode: application/json + codemirror_mime_type: application/json extensions: - ".jq" tm_scope: source.jq @@ -1971,7 +1971,7 @@ JSX: tm_scope: source.js.jsx ace_mode: javascript codemirror_mode: jsx - codemirror_mime_mode: text/jsx + codemirror_mime_type: text/jsx language_id: 178 Jade: group: HTML @@ -1982,7 +1982,7 @@ Jade: tm_scope: text.jade ace_mode: jade codemirror_mode: pug - codemirror_mime_mode: text/x-pug + codemirror_mime_type: text/x-pug language_id: 179 Jasmin: type: programming @@ -1995,7 +1995,7 @@ Java: type: programming ace_mode: java codemirror_mode: clike - codemirror_mime_mode: text/x-java + codemirror_mime_type: text/x-java color: "#b07219" extensions: - ".java" @@ -2011,14 +2011,14 @@ Java Server Pages: tm_scope: text.html.jsp ace_mode: jsp codemirror_mode: htmlembedded - codemirror_mime_mode: application/x-jsp + codemirror_mime_type: application/x-jsp language_id: 182 JavaScript: type: programming tm_scope: source.js ace_mode: javascript codemirror_mode: javascript - codemirror_mime_mode: text/javascript + codemirror_mime_type: text/javascript color: "#f1e05a" aliases: - js @@ -2068,13 +2068,13 @@ Julia: color: "#a270ba" ace_mode: julia codemirror_mode: julia - codemirror_mime_mode: text/x-julia + codemirror_mime_type: text/x-julia language_id: 184 Jupyter Notebook: type: markup ace_mode: json codemirror_mode: javascript - codemirror_mime_mode: application/json + codemirror_mime_type: application/json tm_scope: source.json color: "#DA5B0B" extensions: @@ -2105,7 +2105,7 @@ Kit: type: markup ace_mode: html codemirror_mode: htmlmixed - codemirror_mime_mode: text/html + codemirror_mime_type: text/html extensions: - ".kit" tm_scope: text.html.basic @@ -2120,7 +2120,7 @@ Kotlin: tm_scope: source.Kotlin ace_mode: text codemirror_mode: clike - codemirror_mime_mode: text/x-kotlin + codemirror_mime_type: text/x-kotlin language_id: 189 LFE: type: programming @@ -2131,7 +2131,7 @@ LFE: tm_scope: source.lisp ace_mode: lisp codemirror_mode: commonlisp - codemirror_mime_mode: text/x-common-lisp + codemirror_mime_type: text/x-common-lisp language_id: 190 LLVM: type: programming @@ -2165,7 +2165,7 @@ LabVIEW: tm_scope: text.xml ace_mode: xml codemirror_mode: xml - codemirror_mime_mode: text/xml + codemirror_mime_type: text/xml language_id: 194 Lasso: type: programming @@ -2190,7 +2190,7 @@ Latte: tm_scope: text.html.smarty ace_mode: smarty codemirror_mode: smarty - codemirror_mime_mode: text/x-smarty + codemirror_mime_type: text/x-smarty language_id: 196 Lean: type: programming @@ -2207,7 +2207,7 @@ Less: tm_scope: source.css.less ace_mode: less codemirror_mode: css - codemirror_mime_mode: text/css + codemirror_mime_type: text/css color: "#A1D9A1" language_id: 198 Lex: @@ -2292,7 +2292,7 @@ Literate Haskell: tm_scope: text.tex.latex.haskell ace_mode: text codemirror_mode: haskell-literate - codemirror_mime_mode: text/x-literate-haskell + codemirror_mime_type: text/x-literate-haskell language_id: 207 LiveScript: type: programming @@ -2307,7 +2307,7 @@ LiveScript: - Slakefile ace_mode: livescript codemirror_mode: livescript - codemirror_mime_mode: text/x-livescript + codemirror_mime_type: text/x-livescript language_id: 208 Logos: type: programming @@ -2329,7 +2329,7 @@ LookML: type: programming ace_mode: yaml codemirror_mode: yaml - codemirror_mime_mode: text/x-yaml + codemirror_mime_type: text/x-yaml color: "#652B81" extensions: - ".lookml" @@ -2346,7 +2346,7 @@ Lua: type: programming ace_mode: lua codemirror_mode: lua - codemirror_mime_mode: text/x-lua + codemirror_mime_type: text/x-lua color: "#000080" extensions: - ".lua" @@ -2367,7 +2367,7 @@ M: - ".m" ace_mode: text codemirror_mode: mumps - codemirror_mime_mode: text/x-mumps + codemirror_mime_type: text/x-mumps language_id: 214 tm_scope: none M4: @@ -2406,7 +2406,7 @@ MTML: tm_scope: text.html.basic ace_mode: html codemirror_mode: htmlmixed - codemirror_mime_mode: text/html + codemirror_mime_type: text/html language_id: 218 MUF: type: programming @@ -2417,7 +2417,7 @@ MUF: tm_scope: none ace_mode: forth codemirror_mode: forth - codemirror_mime_mode: text/x-forth + codemirror_mime_type: text/x-forth language_id: 219 Makefile: type: programming @@ -2447,7 +2447,7 @@ Makefile: - make ace_mode: makefile codemirror_mode: cmake - codemirror_mime_mode: text/x-cmake + codemirror_mime_type: text/x-cmake language_id: 220 Mako: type: programming @@ -2461,7 +2461,7 @@ Markdown: type: prose ace_mode: markdown codemirror_mode: gfm - codemirror_mime_mode: text/x-gfm + codemirror_mime_type: text/x-gfm wrap: true extensions: - ".md" @@ -2496,7 +2496,7 @@ Mathematica: - mma ace_mode: text codemirror_mode: mathematica - codemirror_mime_mode: text/x-mathematica + codemirror_mime_type: text/x-mathematica language_id: 224 Matlab: type: programming @@ -2508,7 +2508,7 @@ Matlab: - ".m" ace_mode: matlab codemirror_mode: octave - codemirror_mime_mode: text/x-octave + codemirror_mime_type: text/x-octave language_id: 225 Maven POM: type: data @@ -2517,7 +2517,7 @@ Maven POM: - pom.xml ace_mode: xml codemirror_mode: xml - codemirror_mime_mode: text/xml + codemirror_mime_type: text/xml language_id: 226 Max: type: programming @@ -2535,7 +2535,7 @@ Max: tm_scope: source.json ace_mode: json codemirror_mode: javascript - codemirror_mime_mode: application/json + codemirror_mime_type: application/json language_id: 227 MediaWiki: type: prose @@ -2565,7 +2565,7 @@ Metal: tm_scope: source.c++ ace_mode: c_cpp codemirror_mode: clike - codemirror_mime_mode: text/x-c++src + codemirror_mime_type: text/x-c++src language_id: 230 MiniD: type: programming @@ -2587,7 +2587,7 @@ Mirah: tm_scope: source.ruby ace_mode: ruby codemirror_mode: ruby - codemirror_mime_mode: text/x-ruby + codemirror_mime_type: text/x-ruby language_id: 232 Modelica: type: programming @@ -2596,7 +2596,7 @@ Modelica: tm_scope: source.modelica ace_mode: text codemirror_mode: modelica - codemirror_mime_mode: text/x-modelica + codemirror_mime_type: text/x-modelica language_id: 233 Modula-2: type: programming @@ -2667,7 +2667,7 @@ NSIS: - ".nsh" ace_mode: text codemirror_mode: nsis - codemirror_mime_mode: text/x-nsis + codemirror_mime_type: text/x-nsis language_id: 242 Nemerle: type: programming @@ -2702,7 +2702,7 @@ NetLogo: tm_scope: source.lisp ace_mode: lisp codemirror_mode: commonlisp - codemirror_mime_mode: text/x-common-lisp + codemirror_mime_type: text/x-common-lisp language_id: 246 NewLisp: type: programming @@ -2717,7 +2717,7 @@ NewLisp: tm_scope: source.lisp ace_mode: lisp codemirror_mode: commonlisp - codemirror_mime_mode: text/x-common-lisp + codemirror_mime_type: text/x-common-lisp language_id: 247 Nginx: type: markup @@ -2731,7 +2731,7 @@ Nginx: - nginx configuration file ace_mode: text codemirror_mode: nginx - codemirror_mime_mode: text/x-nginx-conf + codemirror_mime_type: text/x-nginx-conf color: "#9469E9" language_id: 248 Nimrod: @@ -2780,7 +2780,7 @@ Nu: tm_scope: source.nu ace_mode: scheme codemirror_mode: scheme - codemirror_mime_mode: text/x-scheme + codemirror_mime_type: text/x-scheme interpreters: - nush language_id: 253 @@ -2794,14 +2794,14 @@ NumPy: tm_scope: none ace_mode: text codemirror_mode: python - codemirror_mime_mode: text/x-python + codemirror_mime_type: text/x-python color: "#9C8AF9" language_id: 254 OCaml: type: programming ace_mode: ocaml codemirror_mode: mllike - codemirror_mime_mode: text/x-ocaml + codemirror_mime_type: text/x-ocaml color: "#3be133" extensions: - ".ml" @@ -2837,7 +2837,7 @@ Objective-C: - ".h" ace_mode: objectivec codemirror_mode: clike - codemirror_mime_mode: text/x-objectivec + codemirror_mime_type: text/x-objectivec language_id: 257 Objective-C++: type: programming @@ -2851,7 +2851,7 @@ Objective-C++: - ".mm" ace_mode: objectivec codemirror_mode: clike - codemirror_mime_mode: text/x-objectivec + codemirror_mime_type: text/x-objectivec language_id: 258 Objective-J: type: programming @@ -2897,7 +2897,7 @@ OpenCL: tm_scope: source.c ace_mode: c_cpp codemirror_mode: clike - codemirror_mime_mode: text/x-csrc + codemirror_mime_type: text/x-csrc language_id: 263 OpenEdge ABL: type: programming @@ -2921,7 +2921,7 @@ OpenRC runscript: tm_scope: source.shell ace_mode: sh codemirror_mode: shell - codemirror_mime_mode: text/x-sh + codemirror_mime_type: text/x-sh language_id: 265 OpenSCAD: type: programming @@ -2963,7 +2963,7 @@ Oz: tm_scope: source.oz ace_mode: text codemirror_mode: oz - codemirror_mime_mode: text/x-oz + codemirror_mime_type: text/x-oz language_id: 270 PAWN: type: programming @@ -2979,7 +2979,7 @@ PHP: tm_scope: text.html.php ace_mode: php codemirror_mode: php - codemirror_mime_mode: application/x-httpd-php + codemirror_mime_type: application/x-httpd-php color: "#4F5D95" extensions: - ".php" @@ -3003,7 +3003,7 @@ PLSQL: type: programming ace_mode: sql codemirror_mode: sql - codemirror_mime_mode: text/x-plsql + codemirror_mime_type: text/x-plsql tm_scope: none color: "#dad8d8" extensions: @@ -3019,7 +3019,7 @@ PLpgSQL: type: programming ace_mode: pgsql codemirror_mode: sql - codemirror_mime_mode: text/x-sql + codemirror_mime_type: text/x-sql tm_scope: source.sql extensions: - ".sql" @@ -3097,14 +3097,14 @@ Pascal: - instantfpc ace_mode: pascal codemirror_mode: pascal - codemirror_mime_mode: text/x-pascal + codemirror_mime_type: text/x-pascal language_id: 281 Perl: type: programming tm_scope: source.perl ace_mode: perl codemirror_mode: perl - codemirror_mime_mode: text/x-perl + codemirror_mime_type: text/x-perl color: "#0298c3" extensions: - ".pl" @@ -3143,7 +3143,7 @@ Perl6: tm_scope: source.perl6fe ace_mode: perl codemirror_mode: perl - codemirror_mime_mode: text/x-perl + codemirror_mime_type: text/x-perl language_id: 283 Pickle: type: data @@ -3184,7 +3184,7 @@ Pod: type: prose ace_mode: perl codemirror_mode: perl - codemirror_mime_mode: text/x-perl + codemirror_mime_type: text/x-perl wrap: true extensions: - ".pod" @@ -3231,7 +3231,7 @@ PowerShell: type: programming ace_mode: powershell codemirror_mode: powershell - codemirror_mime_mode: application/x-powershell + codemirror_mime_type: application/x-powershell aliases: - posh extensions: @@ -3278,7 +3278,7 @@ Protocol Buffer: tm_scope: source.protobuf ace_mode: protobuf codemirror_mode: protobuf - codemirror_mime_mode: text/x-protobuf + codemirror_mime_type: text/x-protobuf language_id: 297 Public Key: type: data @@ -3297,7 +3297,7 @@ Puppet: - Modulefile ace_mode: text codemirror_mode: puppet - codemirror_mime_mode: text/x-puppet + codemirror_mime_type: text/x-puppet tm_scope: source.puppet language_id: 299 Pure Data: @@ -3325,13 +3325,13 @@ PureScript: tm_scope: source.purescript ace_mode: haskell codemirror_mode: haskell - codemirror_mime_mode: text/x-haskell + codemirror_mime_type: text/x-haskell language_id: 302 Python: type: programming ace_mode: python codemirror_mode: python - codemirror_mime_mode: text/x-python + codemirror_mime_type: text/x-python color: "#3572A5" extensions: - ".py" @@ -3407,13 +3407,13 @@ R: - Rscript ace_mode: r codemirror_mode: r - codemirror_mime_mode: text/x-rsrc + codemirror_mime_type: text/x-rsrc language_id: 307 RAML: type: markup ace_mode: yaml codemirror_mode: yaml - codemirror_mime_mode: text/x-yaml + codemirror_mime_type: text/x-yaml tm_scope: source.yaml color: "#77d9fb" extensions: @@ -3460,14 +3460,14 @@ RHTML: - html+ruby ace_mode: rhtml codemirror_mode: htmlembedded - codemirror_mime_mode: application/x-erb + codemirror_mime_type: application/x-erb language_id: 312 RMarkdown: type: prose wrap: true ace_mode: markdown codemirror_mode: gfm - codemirror_mime_mode: text/x-gfm + codemirror_mime_type: text/x-gfm extensions: - ".rmd" tm_scope: source.gfm @@ -3481,7 +3481,7 @@ RPM Spec: - specfile ace_mode: text codemirror_mode: rpm - codemirror_mime_mode: text/x-rpm-spec + codemirror_mime_type: text/x-rpm-spec language_id: 314 RUNOFF: type: markup @@ -3585,7 +3585,7 @@ Rouge: type: programming ace_mode: clojure codemirror_mode: clojure - codemirror_mime_mode: text/x-clojure + codemirror_mime_type: text/x-clojure color: "#cc0088" extensions: - ".rg" @@ -3595,7 +3595,7 @@ Ruby: type: programming ace_mode: ruby codemirror_mode: ruby - codemirror_mime_mode: text/x-ruby + codemirror_mime_type: text/x-ruby color: "#701516" aliases: - jruby @@ -3658,7 +3658,7 @@ Rust: - ".rs.in" ace_mode: rust codemirror_mode: rust - codemirror_mime_mode: text/x-rustsrc + codemirror_mime_type: text/x-rustsrc language_id: 327 SAS: type: programming @@ -3668,7 +3668,7 @@ SAS: tm_scope: source.sas ace_mode: text codemirror_mode: sas - codemirror_mime_mode: text/x-sas + codemirror_mime_type: text/x-sas language_id: 328 SCSS: type: markup @@ -3676,7 +3676,7 @@ SCSS: group: CSS ace_mode: scss codemirror_mode: css - codemirror_mime_mode: text/x-scss + codemirror_mime_type: text/x-scss extensions: - ".scss" color: "#CF649A" @@ -3705,7 +3705,7 @@ SPARQL: tm_scope: source.sparql ace_mode: text codemirror_mode: sparql - codemirror_mime_mode: application/sparql-query + codemirror_mime_type: application/sparql-query extensions: - ".sparql" - ".rq" @@ -3724,7 +3724,7 @@ SQL: tm_scope: source.sql ace_mode: sql codemirror_mode: sql - codemirror_mime_mode: text/x-sql + codemirror_mime_type: text/x-sql extensions: - ".sql" - ".cql" @@ -3739,7 +3739,7 @@ SQLPL: type: programming ace_mode: sql codemirror_mode: sql - codemirror_mime_mode: text/x-sql + codemirror_mime_type: text/x-sql tm_scope: source.sql extensions: - ".sql" @@ -3751,7 +3751,7 @@ SRecode Template: tm_scope: source.lisp ace_mode: lisp codemirror_mode: commonlisp - codemirror_mime_mode: text/x-common-lisp + codemirror_mime_type: text/x-common-lisp extensions: - ".srt" language_id: 335 @@ -3770,7 +3770,7 @@ SVG: tm_scope: text.xml ace_mode: xml codemirror_mode: xml - codemirror_mime_mode: text/xml + codemirror_mime_type: text/xml language_id: 337 Sage: type: programming @@ -3781,7 +3781,7 @@ Sage: tm_scope: source.python ace_mode: python codemirror_mode: python - codemirror_mime_mode: text/x-python + codemirror_mime_type: text/x-python language_id: 338 SaltStack: type: programming @@ -3794,7 +3794,7 @@ SaltStack: tm_scope: source.yaml.salt ace_mode: yaml codemirror_mode: yaml - codemirror_mime_mode: text/x-yaml + codemirror_mime_type: text/x-yaml language_id: 339 Sass: type: markup @@ -3804,14 +3804,14 @@ Sass: - ".sass" ace_mode: sass codemirror_mode: sass - codemirror_mime_mode: text/x-sass + codemirror_mime_type: text/x-sass color: "#CF649A" language_id: 340 Scala: type: programming ace_mode: scala codemirror_mode: clike - codemirror_mime_mode: text/x-scala + codemirror_mime_type: text/x-scala color: "#c22d40" extensions: - ".scala" @@ -3846,7 +3846,7 @@ Scheme: - r6rs ace_mode: scheme codemirror_mode: scheme - codemirror_mime_mode: text/x-scheme + codemirror_mime_type: text/x-scheme language_id: 343 Scilab: type: programming @@ -3899,7 +3899,7 @@ Shell: - zsh ace_mode: sh codemirror_mode: shell - codemirror_mime_mode: text/x-sh + codemirror_mime_type: text/x-sh language_id: 346 ShellSession: type: programming @@ -3911,7 +3911,7 @@ ShellSession: tm_scope: text.shell-session ace_mode: sh codemirror_mode: shell - codemirror_mime_mode: text/x-sh + codemirror_mime_type: text/x-sh language_id: 347 Shen: type: programming @@ -3938,7 +3938,7 @@ Slim: tm_scope: text.slim ace_mode: text codemirror_mode: slim - codemirror_mime_mode: text/x-slim + codemirror_mime_type: text/x-slim language_id: 350 Smali: type: programming @@ -3957,7 +3957,7 @@ Smalltalk: - squeak ace_mode: text codemirror_mode: smalltalk - codemirror_mime_mode: text/x-stsrc + codemirror_mime_type: text/x-stsrc language_id: 352 Smarty: type: programming @@ -3965,7 +3965,7 @@ Smarty: - ".tpl" ace_mode: smarty codemirror_mode: smarty - codemirror_mime_mode: text/x-smarty + codemirror_mime_type: text/x-smarty tm_scope: text.html.smarty language_id: 353 SourcePawn: @@ -3988,7 +3988,7 @@ Squirrel: tm_scope: source.c++ ace_mode: c_cpp codemirror_mode: clike - codemirror_mime_mode: text/x-c++src + codemirror_mime_type: text/x-c++src language_id: 355 Stan: type: programming @@ -4011,7 +4011,7 @@ Standard ML: tm_scope: source.ml ace_mode: text codemirror_mode: mllike - codemirror_mime_mode: text/x-ocaml + codemirror_mime_type: text/x-ocaml language_id: 357 Stata: type: programming @@ -4059,7 +4059,7 @@ Swift: - ".swift" ace_mode: text codemirror_mode: swift - codemirror_mime_mode: text/x-swift + codemirror_mime_type: text/x-swift language_id: 362 SystemVerilog: type: programming @@ -4070,7 +4070,7 @@ SystemVerilog: - ".vh" ace_mode: verilog codemirror_mode: verilog - codemirror_mime_mode: text/x-systemverilog + codemirror_mime_type: text/x-systemverilog language_id: 363 TLA: type: programming @@ -4086,7 +4086,7 @@ TOML: tm_scope: source.toml ace_mode: toml codemirror_mode: toml - codemirror_mime_mode: text/x-toml + codemirror_mime_type: text/x-toml language_id: 365 TXL: type: programming @@ -4107,7 +4107,7 @@ Tcl: - wish ace_mode: tcl codemirror_mode: tcl - codemirror_mime_mode: text/x-tcl + codemirror_mime_type: text/x-tcl language_id: 367 Tcsh: type: programming @@ -4118,14 +4118,14 @@ Tcsh: tm_scope: source.shell ace_mode: sh codemirror_mode: shell - codemirror_mime_mode: text/x-sh + codemirror_mime_type: text/x-sh language_id: 368 TeX: type: markup color: "#3D6117" ace_mode: tex codemirror_mode: stex - codemirror_mime_mode: text/x-stex + codemirror_mime_type: text/x-stex wrap: true aliases: - latex @@ -4160,7 +4160,7 @@ Terra: color: "#00004c" ace_mode: lua codemirror_mode: lua - codemirror_mime_mode: text/x-lua + codemirror_mime_type: text/x-lua interpreters: - lua language_id: 371 @@ -4194,7 +4194,7 @@ Textile: type: prose ace_mode: textile codemirror_mode: textile - codemirror_mime_mode: text/x-textile + codemirror_mime_type: text/x-textile wrap: true extensions: - ".textile" @@ -4223,7 +4223,7 @@ Turtle: tm_scope: source.turtle ace_mode: text codemirror_mode: turtle - codemirror_mime_mode: text/turtle + codemirror_mime_type: text/turtle language_id: 376 Twig: type: markup @@ -4233,7 +4233,7 @@ Twig: tm_scope: text.html.twig ace_mode: twig codemirror_mode: twig - codemirror_mime_mode: text/x-twig + codemirror_mime_type: text/x-twig language_id: 377 TypeScript: type: programming @@ -4246,14 +4246,14 @@ TypeScript: tm_scope: source.ts ace_mode: typescript codemirror_mode: javascript - codemirror_mime_mode: application/typescript + codemirror_mime_type: application/typescript language_id: 378 Unified Parallel C: type: programming group: C ace_mode: c_cpp codemirror_mode: clike - codemirror_mime_mode: text/x-csrc + codemirror_mime_type: text/x-csrc color: "#4e3617" extensions: - ".upc" @@ -4263,7 +4263,7 @@ Unity3D Asset: type: data ace_mode: yaml codemirror_mode: yaml - codemirror_mime_mode: text/x-yaml + codemirror_mime_type: text/x-yaml extensions: - ".anim" - ".asset" @@ -4279,7 +4279,7 @@ Uno: - ".uno" ace_mode: csharp codemirror_mode: clike - codemirror_mime_mode: text/x-csharp + codemirror_mime_type: text/x-csharp tm_scope: source.cs language_id: 381 UnrealScript: @@ -4290,7 +4290,7 @@ UnrealScript: tm_scope: source.java ace_mode: java codemirror_mode: clike - codemirror_mime_mode: text/x-java + codemirror_mime_type: text/x-java language_id: 382 UrWeb: type: programming @@ -4325,7 +4325,7 @@ VHDL: - ".vhw" ace_mode: vhdl codemirror_mode: vhdl - codemirror_mime_mode: text/x-vhdl + codemirror_mime_type: text/x-vhdl language_id: 385 Vala: type: programming @@ -4343,7 +4343,7 @@ Verilog: - ".veo" ace_mode: verilog codemirror_mode: verilog - codemirror_mime_mode: text/x-verilog + codemirror_mime_type: text/x-verilog language_id: 387 VimL: type: programming @@ -4382,7 +4382,7 @@ Visual Basic: - vbnet ace_mode: text codemirror_mode: vb - codemirror_mime_mode: text/x-vb + codemirror_mime_type: text/x-vb language_id: 389 Volt: type: programming @@ -4392,7 +4392,7 @@ Volt: tm_scope: source.d ace_mode: d codemirror_mode: d - codemirror_mime_mode: text/x-d + codemirror_mime_type: text/x-d language_id: 390 Vue: type: markup @@ -4431,7 +4431,7 @@ WebIDL: tm_scope: source.webidl ace_mode: text codemirror_mode: webidl - codemirror_mime_mode: text/x-webidl + codemirror_mime_type: text/x-webidl language_id: 395 World of Warcraft Addon Data: type: data @@ -4458,13 +4458,13 @@ XC: tm_scope: source.xc ace_mode: c_cpp codemirror_mode: clike - codemirror_mime_mode: text/x-csrc + codemirror_mime_type: text/x-csrc language_id: 398 XML: type: data ace_mode: xml codemirror_mode: xml - codemirror_mime_mode: text/xml + codemirror_mime_type: text/xml aliases: - rss - xsd @@ -4574,7 +4574,7 @@ XPages: tm_scope: none ace_mode: xml codemirror_mode: xml - codemirror_mime_mode: text/xml + codemirror_mime_type: text/xml language_id: 400 XProc: type: programming @@ -4584,7 +4584,7 @@ XProc: tm_scope: text.xml ace_mode: xml codemirror_mode: xml - codemirror_mime_mode: text/xml + codemirror_mime_type: text/xml language_id: 401 XQuery: type: programming @@ -4597,7 +4597,7 @@ XQuery: - ".xqy" ace_mode: xquery codemirror_mode: xquery - codemirror_mime_mode: application/xquery + codemirror_mime_type: application/xquery tm_scope: source.xq language_id: 402 XS: @@ -4607,7 +4607,7 @@ XS: tm_scope: source.c ace_mode: c_cpp codemirror_mode: clike - codemirror_mime_mode: text/x-csrc + codemirror_mime_type: text/x-csrc language_id: 403 XSLT: type: programming @@ -4619,7 +4619,7 @@ XSLT: tm_scope: text.xml.xsl ace_mode: xml codemirror_mode: xml - codemirror_mime_mode: text/xml + codemirror_mime_type: text/xml color: "#EB8CEB" language_id: 404 Xojo: @@ -4657,7 +4657,7 @@ YAML: - ".clang-format" ace_mode: yaml codemirror_mode: yaml - codemirror_mime_mode: text/x-yaml + codemirror_mime_type: text/x-yaml language_id: 407 YANG: type: data @@ -4715,7 +4715,7 @@ edn: type: data ace_mode: clojure codemirror_mode: clojure - codemirror_mime_mode: text/x-clojure + codemirror_mime_type: text/x-clojure extensions: - ".edn" tm_scope: source.clojure @@ -4764,13 +4764,13 @@ reStructuredText: - ".rst.txt" ace_mode: text codemirror_mode: rst - codemirror_mime_mode: text/x-rst + codemirror_mime_type: text/x-rst language_id: 419 wisp: type: programming ace_mode: clojure codemirror_mode: clojure - codemirror_mime_mode: text/x-clojure + codemirror_mime_type: text/x-clojure color: "#7582D1" extensions: - ".wisp" diff --git a/test/test_grammars.rb b/test/test_grammars.rb index 3b03ca818c..1b878847d9 100644 --- a/test/test_grammars.rb +++ b/test/test_grammars.rb @@ -126,7 +126,7 @@ def test_submodules_use_https_links private def submodule_paths - @submodule_paths ||= `git config --list --file "#{File.join(ROOT, ".gitmodules")}"`.lines.grep(/\.path=/).map { |line| line.chomp.split("=", 2).last } + @submodule_paths ||= `git config --list --file "#{File.join(ROOT, ".gitmodules")}"`.lines.grep(/\.path=/).map { |line| line.chomp.split("=", 2).last }.reject { |path| path =~ /CodeMirror/ } end # Returns a hash of submodules in the form of submodule_path => license diff --git a/test/test_language.rb b/test/test_language.rb index 48391e598c..1f6d19d258 100644 --- a/test/test_language.rb +++ b/test/test_language.rb @@ -358,11 +358,11 @@ def test_codemirror_mode assert_equal 'clike', Language['C++'].codemirror_mode end - def test_codemirror_mime_mode - assert_equal 'text/x-ruby', Language['Ruby'].codemirror_mime_mode - assert_equal 'text/javascript', Language['JavaScript'].codemirror_mime_mode - assert_equal 'text/x-csrc', Language['C'].codemirror_mime_mode - assert_equal 'text/x-c++src', Language['C++'].codemirror_mime_mode + def test_codemirror_mime_type + assert_equal 'text/x-ruby', Language['Ruby'].codemirror_mime_type + assert_equal 'text/javascript', Language['JavaScript'].codemirror_mime_type + assert_equal 'text/x-csrc', Language['C'].codemirror_mime_type + assert_equal 'text/x-c++src', Language['C++'].codemirror_mime_type end def test_wrap @@ -454,9 +454,9 @@ def test_all_languages_have_a_valid_ace_mode def test_codemirror_modes_present Language.all.each do |language| - if language.codemirror_mode || language.codemirror_mime_mode + if language.codemirror_mode || language.codemirror_mime_type assert language.codemirror_mode, "#{language.inspect} missing CodeMirror mode" - assert language.codemirror_mime_mode, "#{language.inspect} missing CodeMirror MIME mode" + assert language.codemirror_mime_type, "#{language.inspect} missing CodeMirror MIME mode" end end end @@ -472,17 +472,17 @@ def test_valid_codemirror_mode def test_codemirror_mode_and_mime_defined_by_meta_mapping meta = File.read(File.expand_path("../../vendor/CodeMirror/mode/meta.js", __FILE__)) Language.all.each do |language| - next unless language.codemirror_mode && language.codemirror_mime_mode - assert meta.match(/^.+#{Regexp.escape(language.codemirror_mime_mode)}.+#{Regexp.escape(language.codemirror_mode)}.+$/), "#{language.inspect}: #{language.codemirror_mime_mode} not defined under #{language.codemirror_mode}" + next unless language.codemirror_mode && language.codemirror_mime_type + assert meta.match(/^.+#{Regexp.escape(language.codemirror_mime_type)}.+#{Regexp.escape(language.codemirror_mode)}.+$/), "#{language.inspect}: #{language.codemirror_mime_type} not defined under #{language.codemirror_mode}" end end def test_codemirror_mime_declared_in_mode_file Language.all.each do |language| - next unless language.codemirror_mode && language.codemirror_mime_mode + next unless language.codemirror_mode && language.codemirror_mime_type filename = File.expand_path("../../vendor/CodeMirror/mode/#{language.codemirror_mode}/#{language.codemirror_mode}.js", __FILE__) assert File.exist?(filename), "#{filename} does not exist" - assert File.read(filename).match(language.codemirror_mime_mode), "#{language.inspect}: #{language.codemirror_mime_mode} not defined in #{filename}" + assert File.read(filename).match(language.codemirror_mime_type), "#{language.inspect}: #{language.codemirror_mime_type} not defined in #{filename}" end end From e424e8e88cf41424351be0377cee5b55b0e0152f Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Fri, 23 Sep 2016 16:41:16 -0700 Subject: [PATCH 0103/1214] Linguist 4.8.15 --- lib/linguist/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/version.rb b/lib/linguist/version.rb index 920b08ea63..8218aafef5 100644 --- a/lib/linguist/version.rb +++ b/lib/linguist/version.rb @@ -1,3 +1,3 @@ module Linguist - VERSION = "4.8.14" + VERSION = "4.8.15" end From bed8add2f538d29be58d2ead0ce0581b4b1a5ef2 Mon Sep 17 00:00:00 2001 From: Cyril Ferlicot Date: Sat, 24 Sep 2016 17:32:35 +0200 Subject: [PATCH 0104/1214] Add smalltalk samples (Issue: https://github.com/github/linguist/issues/3244) --- samples/Smalltalk/baselineDependency.st | 8 ++++++++ samples/Smalltalk/categories.st | 8 ++++++++ samples/Smalltalk/renderSeasideExampleOn..st | 9 +++++++++ samples/Smalltalk/scriptWithPragma.st | 11 +++++++++++ samples/Smalltalk/smallMethod.st | 3 +++ 5 files changed, 39 insertions(+) create mode 100644 samples/Smalltalk/baselineDependency.st create mode 100644 samples/Smalltalk/categories.st create mode 100644 samples/Smalltalk/renderSeasideExampleOn..st create mode 100644 samples/Smalltalk/scriptWithPragma.st create mode 100644 samples/Smalltalk/smallMethod.st diff --git a/samples/Smalltalk/baselineDependency.st b/samples/Smalltalk/baselineDependency.st new file mode 100644 index 0000000000..0830bb81d5 --- /dev/null +++ b/samples/Smalltalk/baselineDependency.st @@ -0,0 +1,8 @@ +dependencies +neoJSON: spec + spec + configuration: 'NeoJSON' + with: [ spec + className: 'ConfigurationOfNeoJSON'; + version: #stable; + repository: 'http://smalltalkhub.com/mc/SvenVanCaekenberghe/Neo/main' ] \ No newline at end of file diff --git a/samples/Smalltalk/categories.st b/samples/Smalltalk/categories.st new file mode 100644 index 0000000000..680c6662b0 --- /dev/null +++ b/samples/Smalltalk/categories.st @@ -0,0 +1,8 @@ +SystemOrganization addCategory: #ChartJs! +SystemOrganization addCategory: 'ChartJs-Component'! +SystemOrganization addCategory: 'ChartJs-Demo'! +SystemOrganization addCategory: 'ChartJs-Exception'! +SystemOrganization addCategory: 'ChartJs-Library'! +SystemOrganization addCategory: 'ChartJs-Model'! +SystemOrganization addCategory: 'ChartJs-Style'! +SystemOrganization addCategory: 'ChartJs-Types'! diff --git a/samples/Smalltalk/renderSeasideExampleOn..st b/samples/Smalltalk/renderSeasideExampleOn..st new file mode 100644 index 0000000000..a5427572cc --- /dev/null +++ b/samples/Smalltalk/renderSeasideExampleOn..st @@ -0,0 +1,9 @@ +rendering +renderTitleId: divId on: html + ^ html div + id: #title , divId; + class: #aClass; + with: [ + html heading + level3; + with: self data title ] \ No newline at end of file diff --git a/samples/Smalltalk/scriptWithPragma.st b/samples/Smalltalk/scriptWithPragma.st new file mode 100644 index 0000000000..3f9dec816d --- /dev/null +++ b/samples/Smalltalk/scriptWithPragma.st @@ -0,0 +1,11 @@ +helpers +installGitFileTree + "GitFileTree is the tool we will use to commit on GitHub." + + + + + + + + +
+ + You signed in with another tab or window. Reload to refresh your session. + You signed out in another tab or window. Reload to refresh your session. +
+ + + + + diff --git a/samples/Coq/JsPrettyInterm.v b/samples/Coq/JsPrettyInterm.v new file mode 100644 index 0000000000..71d359699c --- /dev/null +++ b/samples/Coq/JsPrettyInterm.v @@ -0,0 +1,1766 @@ +Set Implicit Arguments. +Require Export JsSyntax JsSyntaxAux JsPreliminary. + +(**************************************************************) +(** ** Implicit Types -- copied from JsPreliminary *) + +Implicit Type b : bool. +Implicit Type n : number. +Implicit Type k : int. +Implicit Type s : string. +Implicit Type i : literal. +Implicit Type l : object_loc. +Implicit Type w : prim. +Implicit Type v : value. +Implicit Type r : ref. +(*Implicit Type B : builtin.*) +Implicit Type ty : type. + +Implicit Type rt : restype. +Implicit Type rv : resvalue. +Implicit Type lab : label. +Implicit Type labs : label_set. +Implicit Type R : res. +Implicit Type o : out. + +Implicit Type x : prop_name. +Implicit Type str : strictness_flag. +Implicit Type m : mutability. +Implicit Type Ad : attributes_data. +Implicit Type Aa : attributes_accessor. +Implicit Type A : attributes. +Implicit Type Desc : descriptor. +Implicit Type D : full_descriptor. + +Implicit Type L : env_loc. +Implicit Type E : env_record. +Implicit Type Ed : decl_env_record. +Implicit Type X : lexical_env. +Implicit Type O : object. +Implicit Type S : state. +Implicit Type C : execution_ctx. +Implicit Type P : object_properties_type. + +Implicit Type e : expr. +Implicit Type p : prog. +Implicit Type t : stat. + + +(****************************************************************) +(** ** Intermediate expression for the Pretty-Big-Step semantic *) + +(** Grammar of extended expressions *) + +Inductive ext_expr := + + (** Extended expressions include expressions *) + + | expr_basic : expr -> ext_expr + + (** Extended expressions associated with primitive expressions *) + + | expr_identifier_1 : specret ref -> ext_expr + + | expr_object_0 : out -> propdefs -> ext_expr + | expr_object_1 : object_loc -> propdefs -> ext_expr + | expr_object_2 : object_loc -> string -> propbody -> propdefs -> ext_expr + | expr_object_3_val : object_loc -> string -> specret value -> propdefs -> ext_expr + | expr_object_3_get : object_loc -> string -> out -> propdefs -> ext_expr + | expr_object_3_set : object_loc -> string -> out -> propdefs -> ext_expr + | expr_object_4 : object_loc -> string -> descriptor -> propdefs -> ext_expr + | expr_object_5 : object_loc -> propdefs -> out -> ext_expr + + + + + + (* _ARRAYS_ : support for array intermediate forms *) + | expr_array_0 : out -> list (option expr) -> ext_expr + | expr_array_1 : object_loc -> list (option expr) -> ext_expr + | expr_array_2 : object_loc -> list (option expr) -> int -> ext_expr + | expr_array_3 : object_loc -> list (option expr) -> int -> ext_expr + | expr_array_3_1 : object_loc -> specret value -> list (option expr) -> int -> ext_expr + | expr_array_3_2 : object_loc -> value -> out -> list (option expr) -> int -> ext_expr + | expr_array_3_3 : object_loc -> value -> specret int -> list (option expr) -> int -> ext_expr + | expr_array_3_4 : object_loc -> value -> out -> list (option expr) -> ext_expr + | expr_array_3_5 : object_loc -> out -> list (option expr) -> ext_expr + + | expr_array_add_length : object_loc -> int -> out -> ext_expr + | expr_array_add_length_0 : object_loc -> int -> ext_expr + | expr_array_add_length_1 : object_loc -> int -> out -> ext_expr + | expr_array_add_length_2 : object_loc -> specret int -> int -> ext_expr + | expr_array_add_length_3 : object_loc -> specret int -> ext_expr + | expr_array_add_length_4 : object_loc -> out -> ext_expr + + + + + + | expr_function_1 : string -> list string -> funcbody -> env_loc -> lexical_env -> out -> ext_expr + | expr_function_2 : string -> env_loc -> out -> ext_expr + | expr_function_3 : object_loc -> out -> ext_expr + + | expr_access_1 : specret value -> expr -> ext_expr (* The left expression has been executed *) + | expr_access_2 : value -> specret value -> ext_expr (* The right expression is executed. *) + | expr_access_3 : value -> out -> value -> ext_expr + | expr_access_4 : value -> out -> ext_expr + + | expr_new_1 : specret value -> list expr -> ext_expr (* The arguments too. *) + | expr_new_2 : value -> specret (list value) -> ext_expr (* The call has been executed. *) + + | expr_call_1 : out -> bool -> list expr -> ext_expr + | expr_call_2 : res -> bool -> list expr -> specret value -> ext_expr (* The function has been evaluated. *) + | expr_call_3 : res -> value -> bool -> specret (list value) -> ext_expr (* The arguments have been executed. *) + | expr_call_4 : res -> object_loc -> bool -> list value -> ext_expr + | expr_call_5 : object_loc -> bool -> list value -> out -> ext_expr (* The call has been executed. *) + + | spec_eval : bool -> value -> list value -> ext_expr + + | expr_unary_op_1 : unary_op -> (specret value) -> ext_expr (* The argument have been executed. *) + | expr_unary_op_2 : unary_op -> value -> ext_expr (* The argument is a value. *) + | expr_delete_1 : out -> ext_expr + | expr_delete_2 : ref -> ext_expr + | expr_delete_3 : ref -> out -> ext_expr + | expr_delete_4 : ref -> env_loc -> ext_expr + | expr_typeof_1 : out -> ext_expr + | expr_typeof_2 : specret value -> ext_expr + | expr_prepost_1 : unary_op -> out -> ext_expr + | expr_prepost_2 : unary_op -> res -> specret value -> ext_expr + | expr_prepost_3 : unary_op -> res -> out -> ext_expr + | expr_prepost_4 : value -> out -> ext_expr + | expr_unary_op_neg_1 : out -> ext_expr + | expr_unary_op_bitwise_not_1 : specret int -> ext_expr + | expr_unary_op_not_1 : out -> ext_expr + | expr_conditional_1 : specret value -> expr -> expr -> ext_expr + | expr_conditional_1': out -> expr -> expr -> ext_expr + | expr_conditional_2 : specret value -> ext_expr + + | expr_binary_op_1 : binary_op -> (specret value) -> expr -> ext_expr + | expr_binary_op_2 : binary_op -> value -> (specret value) -> ext_expr + | expr_binary_op_3 : binary_op -> value -> value -> ext_expr + | expr_binary_op_add_1 : specret (value*value) -> ext_expr + | expr_binary_op_add_string_1 : specret (value*value) -> ext_expr + | expr_puremath_op_1 : (number -> number -> number) -> specret (value*value) -> ext_expr + | expr_shift_op_1 : (int -> int -> int) -> specret int -> value -> ext_expr + | expr_shift_op_2 : (int -> int -> int) -> int -> specret int -> ext_expr + | expr_inequality_op_1 : bool -> bool -> value -> value -> ext_expr + | expr_inequality_op_2 : bool -> bool -> specret (value*value) -> ext_expr + | expr_binary_op_in_1 : object_loc -> out -> ext_expr + | expr_binary_op_disequal_1 : out -> ext_expr + | spec_equal : value -> value -> ext_expr + | spec_equal_1 : type -> type -> value -> value -> ext_expr + | spec_equal_2 : bool -> ext_expr + | spec_equal_3 : value -> (value -> ext_expr) -> value -> ext_expr + | spec_equal_4 : value -> out -> ext_expr + | expr_bitwise_op_1 : (int -> int -> int) -> specret int -> value -> ext_expr + | expr_bitwise_op_2 : (int -> int -> int) -> int -> specret int -> ext_expr + | expr_lazy_op_1 : bool -> (specret value) -> expr -> ext_expr + | expr_lazy_op_2 : bool -> value -> out -> expr -> ext_expr + | expr_lazy_op_2_1 : (specret value) -> ext_expr + + | expr_assign_1 : out -> option binary_op -> expr -> ext_expr + | expr_assign_2 : res -> (specret value) -> binary_op -> expr -> ext_expr + | expr_assign_3 : res -> value -> binary_op -> (specret value) -> ext_expr + | expr_assign_3' : res -> out -> ext_expr + | expr_assign_4 : res -> (specret value) -> ext_expr + | expr_assign_5 : value -> out -> ext_expr + + (** Extended expressions for conversions *) + + | spec_to_primitive : value -> option preftype -> ext_expr + | spec_to_boolean : value -> ext_expr + | spec_to_number : value -> ext_expr + | spec_to_number_1 : out -> ext_expr + | spec_to_integer : value -> ext_expr + | spec_to_integer_1 : out -> ext_expr + | spec_to_string : value -> ext_expr + | spec_to_string_1 : out -> ext_expr + | spec_to_object : value -> ext_expr + | spec_check_object_coercible : value -> ext_expr + + (** Extended expressions for comparison *) + + | spec_eq : value -> value -> ext_expr + | spec_eq0 : value -> value -> ext_expr + | spec_eq1 : value -> value -> ext_expr + | spec_eq2 : ext_expr -> value -> value -> ext_expr + + (** Extended expressions for operations on objects *) + + | spec_object_get : object_loc -> prop_name -> ext_expr + | spec_object_get_1 : builtin_get -> value -> object_loc -> prop_name -> ext_expr + | spec_object_get_2 : value -> specret full_descriptor -> ext_expr + | spec_object_get_3 : value -> value -> ext_expr + + | spec_object_can_put : object_loc -> prop_name -> ext_expr + | spec_object_can_put_1 : builtin_can_put -> object_loc -> prop_name -> ext_expr + | spec_object_can_put_2 : object_loc -> prop_name -> (specret full_descriptor) -> ext_expr + + (* LATER: shift names since spec_object_can_put_3 is not used *) + | spec_object_can_put_4 : object_loc -> prop_name -> value -> ext_expr + | spec_object_can_put_5 : object_loc -> specret full_descriptor -> ext_expr + | spec_object_can_put_6 : attributes_data -> bool -> ext_expr + + | spec_object_put : object_loc -> prop_name -> value -> bool -> ext_expr + | spec_object_put_1 : builtin_put -> value -> object_loc -> prop_name -> value -> bool -> ext_expr + | spec_object_put_2 : value -> object_loc -> prop_name -> value -> bool -> out -> ext_expr + | spec_object_put_3 : value -> object_loc -> prop_name -> value -> bool -> specret full_descriptor -> ext_expr + | spec_object_put_4 : value -> object_loc -> prop_name -> value -> bool -> specret full_descriptor -> ext_expr + | spec_object_put_5 : out -> ext_expr + + | spec_object_has_prop : object_loc -> prop_name -> ext_expr + | spec_object_has_prop_1 : builtin_has_prop -> object_loc -> prop_name -> ext_expr + | spec_object_has_prop_2 : specret full_descriptor -> ext_expr + + | spec_object_delete : object_loc -> prop_name -> bool -> ext_expr + | spec_object_delete_1 : builtin_delete -> object_loc -> prop_name -> bool -> ext_expr + | spec_object_delete_2 : object_loc -> prop_name -> bool -> (specret full_descriptor) -> ext_expr + | spec_object_delete_3 : object_loc -> prop_name -> bool -> bool -> ext_expr + + | spec_object_default_value : object_loc -> option preftype -> ext_expr + | spec_object_default_value_1 : builtin_default_value -> object_loc -> option preftype -> ext_expr + | spec_object_default_value_2 : object_loc -> preftype -> preftype -> ext_expr + | spec_object_default_value_3 : object_loc -> preftype -> ext_expr + | spec_object_default_value_4 : ext_expr + | spec_object_default_value_sub_1 : object_loc -> string -> ext_expr -> ext_expr + | spec_object_default_value_sub_2 : object_loc -> out -> ext_expr -> ext_expr + | spec_object_default_value_sub_3 : out -> ext_expr -> ext_expr + + | spec_object_define_own_prop : object_loc -> prop_name -> descriptor -> bool -> ext_expr + | spec_object_define_own_prop_1 : builtin_define_own_prop -> object_loc -> prop_name -> descriptor -> bool -> ext_expr + | spec_object_define_own_prop_2 : object_loc -> prop_name -> descriptor -> bool -> (specret full_descriptor) -> ext_expr + | spec_object_define_own_prop_3 : object_loc -> prop_name -> descriptor -> bool -> full_descriptor -> bool -> ext_expr + | spec_object_define_own_prop_4 : object_loc -> prop_name -> attributes -> descriptor -> bool -> ext_expr + | spec_object_define_own_prop_5 : object_loc -> prop_name -> attributes -> descriptor -> bool -> ext_expr + | spec_object_define_own_prop_6a : object_loc -> prop_name -> attributes -> descriptor -> bool -> ext_expr + | spec_object_define_own_prop_6b : object_loc -> prop_name -> attributes -> descriptor -> bool -> ext_expr + | spec_object_define_own_prop_6c : object_loc -> prop_name -> attributes -> descriptor -> bool -> ext_expr + | spec_object_define_own_prop_reject : bool -> ext_expr + | spec_object_define_own_prop_write : object_loc -> prop_name -> attributes -> descriptor -> bool -> ext_expr + + | spec_prim_value_get : value -> prop_name -> ext_expr + | spec_prim_value_get_1 : value -> prop_name -> out -> ext_expr + | spec_prim_value_put : value -> prop_name -> value -> bool -> ext_expr + | spec_prim_value_put_1 : prim -> prop_name -> value -> bool -> out -> ext_expr + + (* ARRAYS *) + | spec_object_define_own_prop_array_2 : object_loc -> prop_name -> descriptor -> bool -> (specret full_descriptor) -> ext_expr + | spec_object_define_own_prop_array_2_1 : object_loc -> prop_name -> descriptor -> bool -> descriptor -> value -> ext_expr + | spec_object_define_own_prop_array_branch_3_4 : object_loc -> prop_name -> descriptor -> bool -> descriptor -> (specret int) -> ext_expr + | spec_object_define_own_prop_array_branch_4_5 : object_loc -> prop_name -> descriptor -> bool -> descriptor -> int -> ext_expr + | spec_object_define_own_prop_array_branch_4_5_a : object_loc -> prop_name -> (specret int) -> descriptor -> bool -> descriptor -> int -> ext_expr + | spec_object_define_own_prop_array_branch_4_5_b : object_loc -> prop_name -> int -> out -> descriptor -> bool -> descriptor -> int -> ext_expr + | spec_object_define_own_prop_array_4a : object_loc -> prop_name -> descriptor -> bool -> descriptor -> int -> ext_expr + | spec_object_define_own_prop_array_4b : object_loc -> prop_name -> (specret int) -> descriptor -> bool -> descriptor -> int -> ext_expr + | spec_object_define_own_prop_array_4c : object_loc -> int -> descriptor -> bool -> int -> descriptor -> out -> ext_expr + | spec_object_define_own_prop_array_5 : object_loc -> prop_name -> descriptor -> bool -> ext_expr + | spec_object_define_own_prop_array_3 : object_loc -> descriptor -> bool -> descriptor -> int -> ext_expr + | spec_object_define_own_prop_array_3c : object_loc -> value -> (specret int) -> descriptor -> bool -> descriptor -> int -> ext_expr + | spec_object_define_own_prop_array_3d_e : object_loc -> out -> int -> descriptor -> bool -> descriptor -> int -> ext_expr + | spec_object_define_own_prop_array_3f_g : object_loc -> int -> int -> descriptor -> bool -> descriptor -> ext_expr + | spec_object_define_own_prop_array_3h_i : object_loc -> int -> int -> descriptor -> bool -> descriptor -> ext_expr + | spec_object_define_own_prop_array_3j : object_loc -> int -> int -> descriptor -> bool -> bool -> descriptor -> ext_expr + | spec_object_define_own_prop_array_3k_l : object_loc -> out -> int -> int -> descriptor -> bool -> bool -> descriptor -> ext_expr + | spec_object_define_own_prop_array_3l : object_loc -> int -> int -> descriptor -> bool -> bool -> ext_expr + | spec_object_define_own_prop_array_3l_ii : object_loc -> int -> int -> descriptor -> bool -> bool -> ext_expr + | spec_object_define_own_prop_array_3l_ii_1 : object_loc -> int -> int -> descriptor -> bool -> bool -> out -> ext_expr + | spec_object_define_own_prop_array_3l_ii_2 : object_loc -> int -> int -> descriptor -> bool -> bool -> out -> ext_expr + | spec_object_define_own_prop_array_3l_iii_1 : object_loc -> int -> descriptor -> bool -> bool -> ext_expr + | spec_object_define_own_prop_array_3l_iii_2 : object_loc -> descriptor -> bool -> bool -> ext_expr + | spec_object_define_own_prop_array_3l_iii_3 : object_loc -> descriptor -> bool -> ext_expr + | spec_object_define_own_prop_array_3l_iii_4 : object_loc -> bool -> out -> ext_expr + | spec_object_define_own_prop_array_3m_n : object_loc -> bool -> ext_expr + + (** Extended expressions for operations on references *) + | spec_put_value : resvalue -> value -> ext_expr + + (** Extended expressions for operations on environment records *) + + | spec_env_record_has_binding : env_loc -> prop_name -> ext_expr + | spec_env_record_has_binding_1 : env_loc -> prop_name -> env_record -> ext_expr + | spec_env_record_get_binding_value : env_loc -> prop_name -> bool -> ext_expr + | spec_env_record_get_binding_value_1 : env_loc -> prop_name -> bool -> env_record -> ext_expr + | spec_env_record_get_binding_value_2 : prop_name -> bool -> object_loc -> out -> ext_expr + + | spec_env_record_create_immutable_binding : env_loc -> prop_name -> ext_expr + | spec_env_record_initialize_immutable_binding : env_loc -> prop_name -> value -> ext_expr + | spec_env_record_create_mutable_binding : env_loc -> prop_name -> option bool -> ext_expr + | spec_env_record_create_mutable_binding_1 : env_loc -> prop_name -> bool -> env_record -> ext_expr + | spec_env_record_create_mutable_binding_2 : env_loc -> prop_name -> bool -> object_loc -> out -> ext_expr + | spec_env_record_create_mutable_binding_3 : out -> ext_expr + | spec_env_record_set_mutable_binding : env_loc -> prop_name -> value -> bool -> ext_expr + | spec_env_record_set_mutable_binding_1 : env_loc -> prop_name -> value -> bool -> env_record -> ext_expr + | spec_env_record_delete_binding : env_loc -> prop_name -> ext_expr + | spec_env_record_delete_binding_1 : env_loc -> prop_name -> env_record -> ext_expr + + | spec_env_record_create_set_mutable_binding : env_loc -> prop_name -> option bool -> value -> bool -> ext_expr + | spec_env_record_create_set_mutable_binding_1 : out -> env_loc -> prop_name -> value -> bool -> ext_expr + + | spec_env_record_implicit_this_value : env_loc -> ext_expr + | spec_env_record_implicit_this_value_1 : env_loc -> env_record -> ext_expr + + + (** Extended expressions for operations on property descriptors (8.10) *) + + | spec_from_descriptor : (specret full_descriptor) -> ext_expr + | spec_from_descriptor_1 : attributes -> out -> ext_expr + | spec_from_descriptor_2 : object_loc -> attributes_data -> out -> ext_expr + | spec_from_descriptor_3 : object_loc -> attributes_accessor -> out -> ext_expr + | spec_from_descriptor_4 : object_loc -> attributes -> out -> ext_expr + | spec_from_descriptor_5 : object_loc -> attributes -> out -> ext_expr + | spec_from_descriptor_6 : object_loc -> out -> ext_expr + + + + (** Extented expressions for eval *) + + | spec_entering_eval_code : bool -> funcbody -> ext_expr -> ext_expr + | spec_entering_eval_code_1 : funcbody -> ext_expr -> bool -> ext_expr + | spec_entering_eval_code_2 : out -> ext_expr -> ext_expr + + | spec_call_global_eval : bool -> list value -> ext_expr + | spec_call_global_eval_1 : bool -> value -> ext_expr + | spec_call_global_eval_2 : prog -> ext_expr + | spec_call_global_eval_3 : out -> ext_expr + + (** Extended expressions for function calls *) + + | spec_entering_func_code : object_loc -> value -> list value -> ext_expr -> ext_expr + | spec_entering_func_code_1 : object_loc -> list value -> funcbody -> value -> strictness_flag -> ext_expr -> ext_expr + | spec_entering_func_code_2 : object_loc -> list value -> funcbody -> out -> ext_expr -> ext_expr + | spec_entering_func_code_3 : object_loc -> list value -> strictness_flag -> funcbody -> value -> ext_expr -> ext_expr + | spec_entering_func_code_4 : out -> ext_expr -> ext_expr + + | spec_binding_inst_formal_params : list value -> env_loc -> list string -> strictness_flag -> ext_expr + | spec_binding_inst_formal_params_1 : list value -> env_loc -> string -> list string -> strictness_flag -> value -> out -> ext_expr + | spec_binding_inst_formal_params_2 : list value -> env_loc -> string -> list string -> strictness_flag -> value -> out -> ext_expr + | spec_binding_inst_formal_params_3 : list value -> env_loc -> string -> list string -> strictness_flag -> value -> ext_expr + | spec_binding_inst_formal_params_4 : list value -> env_loc -> list string -> strictness_flag -> out -> ext_expr + | spec_binding_inst_function_decls : list value -> env_loc -> list funcdecl -> strictness_flag -> bool -> ext_expr + | spec_binding_inst_function_decls_1 : list value -> env_loc -> funcdecl -> list funcdecl -> strictness_flag -> bool -> out -> ext_expr + | spec_binding_inst_function_decls_2 : list value -> env_loc -> funcdecl -> list funcdecl -> strictness_flag -> object_loc -> bool -> out -> ext_expr + | spec_binding_inst_function_decls_3 : list value -> funcdecl -> list funcdecl -> strictness_flag -> object_loc -> bool -> specret full_descriptor -> ext_expr + | spec_binding_inst_function_decls_3a : list value -> funcdecl -> list funcdecl -> strictness_flag -> object_loc -> bool -> full_descriptor -> ext_expr + | spec_binding_inst_function_decls_4 : list value -> env_loc -> funcdecl -> list funcdecl -> strictness_flag -> object_loc -> bool -> out -> ext_expr + | spec_binding_inst_function_decls_5 : list value -> env_loc -> funcdecl -> list funcdecl -> strictness_flag -> object_loc -> bool -> ext_expr + | spec_binding_inst_function_decls_6 : list value -> env_loc -> list funcdecl -> strictness_flag -> bool -> out -> ext_expr + | spec_binding_inst_arg_obj : object_loc -> prog -> list string -> list value -> env_loc -> ext_expr + | spec_binding_inst_arg_obj_1 : prog -> env_loc -> strictness_flag -> out -> ext_expr + | spec_binding_inst_arg_obj_2 : prog -> env_loc -> object_loc -> out -> ext_expr + | spec_binding_inst_var_decls : env_loc -> list string -> bool -> strictness_flag -> ext_expr + | spec_binding_inst_var_decls_1 : env_loc -> string -> list string -> bool -> strictness_flag -> out -> ext_expr + | spec_binding_inst_var_decls_2 : env_loc -> list string -> bool -> strictness_flag -> out -> ext_expr + | spec_binding_inst : codetype -> option object_loc -> prog -> list value -> ext_expr + | spec_binding_inst_1 : codetype -> option object_loc -> prog -> list value -> env_loc -> ext_expr + | spec_binding_inst_2 : codetype -> object_loc -> prog -> list string -> list value -> env_loc -> out -> ext_expr + | spec_binding_inst_3 : codetype -> option object_loc -> prog -> list string -> list value -> env_loc -> ext_expr + | spec_binding_inst_4 : codetype -> option object_loc -> prog -> list string -> list value -> bool -> env_loc -> out -> ext_expr + | spec_binding_inst_5 : codetype -> option object_loc -> prog -> list string -> list value -> bool -> env_loc -> ext_expr + | spec_binding_inst_6 : codetype -> option object_loc -> prog -> list string -> list value -> bool -> env_loc -> out -> ext_expr + | spec_binding_inst_7 : prog -> bool -> env_loc -> out -> ext_expr + | spec_binding_inst_8 : prog -> bool -> env_loc -> ext_expr + + | spec_make_arg_getter : string -> lexical_env -> ext_expr + | spec_make_arg_setter : string -> lexical_env -> ext_expr + + | spec_args_obj_get_1 : value -> object_loc -> prop_name -> object_loc -> (specret full_descriptor) -> ext_expr + + + | spec_args_obj_define_own_prop_1 : object_loc -> prop_name -> descriptor -> bool -> object_loc -> specret full_descriptor -> ext_expr + | spec_args_obj_define_own_prop_2 : object_loc -> prop_name -> descriptor -> bool -> object_loc -> full_descriptor -> out -> ext_expr + | spec_args_obj_define_own_prop_3 : object_loc -> prop_name -> descriptor -> bool -> object_loc -> out -> ext_expr + | spec_args_obj_define_own_prop_4 : object_loc -> prop_name -> descriptor -> bool -> object_loc -> ext_expr + | spec_args_obj_define_own_prop_5 : out -> ext_expr + | spec_args_obj_define_own_prop_6 : ext_expr + + | spec_args_obj_delete_1 : object_loc -> prop_name -> bool -> object_loc -> specret full_descriptor -> ext_expr + | spec_args_obj_delete_2 : object_loc -> prop_name -> bool -> object_loc -> full_descriptor -> out -> ext_expr + | spec_args_obj_delete_3 : out -> ext_expr + | spec_args_obj_delete_4 : bool -> ext_expr + + | spec_arguments_object_map : object_loc -> list string -> list value -> lexical_env -> strictness_flag -> ext_expr + | spec_arguments_object_map_1 : object_loc -> list string -> list value -> lexical_env -> strictness_flag -> out -> ext_expr + | spec_arguments_object_map_2 : object_loc -> list string -> list value -> lexical_env -> strictness_flag -> object_loc -> list string -> int -> ext_expr + | spec_arguments_object_map_3 : object_loc -> list string -> list value -> lexical_env -> strictness_flag -> object_loc -> list string -> int -> out -> ext_expr + | spec_arguments_object_map_4 : object_loc -> list string -> list value -> lexical_env -> strictness_flag -> object_loc -> list string -> int -> string -> ext_expr + | spec_arguments_object_map_5 : object_loc -> list string -> list value -> lexical_env -> strictness_flag -> object_loc -> list string -> int -> string -> out -> ext_expr + | spec_arguments_object_map_6 : object_loc -> list string -> list value -> lexical_env -> strictness_flag -> object_loc -> list string -> int -> object_loc -> out -> ext_expr + | spec_arguments_object_map_7 : object_loc -> list string -> list value -> lexical_env -> strictness_flag -> object_loc -> list string -> int -> out -> ext_expr + | spec_arguments_object_map_8 : object_loc -> object_loc -> list string -> ext_expr + + | spec_create_arguments_object : object_loc -> list string -> list value -> lexical_env -> strictness_flag -> ext_expr + | spec_create_arguments_object_1 : object_loc -> list string -> list value -> lexical_env -> strictness_flag -> object_loc -> out -> ext_expr + | spec_create_arguments_object_2 : object_loc -> strictness_flag -> object_loc -> out -> ext_expr + | spec_create_arguments_object_3 : object_loc -> value -> attributes -> out -> ext_expr + | spec_create_arguments_object_4 : object_loc -> out -> ext_expr + + (* Functions *) + + | spec_object_has_instance : object_loc -> value -> ext_expr + | spec_object_has_instance_1 : builtin_has_instance -> object_loc -> value -> ext_expr + | spec_function_has_instance_1 : object_loc -> out -> ext_expr + | spec_function_has_instance_2 : object_loc -> object_loc -> ext_expr + | spec_function_has_instance_3 : object_loc -> value -> ext_expr + + | spec_function_has_instance_after_bind_1 : object_loc -> value -> ext_expr + | spec_function_has_instance_after_bind_2 : object_loc -> value -> ext_expr + + | spec_function_get_1 : object_loc -> prop_name -> out -> ext_expr + + (* Function.prototype.apply *) + + | spec_function_proto_apply : object_loc -> value -> value -> ext_expr + | spec_function_proto_apply_1 : object_loc -> value -> object_loc -> out -> ext_expr + | spec_function_proto_apply_2 : object_loc -> value -> object_loc -> specret int -> ext_expr + | spec_function_proto_apply_3 : object_loc -> value -> specret (list value) -> ext_expr + + (* Function.prototype.bind *) + + | spec_function_proto_bind_1 : object_loc -> value -> list value -> ext_expr + | spec_function_proto_bind_2 : object_loc -> value -> list value -> ext_expr + | spec_function_proto_bind_3 : object_loc -> specret int -> ext_expr + | spec_function_proto_bind_4 : object_loc -> int -> ext_expr + | spec_function_proto_bind_5 : object_loc -> ext_expr + | spec_function_proto_bind_6 : object_loc -> out -> ext_expr + | spec_function_proto_bind_7 : object_loc -> out -> ext_expr + + (* Throwing of errors *) + + | spec_error : native_error -> ext_expr + | spec_error_1 : out -> ext_expr + | spec_error_or_cst : bool -> native_error -> value -> ext_expr + | spec_error_or_void : bool -> native_error -> ext_expr + + (* LATER: these are currently unused *) + | spec_init_throw_type_error : ext_expr + | spec_init_throw_type_error_1 : out -> ext_expr + + | spec_build_error : value -> value -> ext_expr + | spec_build_error_1 : object_loc -> value -> ext_expr + | spec_build_error_2 : object_loc -> out -> ext_expr + + (* Object creation and calling continuation with object address *) + + | spec_new_object : (object_loc -> ext_expr) -> ext_expr + | spec_new_object_1 : out -> (object_loc -> ext_expr) -> ext_expr + + | spec_prim_new_object : prim -> ext_expr + + (* Auxiliary reduction for creating function object steps 16 - 18 *) + | spec_creating_function_object_proto : object_loc -> ext_expr + | spec_creating_function_object_proto_1 : object_loc -> out -> ext_expr + | spec_creating_function_object_proto_2 : object_loc -> object_loc -> out -> ext_expr + + | spec_creating_function_object : list string -> funcbody -> lexical_env -> strictness_flag -> ext_expr + | spec_creating_function_object_1 : strictness_flag -> object_loc -> out -> ext_expr + | spec_creating_function_object_2 : strictness_flag -> object_loc -> out -> ext_expr + | spec_creating_function_object_3 : object_loc -> out -> ext_expr + | spec_creating_function_object_4 : object_loc -> out -> ext_expr + + (* Function creation in give execution context*) + | spec_create_new_function_in : execution_ctx -> list string -> funcbody -> ext_expr + + (* TODO: Check if object_loc or value could be None *) + (* TODO: get rid of this: | spec_call : builtin -> option object_loc -> option value -> list value -> ext_expr *) + | spec_call : object_loc -> value -> list value -> ext_expr (* object with the call method, this value, arguments *) + | spec_call_1 : call -> object_loc -> value -> list value -> ext_expr + + | spec_call_prealloc : prealloc -> value -> list value -> ext_expr + + | spec_call_default : object_loc -> value -> list value -> ext_expr + | spec_call_default_1 : object_loc -> ext_expr + | spec_call_default_2 : option funcbody -> ext_expr + | spec_call_default_3 : out -> ext_expr + + | spec_construct : object_loc -> list value -> ext_expr + | spec_construct_1 : construct -> object_loc -> list value -> ext_expr + + | spec_construct_prealloc : prealloc -> list value -> ext_expr + + | spec_construct_default : object_loc -> list value -> ext_expr + | spec_construct_default_1 : object_loc -> list value -> out -> ext_expr + | spec_construct_default_2 : object_loc -> out -> ext_expr + + | spec_construct_1_after_bind : object_loc -> list value -> object_loc -> ext_expr + + (** Extended expressions for calling global object builtin functions *) + (* LATER: rename all the spec_call into spec_builtin *) + + | spec_call_global_is_nan_1 : out -> ext_expr + | spec_call_global_is_finite_1 : out -> ext_expr + + | spec_call_object_call_1 : value -> list value -> ext_expr + | spec_call_object_new_1 : value -> ext_expr + | spec_call_object_get_proto_of_1 : value -> ext_expr + | spec_call_object_is_extensible_1 : value -> ext_expr + + | spec_call_object_create_1 : value -> value -> ext_expr + | spec_call_object_create_2 : out -> value -> value -> ext_expr + | spec_call_object_create_3 : object_loc -> value -> ext_expr + + | spec_call_object_define_props_1 : value -> value -> ext_expr + | spec_call_object_define_props_2 : out -> object_loc -> ext_expr + | spec_call_object_define_props_3 : object_loc -> object_loc -> list prop_name -> list (prop_name * attributes) -> ext_expr + | spec_call_object_define_props_4 : out -> object_loc -> object_loc -> prop_name -> list prop_name -> list (prop_name * attributes) -> ext_expr + | spec_call_object_define_props_5 : object_loc -> object_loc -> prop_name -> list prop_name -> list (prop_name * attributes) -> specret attributes -> ext_expr + | spec_call_object_define_props_6 : object_loc -> list (prop_name * attributes) -> ext_expr + | spec_call_object_define_props_7 : out -> object_loc -> list (prop_name * attributes) -> ext_expr + + | spec_call_object_seal_1 : value -> ext_expr + | spec_call_object_seal_2 : object_loc -> list prop_name -> ext_expr + | spec_call_object_seal_3 : object_loc -> prop_name -> list prop_name -> specret full_descriptor -> ext_expr + | spec_call_object_seal_4 : object_loc -> list prop_name -> out -> ext_expr + + | spec_call_object_is_sealed_1 : value -> ext_expr + | spec_call_object_is_sealed_2 : object_loc -> list prop_name -> ext_expr + | spec_call_object_is_sealed_3 : object_loc -> list prop_name -> specret full_descriptor -> ext_expr + + | spec_call_object_freeze_1 : value -> ext_expr + | spec_call_object_freeze_2 : object_loc -> list prop_name -> ext_expr + | spec_call_object_freeze_3 : object_loc -> prop_name -> list prop_name -> specret full_descriptor -> ext_expr + | spec_call_object_freeze_4 : object_loc -> prop_name -> list prop_name -> full_descriptor -> ext_expr + | spec_call_object_freeze_5 : object_loc -> list prop_name -> out -> ext_expr + + | spec_call_object_is_frozen_1 : value -> ext_expr + | spec_call_object_is_frozen_2 : object_loc -> list prop_name -> ext_expr + | spec_call_object_is_frozen_3 : object_loc -> list prop_name -> specret full_descriptor -> ext_expr + | spec_call_object_is_frozen_4 : object_loc -> list prop_name -> full_descriptor -> ext_expr + | spec_call_object_is_frozen_5 : object_loc -> list prop_name -> full_descriptor -> ext_expr + + + | spec_call_object_prevent_extensions_1 : value -> ext_expr + + | spec_call_object_define_prop_1 : value -> value -> value -> ext_expr + | spec_call_object_define_prop_2 : object_loc -> out -> value -> ext_expr + | spec_call_object_define_prop_3 : object_loc -> string -> specret descriptor -> ext_expr + | spec_call_object_define_prop_4 : object_loc -> out -> ext_expr + + | spec_call_object_get_own_prop_descriptor_1: value -> value -> ext_expr + | spec_call_object_get_own_prop_descriptor_2: object_loc -> out -> ext_expr + + + | spec_call_object_proto_to_string_1 : value -> ext_expr + | spec_call_object_proto_to_string_2 : out -> ext_expr + + | spec_call_object_proto_has_own_prop_1 : out -> value -> ext_expr + | spec_call_object_proto_has_own_prop_2 : out -> prop_name -> ext_expr + | spec_call_object_proto_has_own_prop_3 : specret full_descriptor -> ext_expr + + | spec_call_object_proto_is_prototype_of_2_1 : value -> value -> ext_expr + | spec_call_object_proto_is_prototype_of_2_2 : out -> object_loc -> ext_expr + | spec_call_object_proto_is_prototype_of_2_3 : object_loc -> object_loc -> ext_expr + | spec_call_object_proto_is_prototype_of_2_4 : object_loc -> value -> ext_expr + + | spec_call_object_proto_prop_is_enumerable_1 : value -> value -> ext_expr + | spec_call_object_proto_prop_is_enumerable_2 : value -> out -> ext_expr + | spec_call_object_proto_prop_is_enumerable_3 : out -> string -> ext_expr + | spec_call_object_proto_prop_is_enumerable_4 : specret full_descriptor -> ext_expr + + | spec_call_array_new_1 : list value -> ext_expr + | spec_call_array_new_2 : object_loc -> list value -> ext_expr + | spec_call_array_new_3 : object_loc -> list value -> int -> ext_expr + + | spec_call_array_new_single_1 : value -> ext_expr + | spec_call_array_new_single_2 : object_loc -> value -> ext_expr + | spec_call_array_new_single_3 : object_loc -> number -> specret int -> ext_expr + | spec_call_array_new_single_4 : object_loc -> int -> ext_expr + + | spec_call_array_is_array_1 : value -> ext_expr + | spec_call_array_is_array_2_3 : class_name -> ext_expr + + | spec_call_array_proto_to_string : out -> ext_expr + | spec_call_array_proto_to_string_1 : object_loc -> out -> ext_expr + + | spec_call_array_proto_join : out -> list value -> ext_expr + | spec_call_array_proto_join_1 : object_loc -> out -> list value -> ext_expr + | spec_call_array_proto_join_2 : object_loc -> specret int -> list value -> ext_expr + | spec_call_array_proto_join_3 : object_loc -> int -> value -> ext_expr + | spec_call_array_proto_join_4 : object_loc -> int -> out -> ext_expr + | spec_call_array_proto_join_5 : object_loc -> int -> string -> specret string -> ext_expr + + | spec_call_array_proto_join_elements : object_loc -> int -> int -> string -> string -> ext_expr + | spec_call_array_proto_join_elements_1 : object_loc -> int -> int -> string -> string -> ext_expr + | spec_call_array_proto_join_elements_2 : object_loc -> int -> int -> string -> string -> specret string -> ext_expr + + | spec_call_array_proto_pop_1 : out -> ext_expr + | spec_call_array_proto_pop_2 : object_loc -> out -> ext_expr + | spec_call_array_proto_pop_3 : object_loc -> specret int -> ext_expr + | spec_call_array_proto_pop_3_empty_1 : object_loc -> ext_expr + | spec_call_array_proto_pop_3_empty_2 : out -> ext_expr + | spec_call_array_proto_pop_3_nonempty_1 : object_loc -> int -> ext_expr + | spec_call_array_proto_pop_3_nonempty_2 : object_loc -> out -> ext_expr + | spec_call_array_proto_pop_3_nonempty_3 : object_loc -> value -> out -> ext_expr + | spec_call_array_proto_pop_3_nonempty_4 : object_loc -> value -> value -> out -> ext_expr + | spec_call_array_proto_pop_3_nonempty_5 : value -> out -> ext_expr + + | spec_call_array_proto_push_1 : out -> list value -> ext_expr + | spec_call_array_proto_push_2 : object_loc -> list value -> out -> ext_expr + | spec_call_array_proto_push_3 : object_loc -> list value -> specret int -> ext_expr + | spec_call_array_proto_push_4 : object_loc -> list value -> int -> ext_expr + | spec_call_array_proto_push_4_nonempty_1 : object_loc -> list value -> int -> value -> ext_expr + | spec_call_array_proto_push_4_nonempty_2 : object_loc -> list value -> int -> value -> out -> ext_expr + | spec_call_array_proto_push_4_nonempty_3 : object_loc -> list value -> int -> value -> out -> ext_expr + | spec_call_array_proto_push_5 : object_loc -> value -> ext_expr + | spec_call_array_proto_push_6 : value -> out -> ext_expr + + | spec_call_string_non_empty : out -> ext_expr + + | spec_construct_string_1 : value -> ext_expr + | spec_construct_string_2 : out -> ext_expr + + | spec_construct_bool_1 : out -> ext_expr + | spec_call_bool_proto_to_string_1 : out -> ext_expr + | spec_call_bool_proto_value_of_1 : value -> ext_expr + | spec_call_bool_proto_value_of_2 : value -> ext_expr + + | spec_call_number_proto_to_string_1 : value -> list value -> ext_expr + | spec_call_number_proto_to_string_2 : value -> out -> ext_expr + | spec_construct_number_1 : out -> ext_expr + | spec_call_number_proto_value_of_1 : value -> ext_expr + + | spec_call_error_proto_to_string_1 : value -> ext_expr + | spec_call_error_proto_to_string_2 : object_loc -> out -> ext_expr + | spec_call_error_proto_to_string_3 : object_loc -> out -> ext_expr + | spec_call_error_proto_to_string_4 : object_loc -> string -> out -> ext_expr + | spec_call_error_proto_to_string_5 : object_loc -> string -> out -> ext_expr + | spec_call_error_proto_to_string_6 : object_loc -> string -> out -> ext_expr + + + (** Special state for returning an outcome *) + + | spec_returns : out -> ext_expr + +(** Grammar of extended statements *) + +with ext_stat := + + (** Extended expressions include statements *) + + | stat_basic : stat -> ext_stat + + (** Extended statements associated with primitive statements *) + | stat_expr_1: (specret value) -> ext_stat + + | stat_block_1 : out -> stat -> ext_stat + | stat_block_2 : resvalue -> out -> ext_stat + + | stat_label_1 : label -> out -> ext_stat + + | stat_var_decl_1 : out -> list (string * option expr) -> ext_stat + | stat_var_decl_item : (string * option expr) -> ext_stat + | stat_var_decl_item_1 : string -> specret ref -> expr -> ext_stat + | stat_var_decl_item_2 : string -> ref -> (specret value) -> ext_stat + | stat_var_decl_item_3 : string -> out -> ext_stat + + | stat_if_1 : specret value -> stat -> option stat -> ext_stat + + | stat_while_1 : label_set -> expr -> stat -> resvalue -> ext_stat + | stat_while_2 : label_set -> expr -> stat -> resvalue -> specret value -> ext_stat + | stat_while_3 : label_set -> expr -> stat -> resvalue -> out -> ext_stat + | stat_while_4 : label_set -> expr -> stat -> resvalue -> res -> ext_stat + | stat_while_5 : label_set -> expr -> stat -> resvalue -> res -> ext_stat + | stat_while_6 : label_set -> expr -> stat -> resvalue -> res -> ext_stat + + + | stat_do_while_1 : label_set -> stat -> expr -> resvalue -> ext_stat + | stat_do_while_2 : label_set -> stat -> expr -> resvalue -> out -> ext_stat + | stat_do_while_3 : label_set -> stat -> expr -> resvalue -> res -> ext_stat + | stat_do_while_4 : label_set -> stat -> expr -> resvalue -> res -> ext_stat + | stat_do_while_5 : label_set -> stat -> expr -> resvalue -> res -> ext_stat + | stat_do_while_6 : label_set -> stat -> expr -> resvalue -> ext_stat + | stat_do_while_7 : label_set -> stat -> expr -> resvalue -> specret value -> ext_stat + + | stat_for_1 : label_set -> specret value -> option expr -> option expr -> stat -> ext_stat + | stat_for_2 : label_set -> resvalue -> option expr -> option expr -> stat -> ext_stat + | stat_for_3 : label_set -> resvalue -> expr -> specret value -> option expr -> stat -> ext_stat + | stat_for_4 : label_set -> resvalue -> option expr -> option expr -> stat -> ext_stat + | stat_for_5 : label_set -> resvalue -> option expr -> out -> option expr -> stat -> ext_stat + | stat_for_6 : label_set -> resvalue -> option expr -> option expr -> stat -> res -> ext_stat + | stat_for_7 : label_set -> resvalue -> option expr -> option expr -> stat -> res -> ext_stat + | stat_for_8 : label_set -> resvalue -> option expr -> option expr -> stat -> ext_stat + | stat_for_9 : label_set -> resvalue -> option expr -> expr -> specret value -> stat -> ext_stat + + | stat_for_var_1 : out -> label_set -> option expr -> option expr -> stat -> ext_stat + + +(* LATER: define prop_names for [set prop_name] *) +(* LATER + | stat_for_in_1 : expr -> stat -> out -> ext_stat + | stat_for_in_2 : expr -> stat -> out -> ext_stat + | stat_for_in_3 : expr -> stat -> out -> ext_stat + | stat_for_in_4 : expr -> stat -> object_loc -> option res -> option out -> set prop_name -> set prop_name -> ext_stat + | stat_for_in_5 : expr -> stat -> object_loc -> option res -> option out -> set prop_name -> set prop_name -> prop_name -> ext_stat + | stat_for_in_6 : expr -> stat -> object_loc -> option res -> option out -> set prop_name -> set prop_name -> prop_name -> ext_stat + | stat_for_in_7 : expr -> stat -> object_loc -> option res -> option out -> set prop_name -> set prop_name -> out -> ext_stat + | stat_for_in_8 : expr -> stat -> object_loc -> option res -> option out -> set prop_name -> set prop_name -> out -> ext_stat + | stat_for_in_9 : expr -> stat -> object_loc -> option res -> option out -> set prop_name -> set prop_name -> res -> ext_stat +*) + + (* Extended statements for 'switch' *) + + | stat_switch_1: (specret value) -> label_set -> switchbody -> ext_stat + | stat_switch_2: out -> label_set -> ext_stat + | stat_switch_nodefault_1: value -> resvalue -> list switchclause -> ext_stat + | stat_switch_nodefault_2: (specret value) -> value -> resvalue -> list stat -> list switchclause -> ext_stat + | stat_switch_nodefault_3: bool -> value -> resvalue -> list stat -> list switchclause -> ext_stat + | stat_switch_nodefault_4: out -> list switchclause -> ext_stat + | stat_switch_nodefault_5: resvalue -> list switchclause -> ext_stat + | stat_switch_nodefault_6: resvalue -> out -> list switchclause -> ext_stat + + | stat_switch_default_1: value -> resvalue -> list switchclause -> list stat -> list switchclause -> ext_stat + | stat_switch_default_A_1: bool -> value -> resvalue -> list switchclause -> list stat -> list switchclause -> ext_stat + | stat_switch_default_A_2: (specret value) -> value -> resvalue -> list stat -> list switchclause -> list stat -> list switchclause -> ext_stat + | stat_switch_default_A_3: bool -> value -> resvalue -> list stat -> list switchclause -> list stat -> list switchclause -> ext_stat + | stat_switch_default_A_4: resvalue -> value -> list stat -> list switchclause -> list stat -> list switchclause -> ext_stat + | stat_switch_default_A_5: resvalue -> out -> value -> list switchclause -> list stat -> list switchclause -> ext_stat + + | stat_switch_default_B_1: value -> resvalue -> list stat -> list switchclause -> ext_stat + | stat_switch_default_B_2: (specret value) -> value -> resvalue -> list stat -> list stat -> list switchclause -> ext_stat + | stat_switch_default_B_3: bool -> value -> resvalue -> list stat -> list stat -> list switchclause -> ext_stat + | stat_switch_default_B_4: out -> list stat -> list switchclause -> ext_stat + + | stat_switch_default_5: value -> resvalue -> list stat -> list switchclause -> ext_stat + | stat_switch_default_6: out -> list switchclause -> ext_stat + | stat_switch_default_7: resvalue -> list switchclause -> ext_stat + | stat_switch_default_8: resvalue -> out -> list switchclause -> ext_stat + + | stat_with_1 : stat -> specret value -> ext_stat (* The expression have been executed. *) + + | stat_throw_1 : (specret value) -> ext_stat (* The expression have been executed. *) + + | stat_return_1 : (specret value) -> ext_stat (* The expression have been executed. *) + + | stat_try_1 : out -> option (string*stat) -> option stat -> ext_stat (* The try block has been executed. *) + | stat_try_2 : out -> lexical_env -> stat -> option stat -> ext_stat (* The catch block is actived and will be executed. *) + | stat_try_3 : out -> option stat -> ext_stat (* The try catch block has been executed: there only stay an optional finally. *) + | stat_try_4 : res -> option stat -> ext_stat (* The try catch block has been executed: there only stay an optional finally. *) + | stat_try_5 : res -> out -> ext_stat (* The finally has been executed. *) + +(** Grammar of extended programs *) + +with ext_prog := + + | prog_basic : prog -> ext_prog + | javascript_1 : out -> prog -> ext_prog + | prog_1 : out -> element -> ext_prog + | prog_2 : resvalue -> out -> ext_prog + + +(** Grammar of extended forms for specification functions *) + +with ext_spec := + | spec_to_int32 : value -> ext_spec + | spec_to_int32_1 : out -> ext_spec + | spec_to_uint32 : value -> ext_spec + | spec_to_uint32_1 : out -> ext_spec + + | spec_expr_get_value_conv : (value -> ext_expr) -> expr -> ext_spec + | spec_expr_get_value_conv_1 : (value -> ext_expr) -> (specret value) -> ext_spec + | spec_expr_get_value_conv_2 : out -> ext_spec + + | spec_convert_twice : ext_expr -> ext_expr -> ext_spec + | spec_convert_twice_1 : out -> ext_expr -> ext_spec + | spec_convert_twice_2 : value -> out -> ext_spec + + (** Extended expressions for lists of expressions *) + | spec_list_expr : list expr -> ext_spec + | spec_list_expr_1 : list value -> list expr -> ext_spec + | spec_list_expr_2 : list value -> (specret value) -> list expr -> ext_spec + + | spec_to_descriptor : value -> ext_spec + | spec_to_descriptor_1a : object_loc -> descriptor -> ext_spec + | spec_to_descriptor_1b : out -> object_loc -> descriptor -> ext_spec + | spec_to_descriptor_1c : out -> object_loc -> descriptor -> ext_spec + | spec_to_descriptor_2a : object_loc -> descriptor -> ext_spec + | spec_to_descriptor_2b : out -> object_loc -> descriptor -> ext_spec + | spec_to_descriptor_2c : out -> object_loc -> descriptor -> ext_spec + | spec_to_descriptor_3a : object_loc -> descriptor -> ext_spec + | spec_to_descriptor_3b : out -> object_loc -> descriptor -> ext_spec + | spec_to_descriptor_3c : out -> object_loc -> descriptor -> ext_spec + | spec_to_descriptor_4a : object_loc -> descriptor -> ext_spec + | spec_to_descriptor_4b : out -> object_loc -> descriptor -> ext_spec + | spec_to_descriptor_4c : out -> object_loc -> descriptor -> ext_spec + | spec_to_descriptor_5a : object_loc -> descriptor -> ext_spec + | spec_to_descriptor_5b : out -> object_loc -> descriptor -> ext_spec + | spec_to_descriptor_5c : out -> object_loc -> descriptor -> ext_spec + | spec_to_descriptor_6a : object_loc -> descriptor -> ext_spec + | spec_to_descriptor_6b : out -> object_loc -> descriptor -> ext_spec + | spec_to_descriptor_6c : out -> object_loc -> descriptor -> ext_spec + | spec_to_descriptor_7 : object_loc -> descriptor -> ext_spec + + | spec_object_get_own_prop : object_loc -> prop_name -> ext_spec + | spec_object_get_own_prop_1 : builtin_get_own_prop -> object_loc -> prop_name -> ext_spec + | spec_object_get_own_prop_2 : object_loc -> prop_name -> option attributes -> ext_spec + + | spec_object_get_prop : object_loc -> prop_name -> ext_spec + | spec_object_get_prop_1 : builtin_get_prop -> object_loc -> prop_name -> ext_spec + | spec_object_get_prop_2 : object_loc -> prop_name -> specret full_descriptor -> ext_spec + | spec_object_get_prop_3 : object_loc -> prop_name -> value -> ext_spec + + | spec_get_value : resvalue -> ext_spec + | spec_get_value_ref_b_1 : out -> ext_spec + | spec_get_value_ref_c_1 : out -> ext_spec + + (** Shorthand for calling [red_expr] then [ref_get_value] *) + + | spec_expr_get_value : expr -> ext_spec + | spec_expr_get_value_1 : out -> ext_spec + + (** Extended expressions for operations on lexical environments *) + + | spec_lexical_env_get_identifier_ref : lexical_env -> prop_name -> bool -> ext_spec + | spec_lexical_env_get_identifier_ref_1 : env_loc -> lexical_env -> prop_name -> bool -> ext_spec + | spec_lexical_env_get_identifier_ref_2 : env_loc -> lexical_env -> prop_name -> bool -> out -> ext_spec + + (** Errors in the grammar of spec *) (* LATER: merge *) + | spec_error_spec : native_error -> ext_spec + | spec_error_spec_1 : out -> ext_spec + + (* .. *) + | spec_args_obj_get_own_prop_1 : object_loc -> prop_name -> (specret full_descriptor) -> ext_spec + | spec_args_obj_get_own_prop_2 : object_loc -> prop_name -> object_loc -> full_descriptor -> (specret full_descriptor) -> ext_spec + | spec_args_obj_get_own_prop_3 : full_descriptor -> out -> ext_spec + | spec_args_obj_get_own_prop_4 : full_descriptor -> ext_spec + + | spec_string_get_own_prop_1 : object_loc -> prop_name -> (specret full_descriptor) -> ext_spec + | spec_string_get_own_prop_2 : object_loc -> prop_name -> (specret int) -> ext_spec + | spec_string_get_own_prop_3 : object_loc -> prop_name -> out -> ext_spec + | spec_string_get_own_prop_4 : prop_name -> string -> ext_spec + | spec_string_get_own_prop_5 : string -> (specret int) -> ext_spec + | spec_string_get_own_prop_6 : string -> int -> int -> ext_spec + + (* Argumenst for Function.prototype.apply *) + + | spec_function_proto_apply_get_args : object_loc -> int -> int -> ext_spec + | spec_function_proto_apply_get_args_1 : object_loc -> int -> int -> out -> ext_spec + | spec_function_proto_apply_get_args_2 : object_loc -> int -> int -> out -> ext_spec + | spec_function_proto_apply_get_args_3 : value -> specret (list value) -> ext_spec + + (* Length for Function.prototype.bind *) + + | spec_function_proto_bind_length : object_loc -> list value -> ext_spec + | spec_function_proto_bind_length_1 : object_loc -> list value -> ext_spec + | spec_function_proto_bind_length_2 : list value -> out -> ext_spec + | spec_function_proto_bind_length_3 : specret int -> list value -> ext_spec + + (* Conversion for Array.prototype.join *) + + | spec_call_array_proto_join_vtsfj : object_loc -> int -> ext_spec + | spec_call_array_proto_join_vtsfj_1 : object_loc -> out -> ext_spec + | spec_call_array_proto_join_vtsfj_2 : object_loc -> out -> ext_spec + | spec_call_array_proto_join_vtsfj_3 : out -> ext_spec +. + +(** Coercions *) + +Coercion expr_basic : expr >-> ext_expr. +Coercion stat_basic : stat >-> ext_stat. +Coercion prog_basic : prog >-> ext_prog. + + +(** Shorthand for calling toPrimitive without prefered type *) + +Definition spec_to_primitive_auto v := + spec_to_primitive v None. + + +(**************************************************************) +(** ** Extracting outcome from an extended expression. *) + +(** Auxiliary definition for extracting [out] of [specret] *) + +Definition out_of_specret T (y:specret T) := + match y with + | specret_out o => Some o + | specret_val _ _ => None + end. + +(** The [out_of_ext_*] family of definitions is used by + the generic abort rule, which propagates exceptions, + and divergence, break and continues. *) + +Definition out_of_ext_expr (e : ext_expr) : option out := + match e with + | expr_basic _ => None + + | expr_identifier_1 y => out_of_specret y + | expr_object_0 o _ => Some o + | expr_object_1 _ _ => None + | expr_object_2 _ _ _ _ => None + | expr_object_3_val _ _ y _ => out_of_specret y + | expr_object_3_get _ _ o _ => Some o + | expr_object_3_set _ _ o _ => Some o + | expr_object_4 _ _ _ _ => None + | expr_object_5 _ _ o => Some o + + + + + (* _ARRAYS_ : support for array intermediate forms - CHECK!*) + | expr_array_0 o _ => Some o + | expr_array_1 _ _ => None + | expr_array_2 _ _ _ => None + | expr_array_3 _ _ _ => None + | expr_array_3_1 _ y _ _ => out_of_specret y + | expr_array_3_2 _ _ o _ _ => Some o + | expr_array_3_3 _ _ y _ _ => out_of_specret y + | expr_array_3_4 _ _ o _ => Some o + | expr_array_3_5 _ o _ => Some o + + + | expr_array_add_length _ _ o => Some o + | expr_array_add_length_0 _ _ => None + | expr_array_add_length_1 _ _ o => Some o + | expr_array_add_length_2 _ y _ => out_of_specret y + | expr_array_add_length_3 _ y => out_of_specret y + | expr_array_add_length_4 _ o => Some o + + + + + + | expr_function_1 _ _ _ _ _ o => Some o + | expr_function_2 _ _ o => Some o + | expr_function_3 _ o => Some o + + | expr_access_1 y _ => out_of_specret y + | expr_access_2 _ y => out_of_specret y + | expr_access_3 _ o _ => Some o + | expr_access_4 _ o => Some o + + | expr_new_1 y _ => out_of_specret y + | expr_new_2 _ y => out_of_specret y + + | expr_call_1 o _ _ => Some o + | expr_call_2 _ _ _ y => out_of_specret y + | expr_call_3 _ _ _ y => out_of_specret y + | expr_call_4 _ _ _ _ => None + | expr_call_5 _ _ _ o => Some o + + | spec_eval _ _ _ => None + + | expr_unary_op_1 _ y => out_of_specret y + | expr_unary_op_2 _ _ => None + | expr_delete_1 o => Some o + | expr_delete_2 _ => None + | expr_delete_3 _ o => Some o + | expr_delete_4 _ _ => None + | expr_typeof_1 o => Some o + | expr_typeof_2 y => out_of_specret y + | expr_prepost_1 _ o => Some o +(* | expr_prepost_2 _ _ o => Some o *) + + | expr_prepost_2 _ _ y => out_of_specret y + + | expr_prepost_3 _ _ o => Some o + | expr_prepost_4 _ o => Some o + | expr_unary_op_neg_1 o => Some o + | expr_unary_op_bitwise_not_1 y => out_of_specret y + | expr_unary_op_not_1 o => Some o + | expr_conditional_1 y _ _ => out_of_specret y + | expr_conditional_1' o _ _ => None + | expr_conditional_2 y => out_of_specret y + + | expr_binary_op_1 _ y _ => out_of_specret y + | expr_binary_op_2 _ _ y => out_of_specret y + | expr_binary_op_3 _ _ _ => None + | expr_binary_op_add_1 y => out_of_specret y + | expr_binary_op_add_string_1 y => out_of_specret y + | expr_puremath_op_1 _ y => out_of_specret y + | expr_shift_op_1 _ y _ => out_of_specret y + | expr_shift_op_2 _ _ y => out_of_specret y + | expr_inequality_op_1 _ _ _ _ => None + | expr_inequality_op_2 _ _ y => out_of_specret y + | expr_binary_op_in_1 _ o => Some o + | expr_binary_op_disequal_1 o => Some o + | spec_equal _ _ => None + | spec_equal_1 _ _ _ _ => None + | spec_equal_2 _ => None + | spec_equal_3 _ _ _ => None + | spec_equal_4 _ o => Some o + | expr_bitwise_op_1 _ y _ => out_of_specret y + | expr_bitwise_op_2 _ _ y => out_of_specret y + | expr_lazy_op_1 _ y _ => out_of_specret y + | expr_lazy_op_2 _ _ o _ => Some o + | expr_lazy_op_2_1 y => out_of_specret y + + | expr_assign_1 o _ _ => Some o + | expr_assign_2 _ y _ _ => out_of_specret y + | expr_assign_3 _ _ _ y => out_of_specret y + | expr_assign_3' _ o => Some o + | expr_assign_4 _ y => out_of_specret y + | expr_assign_5 _ o => Some o + + | spec_to_primitive _ _ => None + | spec_to_boolean _ => None + | spec_to_number _ => None + | spec_to_number_1 o => Some o + | spec_to_integer _ => None + | spec_to_integer_1 o => Some o + | spec_to_string _ => None + | spec_to_string_1 o => Some o + | spec_to_object _ => None + + | spec_check_object_coercible _ => None + + | spec_eq _ _ => None + | spec_eq0 _ _ => None + | spec_eq1 _ _ => None + | spec_eq2 _ _ _ => None + + | spec_object_get _ _ => None + | spec_object_get_1 _ _ _ _ => None + | spec_object_get_2 _ y => out_of_specret y + | spec_object_get_3 _ _ => None + + | spec_object_can_put _ _ => None + | spec_object_can_put_1 _ _ _ => None + | spec_object_can_put_2 _ _ y => out_of_specret y + | spec_object_can_put_4 _ _ _ => None + | spec_object_can_put_5 _ y => out_of_specret y + | spec_object_can_put_6 _ _ => None + + | spec_object_put _ _ _ _ => None + | spec_object_put_1 _ _ _ _ _ _ => None + | spec_object_put_2 _ _ _ _ _ o => Some o + | spec_object_put_3 _ _ _ _ _ y => out_of_specret y + | spec_object_put_4 _ _ _ _ _ y => out_of_specret y + | spec_object_put_5 o => Some o + + | spec_object_has_prop _ _ => None + | spec_object_has_prop_1 _ _ _ => None + | spec_object_has_prop_2 y => out_of_specret y + + | spec_object_delete _ _ _ => None + | spec_object_delete_1 _ _ _ _ => None + | spec_object_delete_2 _ _ _ y => out_of_specret y + | spec_object_delete_3 _ _ _ _ => None + + | spec_object_default_value _ _ => None + | spec_object_default_value_1 _ _ _ => None + | spec_object_default_value_2 _ _ _ => None + | spec_object_default_value_3 _ _ => None + | spec_object_default_value_4 => None + | spec_object_default_value_sub_1 _ _ _ => None + | spec_object_default_value_sub_2 _ o _ => Some o + | spec_object_default_value_sub_3 o _ => Some o + + | spec_object_define_own_prop _ _ _ _ => None + | spec_object_define_own_prop_1 _ _ _ _ _ => None + | spec_object_define_own_prop_2 _ _ _ _ y => out_of_specret y + | spec_object_define_own_prop_3 _ _ _ _ _ _ => None + | spec_object_define_own_prop_4 _ _ _ _ _ => None + | spec_object_define_own_prop_5 _ _ _ _ _ => None + | spec_object_define_own_prop_6a _ _ _ _ _ => None + | spec_object_define_own_prop_6b _ _ _ _ _ => None + | spec_object_define_own_prop_6c _ _ _ _ _ => None + | spec_object_define_own_prop_reject _ => None + | spec_object_define_own_prop_write _ _ _ _ _ => None + + + + (* ARRAYS *) + | spec_object_define_own_prop_array_2 _ _ _ _ y => out_of_specret y + | spec_object_define_own_prop_array_2_1 _ _ _ _ _ _ => None + | spec_object_define_own_prop_array_branch_3_4 _ _ _ _ _ y => out_of_specret y + | spec_object_define_own_prop_array_branch_4_5 _ _ _ _ _ _ => None + | spec_object_define_own_prop_array_branch_4_5_a _ _ y _ _ _ _ => out_of_specret y + | spec_object_define_own_prop_array_branch_4_5_b _ _ _ o _ _ _ _ => Some o + | spec_object_define_own_prop_array_4a _ _ _ _ _ _ => None + | spec_object_define_own_prop_array_4b _ _ y _ _ _ _ => out_of_specret y + | spec_object_define_own_prop_array_4c _ _ _ _ _ _ o => Some o + | spec_object_define_own_prop_array_5 _ _ _ _ => None + | spec_object_define_own_prop_array_3 _ _ _ _ _ => None + | spec_object_define_own_prop_array_3c _ _ y _ _ _ _ => out_of_specret y + | spec_object_define_own_prop_array_3d_e _ o _ _ _ _ _ => Some o + | spec_object_define_own_prop_array_3f_g _ _ _ _ _ _ => None + | spec_object_define_own_prop_array_3h_i _ _ _ _ _ _ => None + | spec_object_define_own_prop_array_3j _ _ _ _ _ _ _ => None + | spec_object_define_own_prop_array_3k_l _ o _ _ _ _ _ _ => Some o + | spec_object_define_own_prop_array_3l _ _ _ _ _ _ => None + | spec_object_define_own_prop_array_3l_ii _ _ _ _ _ _ => None + | spec_object_define_own_prop_array_3l_ii_1 _ _ _ _ _ _ o => Some o + | spec_object_define_own_prop_array_3l_ii_2 _ _ _ _ _ _ o => Some o + | spec_object_define_own_prop_array_3l_iii_1 _ _ _ _ _ => None + | spec_object_define_own_prop_array_3l_iii_2 _ _ _ _ => None + | spec_object_define_own_prop_array_3l_iii_3 _ _ _ => None + | spec_object_define_own_prop_array_3l_iii_4 _ _ o => Some o + | spec_object_define_own_prop_array_3m_n _ _ => None + + | spec_prim_value_get _ _ => None + | spec_prim_value_get_1 _ _ o => Some o + + | spec_prim_value_put _ _ _ _ => None + | spec_prim_value_put_1 _ _ _ _ o => Some o + + | spec_put_value _ _ => None + + + | spec_env_record_has_binding _ _ => None + | spec_env_record_has_binding_1 _ _ _ => None + | spec_env_record_get_binding_value _ _ _ => None + | spec_env_record_get_binding_value_1 _ _ _ _ => None + | spec_env_record_get_binding_value_2 _ _ _ o => Some o + + | spec_env_record_create_immutable_binding _ _ => None + | spec_env_record_initialize_immutable_binding _ _ _ => None + | spec_env_record_create_mutable_binding _ _ _ => None + | spec_env_record_create_mutable_binding_1 _ _ _ _ => None + | spec_env_record_create_mutable_binding_2 _ _ _ _ o => Some o + | spec_env_record_create_mutable_binding_3 o => Some o + | spec_env_record_set_mutable_binding _ _ _ _ => None + | spec_env_record_set_mutable_binding_1 _ _ _ _ _ => None + | spec_env_record_delete_binding _ _ => None + | spec_env_record_delete_binding_1 _ _ _ => None + + | spec_env_record_create_set_mutable_binding _ _ _ _ _ => None + | spec_env_record_create_set_mutable_binding_1 o _ _ _ _ => Some o + + | spec_env_record_implicit_this_value _ => None + | spec_env_record_implicit_this_value_1 _ _ => None + + | spec_from_descriptor y => out_of_specret y + | spec_from_descriptor_1 _ o => Some o + | spec_from_descriptor_2 _ _ o => Some o + | spec_from_descriptor_3 _ _ o => Some o + | spec_from_descriptor_4 _ _ o => Some o + | spec_from_descriptor_5 _ _ o => Some o + | spec_from_descriptor_6 _ o => Some o + + + | spec_entering_eval_code _ _ _ => None + | spec_entering_eval_code_1 _ _ _ => None + | spec_entering_eval_code_2 o _ => Some o + + | spec_call_global_eval _ _ => None + | spec_call_global_eval_1 _ _ => None + | spec_call_global_eval_2 _ => None + | spec_call_global_eval_3 o => Some o + + | spec_entering_func_code _ _ _ _ => None + | spec_entering_func_code_1 _ _ _ _ _ _ => None + | spec_entering_func_code_2 _ _ _ o _ => Some o + | spec_entering_func_code_3 _ _ _ _ _ _ => None + | spec_entering_func_code_4 o _ => Some o + + | spec_binding_inst_formal_params _ _ _ _ => None + | spec_binding_inst_formal_params_1 _ _ _ _ _ _ o => Some o + | spec_binding_inst_formal_params_2 _ _ _ _ _ _ o => Some o + | spec_binding_inst_formal_params_3 _ _ _ _ _ _ => None + | spec_binding_inst_formal_params_4 _ _ _ _ o => Some o + | spec_binding_inst_function_decls _ _ _ _ _ => None + | spec_binding_inst_function_decls_1 _ _ _ _ _ _ o => Some o + | spec_binding_inst_function_decls_2 _ _ _ _ _ _ _ o => Some o + | spec_binding_inst_function_decls_3 _ _ _ _ _ _ y => out_of_specret y + | spec_binding_inst_function_decls_3a _ _ _ _ _ _ _ => None + | spec_binding_inst_function_decls_4 _ _ _ _ _ _ _ o => Some o + | spec_binding_inst_function_decls_5 _ _ _ _ _ _ _ => None + | spec_binding_inst_function_decls_6 _ _ _ _ _ o => Some o + | spec_binding_inst_arg_obj object_loc _ _ _ _ => None + | spec_binding_inst_arg_obj_1 _ _ _ o => Some o + | spec_binding_inst_arg_obj_2 _ _ _ o => Some o + | spec_binding_inst_var_decls _ _ _ _ => None + | spec_binding_inst_var_decls_1 _ _ _ _ _ o => Some o + | spec_binding_inst_var_decls_2 _ _ _ _ o => Some o + | spec_binding_inst _ _ _ _ => None + | spec_binding_inst_1 _ _ _ _ _ => None + | spec_binding_inst_2 _ _ _ _ _ _ o => Some o + | spec_binding_inst_3 _ _ _ _ _ _ => None + | spec_binding_inst_4 _ _ _ _ _ _ _ o => Some o + | spec_binding_inst_5 _ _ _ _ _ _ _ => None + | spec_binding_inst_6 _ _ _ _ _ _ _ o => Some o + | spec_binding_inst_7 _ _ _ o => Some o + | spec_binding_inst_8 _ _ _ => None + + | spec_make_arg_getter _ _ => None + | spec_make_arg_setter _ _ => None + + | spec_args_obj_get_1 _ _ _ _ y => out_of_specret y + + + | spec_args_obj_define_own_prop_1 _ _ _ _ _ y => out_of_specret y + | spec_args_obj_define_own_prop_2 _ _ _ _ _ _ o => Some o + | spec_args_obj_define_own_prop_3 _ _ _ _ _ o => Some o + | spec_args_obj_define_own_prop_4 _ _ _ _ _ => None + | spec_args_obj_define_own_prop_5 o => Some o + | spec_args_obj_define_own_prop_6 => None + + | spec_args_obj_delete_1 _ _ _ _ y => out_of_specret y + | spec_args_obj_delete_2 _ _ _ _ _ o => Some o + | spec_args_obj_delete_3 o => Some o + | spec_args_obj_delete_4 _ => None + + | spec_arguments_object_map _ _ _ _ _ => None + | spec_arguments_object_map_1 _ _ _ _ _ o => Some o + | spec_arguments_object_map_2 _ _ _ _ _ _ _ _ => None + | spec_arguments_object_map_3 _ _ _ _ _ _ _ _ o => Some o + | spec_arguments_object_map_4 _ _ _ _ _ _ _ _ _ => None + | spec_arguments_object_map_5 _ _ _ _ _ _ _ _ _ o => Some o + | spec_arguments_object_map_6 _ _ _ _ _ _ _ _ _ o => Some o + | spec_arguments_object_map_7 _ _ _ _ _ _ _ _ o => Some o + | spec_arguments_object_map_8 _ _ _ => None + + + | spec_create_arguments_object _ _ _ _ _ => None + | spec_create_arguments_object_1 _ _ _ _ _ _ o => Some o + | spec_create_arguments_object_2 _ _ _ o => Some o + | spec_create_arguments_object_3 _ _ _ o => Some o + | spec_create_arguments_object_4 _ o => Some o + + | spec_object_has_instance _ _ => None + | spec_object_has_instance_1 _ _ _ => None + | spec_function_has_instance_1 _ o => Some o + | spec_function_has_instance_2 _ _ => None + | spec_function_has_instance_3 _ _ => None + | spec_function_has_instance_after_bind_1 _ _ => None + | spec_function_has_instance_after_bind_2 _ _ => None + + | spec_function_get_1 _ _ o => Some o + + | spec_error _ => None + | spec_error_1 o => Some o + | spec_error_or_cst _ _ _ => None + | spec_error_or_void _ _ => None + + | spec_init_throw_type_error => None + | spec_init_throw_type_error_1 o => Some o + + | spec_build_error _ _ => None + | spec_build_error_1 _ _ => None + | spec_build_error_2 _ o => Some o + + | spec_new_object _ => None + | spec_new_object_1 o _ => Some o + + | spec_prim_new_object _ => None + + | spec_creating_function_object_proto _ => None + | spec_creating_function_object_proto_1 _ o => Some o + | spec_creating_function_object_proto_2 _ _ o => Some o + + | spec_creating_function_object _ _ _ _ => None + | spec_creating_function_object_1 _ _ o => Some o + | spec_creating_function_object_2 _ _ o => Some o + | spec_creating_function_object_3 _ o => Some o + | spec_creating_function_object_4 _ o => Some o + + | spec_function_proto_apply _ _ _ => None + | spec_function_proto_apply_1 _ _ _ o => Some o + | spec_function_proto_apply_2 _ _ _ y => out_of_specret y + | spec_function_proto_apply_3 _ _ y => out_of_specret y + + | spec_function_proto_bind_1 _ _ _ => None + | spec_function_proto_bind_2 _ _ _ => None + | spec_function_proto_bind_3 _ y => out_of_specret y + | spec_function_proto_bind_4 _ _ => None + | spec_function_proto_bind_5 _ => None + | spec_function_proto_bind_6 _ o => Some o + | spec_function_proto_bind_7 _ o => Some o + + | spec_create_new_function_in execution_ctx _ _ => None + + | spec_call _ _ _ => None + | spec_call_1 _ _ _ _ => None + + | spec_call_prealloc _ _ _ => None + + | spec_call_default _ _ _ => None + | spec_call_default_1 _ => None + | spec_call_default_2 _ => None + | spec_call_default_3 o => Some o + + | spec_construct _ _ => None + | spec_construct_1 _ _ _ => None + + | spec_construct_prealloc _ _ => None + + | spec_construct_default _ _ => None + | spec_construct_default_1 _ _ o => Some o + | spec_construct_default_2 _ o => Some o + + | spec_construct_1_after_bind _ _ _ => None + + | spec_construct_bool_1 o => Some o + + | spec_construct_number_1 o => Some o + + | spec_call_global_is_nan_1 o => Some o + | spec_call_global_is_finite_1 o => Some o + + | spec_call_object_call_1 _ _ => None + | spec_call_object_new_1 _ => None + | spec_call_object_get_proto_of_1 _ => None + | spec_call_object_is_extensible_1 _ => None + + | spec_call_object_define_props_1 _ _ => None + | spec_call_object_define_props_2 o _ => Some o + | spec_call_object_define_props_3 _ _ _ _ => None + | spec_call_object_define_props_4 o _ _ _ _ _ => Some o + | spec_call_object_define_props_5 _ _ _ _ _ y => out_of_specret y + | spec_call_object_define_props_6 _ _ => None + | spec_call_object_define_props_7 o _ _ => Some o + + | spec_call_object_create_1 _ _ => None + | spec_call_object_create_2 o _ _ => Some o + | spec_call_object_create_3 _ _ => None + + | spec_call_object_seal_1 _ => None + | spec_call_object_seal_2 _ _ => None + | spec_call_object_seal_3 _ _ _ y => out_of_specret y + | spec_call_object_seal_4 _ _ o => Some o + + | spec_call_object_is_sealed_1 _ => None + | spec_call_object_is_sealed_2 _ _ => None + | spec_call_object_is_sealed_3 _ _ y => out_of_specret y + + | spec_call_object_freeze_1 _ => None + | spec_call_object_freeze_2 _ _ => None + | spec_call_object_freeze_3 _ _ _ y => out_of_specret y + | spec_call_object_freeze_4 _ _ _ _ => None + | spec_call_object_freeze_5 _ _ o => Some o + + | spec_call_object_is_frozen_1 _ => None + | spec_call_object_is_frozen_2 _ _ => None + | spec_call_object_is_frozen_3 _ _ y => out_of_specret y + | spec_call_object_is_frozen_4 _ _ _ => None + | spec_call_object_is_frozen_5 _ _ _ => None + + + | spec_call_object_prevent_extensions_1 _ => None + + | spec_call_object_define_prop_1 _ _ _ => None + | spec_call_object_define_prop_2 _ o _ => Some o + | spec_call_object_define_prop_3 _ _ y => out_of_specret y + | spec_call_object_define_prop_4 _ o => Some o + + | spec_call_object_get_own_prop_descriptor_1 _ _ => None + | spec_call_object_get_own_prop_descriptor_2 _ o => Some o + + | spec_call_object_proto_to_string_1 _ => None + | spec_call_object_proto_to_string_2 o => Some o + + | spec_call_object_proto_has_own_prop_1 o _ => Some o + | spec_call_object_proto_has_own_prop_2 o _ => Some o + | spec_call_object_proto_has_own_prop_3 y => out_of_specret y + + | spec_call_object_proto_is_prototype_of_2_1 _ _ => None + | spec_call_object_proto_is_prototype_of_2_2 o _ => Some o + | spec_call_object_proto_is_prototype_of_2_3 _ _ => None + | spec_call_object_proto_is_prototype_of_2_4 _ _ => None + + | spec_call_object_proto_prop_is_enumerable_1 _ _ => None + | spec_call_object_proto_prop_is_enumerable_2 _ o => Some o + | spec_call_object_proto_prop_is_enumerable_3 o _ => Some o + | spec_call_object_proto_prop_is_enumerable_4 y => out_of_specret y + + | spec_call_array_new_1 _ => None + | spec_call_array_new_2 _ _ => None + | spec_call_array_new_3 _ _ _ => None + + | spec_call_array_new_single_1 _ => None + | spec_call_array_new_single_2 _ _ => None + | spec_call_array_new_single_3 _ _ y => out_of_specret y + | spec_call_array_new_single_4 _ _ => None + + | spec_call_array_is_array_1 _ => None + | spec_call_array_is_array_2_3 _ => None + + | spec_call_array_proto_join o _ => Some o + | spec_call_array_proto_join_1 _ o _ => Some o + | spec_call_array_proto_join_2 _ y _ => out_of_specret y + | spec_call_array_proto_join_3 _ _ _ => None + | spec_call_array_proto_join_4 _ _ o => Some o + | spec_call_array_proto_join_5 _ _ _ y => out_of_specret y + + | spec_call_array_proto_join_elements _ _ _ _ _ => None + | spec_call_array_proto_join_elements_1 _ _ _ _ _ => None + | spec_call_array_proto_join_elements_2 _ _ _ _ _ y => out_of_specret y + + | spec_call_array_proto_to_string o => Some o + | spec_call_array_proto_to_string_1 _ o => Some o + + | spec_call_array_proto_pop_1 o => Some o + | spec_call_array_proto_pop_2 _ o => Some o + | spec_call_array_proto_pop_3 _ y => out_of_specret y + | spec_call_array_proto_pop_3_empty_1 _ => None + | spec_call_array_proto_pop_3_empty_2 o => Some o + | spec_call_array_proto_pop_3_nonempty_1 _ _ => None + | spec_call_array_proto_pop_3_nonempty_2 _ o => Some o + | spec_call_array_proto_pop_3_nonempty_3 _ _ o => Some o + | spec_call_array_proto_pop_3_nonempty_4 _ _ _ o => Some o + | spec_call_array_proto_pop_3_nonempty_5 _ o => Some o + + | spec_call_array_proto_push_1 o _ => Some o + | spec_call_array_proto_push_2 _ _ o => Some o + | spec_call_array_proto_push_3 _ _ y => out_of_specret y + | spec_call_array_proto_push_4 _ _ _ => None + | spec_call_array_proto_push_4_nonempty_1 _ _ _ _ => None + | spec_call_array_proto_push_4_nonempty_2 _ _ _ _ o => Some o + | spec_call_array_proto_push_4_nonempty_3 _ _ _ _ o => Some o + | spec_call_array_proto_push_5 _ _ => None + | spec_call_array_proto_push_6 _ o => Some o + + | spec_call_string_non_empty o => Some o + + | spec_construct_string_1 _ => None + | spec_construct_string_2 o => Some o + + | spec_call_bool_proto_to_string_1 o => Some o + | spec_call_bool_proto_value_of_1 _ => None + | spec_call_bool_proto_value_of_2 _ => None + + | spec_call_number_proto_to_string_1 _ _ => None + | spec_call_number_proto_to_string_2 _ o => Some o + | spec_call_number_proto_value_of_1 _ => None + + | spec_call_error_proto_to_string_1 _ => None + | spec_call_error_proto_to_string_2 _ o => Some o + | spec_call_error_proto_to_string_3 _ o => Some o + | spec_call_error_proto_to_string_4 _ _ o => Some o + | spec_call_error_proto_to_string_5 _ _ o => Some o + | spec_call_error_proto_to_string_6 _ _ o => Some o + + | spec_returns o => Some o + end. + +Definition out_of_ext_stat (p : ext_stat) : option out := + match p with + | stat_expr_1 (specret_out o) => Some o + | stat_expr_1 (specret_val _ _) => None + | stat_basic _ => None + + | stat_block_1 o _ => Some o + | stat_block_2 _ o => Some o + + | stat_label_1 _ o => Some o + + | stat_var_decl_1 o _ => Some o + | stat_var_decl_item _ => None + | stat_var_decl_item_1 _ y _ => out_of_specret y + | stat_var_decl_item_2 _ _ y => out_of_specret y + | stat_var_decl_item_3 _ o => Some o + + | stat_if_1 y _ _ => out_of_specret y + + | stat_while_1 _ _ _ _ => None + | stat_while_2 _ _ _ _ y => out_of_specret y + | stat_while_3 _ _ _ _ o => Some o + | stat_while_4 _ _ _ _ _ => None + | stat_while_5 _ _ _ _ _ => None + | stat_while_6 _ _ _ _ _ => None + + | stat_do_while_1 _ _ _ _ => None + | stat_do_while_2 _ _ _ _ o => Some o + | stat_do_while_3 _ _ _ _ _ => None + | stat_do_while_4 _ _ _ _ _ => None + | stat_do_while_5 _ _ _ _ _ => None + | stat_do_while_6 _ _ _ _ => None + | stat_do_while_7 _ _ _ _ y => out_of_specret y + + | stat_for_1 _ y _ _ _ => out_of_specret y + | stat_for_2 _ _ _ _ _ => None + | stat_for_3 _ _ _ y _ _ => out_of_specret y + | stat_for_4 _ _ _ _ _ => None + | stat_for_5 _ _ _ o _ _ => Some o + | stat_for_6 _ _ _ _ _ _ => None + | stat_for_7 _ _ _ _ _ _ => None + | stat_for_8 _ _ _ _ _ => None + | stat_for_9 _ _ _ _ y _ => out_of_specret y + | stat_for_var_1 o _ _ _ _ => Some o + + | stat_with_1 _ y => out_of_specret y + + | stat_throw_1 y => out_of_specret y + + | stat_return_1 y => out_of_specret y + + | stat_try_1 o _ _ => Some o + | stat_try_2 o _ _ _ => Some o + | stat_try_3 o _ => Some o + | stat_try_4 _ _ => None + | stat_try_5 _ o => Some o + + | stat_switch_1 y _ _ => out_of_specret y + | stat_switch_2 o _ => Some o + | stat_switch_nodefault_1 _ _ _=> None + | stat_switch_nodefault_2 y _ _ _ _ => out_of_specret y + | stat_switch_nodefault_3 _ _ _ _ _ => None + | stat_switch_nodefault_4 o _ => Some o + | stat_switch_nodefault_5 _ _ => None + | stat_switch_nodefault_6 _ o _ => Some o + + | stat_switch_default_1 _ _ _ _ _ => None + | stat_switch_default_A_1 _ _ _ _ _ _ => None + | stat_switch_default_A_2 y _ _ _ _ _ _ => out_of_specret y + | stat_switch_default_A_3 _ _ _ _ _ _ _ => None + | stat_switch_default_A_4 _ _ _ _ _ _ => None + | stat_switch_default_A_5 _ o _ _ _ _ => Some o + | stat_switch_default_B_1 _ _ _ _ => None + | stat_switch_default_B_2 y _ _ _ _ _ => out_of_specret y + | stat_switch_default_B_3 _ _ _ _ _ _ => None + | stat_switch_default_B_4 o _ _ => Some o + + | stat_switch_default_5 _ _ _ _ => None + | stat_switch_default_6 o _ => Some o + | stat_switch_default_7 _ _ => None + | stat_switch_default_8 _ o _ => Some o + + end. + +Definition out_of_ext_prog (p : ext_prog) : option out := + match p with + | prog_basic _ => None + | javascript_1 o _ => Some o + | prog_1 o _ => Some o + | prog_2 _ o => Some o + + end. + +Definition out_of_ext_spec (es : ext_spec) : option out := + match es with + | spec_to_int32 _ => None + | spec_to_int32_1 o => Some o + | spec_to_uint32 _ => None + | spec_to_uint32_1 o => Some o + | spec_expr_get_value_conv _ _ => None + | spec_expr_get_value_conv_1 _ y => out_of_specret y + | spec_expr_get_value_conv_2 o => Some o + | spec_convert_twice _ _ => None + | spec_convert_twice_1 o _ => Some o + | spec_convert_twice_2 _ o => Some o + | spec_list_expr _ => None + | spec_list_expr_1 _ _ => None + | spec_list_expr_2 _ y _ => out_of_specret y + | spec_to_descriptor _ => None + | spec_to_descriptor_1a _ _ => None + | spec_to_descriptor_1b o _ _ => Some o + | spec_to_descriptor_1c o _ _ => Some o + | spec_to_descriptor_2a _ _ => None + | spec_to_descriptor_2b o _ _ => Some o + | spec_to_descriptor_2c o _ _ => Some o + | spec_to_descriptor_3a _ _ => None + | spec_to_descriptor_3b o _ _ => Some o + | spec_to_descriptor_3c o _ _ => Some o + | spec_to_descriptor_4a _ _ => None + | spec_to_descriptor_4b o _ _ => Some o + | spec_to_descriptor_4c o _ _ => Some o + | spec_to_descriptor_5a _ _ => None + | spec_to_descriptor_5b o _ _ => Some o + | spec_to_descriptor_5c o _ _ => Some o + | spec_to_descriptor_6a _ _ => None + | spec_to_descriptor_6b o _ _=> Some o + | spec_to_descriptor_6c o _ _ => Some o + | spec_to_descriptor_7 _ _ => None + | spec_object_get_own_prop _ _ => None + | spec_object_get_own_prop_1 _ _ _ => None + | spec_object_get_own_prop_2 _ _ _ => None + | spec_object_get_prop _ _ => None + | spec_object_get_prop_1 _ _ _ => None + | spec_object_get_prop_2 _ _ y => out_of_specret y + | spec_object_get_prop_3 _ _ _ => None + | spec_get_value _ => None + | spec_get_value_ref_b_1 o => Some o + | spec_get_value_ref_c_1 o => Some o + | spec_expr_get_value _ => None + | spec_expr_get_value_1 o => Some o + | spec_lexical_env_get_identifier_ref _ _ _ => None + | spec_lexical_env_get_identifier_ref_1 _ _ _ _ => None + | spec_lexical_env_get_identifier_ref_2 _ _ _ _ o => Some o + | spec_error_spec _ => None + | spec_error_spec_1 o => Some o + | spec_args_obj_get_own_prop_1 _ _ y => out_of_specret y + | spec_args_obj_get_own_prop_2 _ _ _ _ y => out_of_specret y + | spec_args_obj_get_own_prop_3 _ o => Some o + | spec_args_obj_get_own_prop_4 _ => None + | spec_string_get_own_prop_1 _ _ y => out_of_specret y + | spec_string_get_own_prop_2 _ _ y => out_of_specret y + | spec_string_get_own_prop_3 _ _ o => Some o + | spec_string_get_own_prop_4 _ _ => None + | spec_string_get_own_prop_5 _ y => out_of_specret y + | spec_string_get_own_prop_6 _ _ _ => None + | spec_function_proto_apply_get_args _ _ _ => None + | spec_function_proto_apply_get_args_1 _ _ _ o => Some o + | spec_function_proto_apply_get_args_2 _ _ _ o => Some o + | spec_function_proto_apply_get_args_3 _ y => out_of_specret y + | spec_function_proto_bind_length _ _ => None + | spec_function_proto_bind_length_1 _ _ => None + | spec_function_proto_bind_length_2 _ o => Some o + | spec_function_proto_bind_length_3 y _ => out_of_specret y + | spec_call_array_proto_join_vtsfj _ _ => None + | spec_call_array_proto_join_vtsfj_1 _ o => Some o + | spec_call_array_proto_join_vtsfj_2 _ o => Some o + | spec_call_array_proto_join_vtsfj_3 o => Some o + end. + + +(**************************************************************) +(** ** Rules for propagating aborting expressions *) + +(** Definition of a result of type normal *) + +Definition res_is_normal R := + res_type R = restype_normal. + +(** Definition of aborting outcomes: diverging outcomes, + and terminating outcomes that are not of type "normal". *) + +Inductive abort : out -> Prop := + | abort_div : + abort out_div + | abort_not_normal : forall S R, + abrupt_res R -> + abort (out_ter S R). + +(** Definition of the behaviors caught by an exception handler, + and thus not propagated by the generic abort rule *) + +Inductive abort_intercepted_prog : ext_prog -> Prop := + | abort_intercepted_prog_block_2 : forall S R rv, + abort_intercepted_prog (prog_2 rv (out_ter S R)). + +Inductive abort_intercepted_stat : ext_stat -> Prop := + + | abort_intercepted_stat_block_2 : forall S R rv, + abort_intercepted_stat (stat_block_2 rv (out_ter S R)) + | abort_intercepted_stat_label_1 : forall lab rv S R, + R = res_intro restype_break rv lab -> + abort_intercepted_stat (stat_label_1 lab (out_ter S R)) + | abort_intercepted_do_while_2 : forall labs e1 t2 rv S R, + res_label_in R labs -> + (res_type R = restype_continue \/ res_type R = restype_break) -> + abort_intercepted_stat (stat_do_while_2 labs t2 e1 rv (out_ter S R)) + | abort_intercepted_while_3 : forall labs e1 t2 rv S R, + res_label_in R labs -> + (res_type R = restype_continue \/ res_type R = restype_break) -> + abort_intercepted_stat (stat_while_3 labs e1 t2 rv (out_ter S R)) + | abort_intercepted_stat_try_1 : forall S R cb fo, + res_type R = restype_throw -> + abort_intercepted_stat (stat_try_1 (out_ter S R) (Some cb) fo) + | abort_intercepted_stat_try_3 : forall S R fo, + abort_intercepted_stat (stat_try_3 (out_ter S R) fo) + | abort_intercepted_stat_switch_2 : forall S R labs, + res_type R = restype_break -> + res_label_in R labs -> + abort_intercepted_stat (stat_switch_2 (out_ter S R) labs) + | abort_intercepted_stat_switch_nodefault_6 : forall S rv R scs, + abrupt_res R -> + res_type R <> restype_throw -> + abort_intercepted_stat (stat_switch_nodefault_6 rv (out_ter S R) scs) + | abort_intercepted_stat_switch_default_8 : forall S rv R scs, + abrupt_res R -> + res_type R <> restype_throw -> + abort_intercepted_stat (stat_switch_default_8 rv (out_ter S R) scs) + | abort_intercepted_stat_switch_default_A_5 : forall S rv R vi scs ts1 scs2, + abrupt_res R -> + res_type R <> restype_throw -> + abort_intercepted_stat (stat_switch_default_A_5 rv (out_ter S R) vi scs ts1 scs2) + | abort_intercepted_stat_for_6 : forall S0 S C labs rv R eo2 eo3 t, + abort_intercepted_stat (stat_for_6 labs rv eo2 eo3 t R) + | abort_intercepted_stat_for_7 : forall S0 S C labs rv R eo2 eo3 t, + abort_intercepted_stat (stat_for_7 labs rv eo2 eo3 t R) +. + +Inductive abort_intercepted_expr : ext_expr -> Prop := + | abort_intercepted_expr_call_default_2 : forall S R, + res_type R = restype_return -> + abort_intercepted_expr (spec_call_default_3 (out_ter S R)) + | abort_intercepted_expr_call_global_eval_3 : forall S R, + res_type R = restype_throw -> + abort_intercepted_expr (spec_call_global_eval_3 (out_ter S R)). + +Inductive abort_intercepted_spec : ext_spec -> Prop := + . + +(**************************************************************) +(** ** Auxiliary definition used in identifier resolution *) + +(** [spec_identifier_resolution C x] returns the extended expression + which needs to be evaluated in order to perform the lookup + of name [x] in the execution context [C]. Typically, a + reduction rule that performs such a lookup would have a + premise of the form [red_expr S C (identifier_resolution C x) o1]. *) + +Definition spec_identifier_resolution C x := + let lex := execution_ctx_lexical_env C in + let strict := execution_ctx_strict C in + spec_lexical_env_get_identifier_ref lex x strict. + + +(**************************************************************) +(** ** Instantiation of arguments in function calls *) + +Inductive arguments_from : list value -> list value -> Prop := + | arguments_from_nil : forall Vs, + arguments_from Vs nil + | arguments_from_undef : forall Vs: list value, + arguments_from nil Vs -> + arguments_from nil (undef::Vs) + | arguments_from_cons : forall Vs1 Vs2 v, + arguments_from Vs1 Vs2 -> + arguments_from (v::Vs1) (v::Vs2). + +Inductive arguments_first_and_rest : list value -> (value * list value) -> Prop := + | arguments_f_a_r_from_nil : arguments_first_and_rest nil (undef, nil) + | arguments_f_a_r_from_cons : forall v lv, + arguments_first_and_rest (v :: lv) (v, lv). + +Hint Constructors arguments_first_and_rest. + +(**************************************************************) +(** ** Rules for delete_events. *) + +(** [search_proto_chain S l x] returns the location l' of the first object + in the prototype chain of l which contains property x. *) + +Inductive search_proto_chain : state -> object_loc -> prop_name -> option object_loc -> Prop := + | search_proto_chain_found : forall S l x, + object_has_property S l x -> + search_proto_chain S l x (Some l) + | search_proto_chain_not_found : forall S l x, + not (object_has_property S l x) -> + object_proto S l prim_null -> + search_proto_chain S l x None + | search_proto_chain_inductive : forall S l x v l' res, + not (object_has_property S l x) -> + object_proto S l (value_object l') -> + search_proto_chain S l' x res -> + search_proto_chain S l x res. + + +(** [make_delete_event S l x ev] constructs a delete_event "ev" which +records the deletion of the property (l,x) in the state S. *) + +Inductive make_delete_event : state -> object_loc -> prop_name -> event -> Prop := + | make_delete_event_intro : forall S l x res ev, + search_proto_chain S l x res -> + ev = delete_event l x res -> + make_delete_event S l x ev. + +(**************************************************************) +(** ** Auxiliary definitions for the semantics of for-in. *) + +(* LATER *) + + +(**************************************************************) +(** ** Implementation Defined Object *) + +(** As stated in Section 2 of the ECMAScript specification, an + implementation can provide additionnal properties not described in + the specification. **) + +(** As we are only describing the core of JavaScrip here, this + inductive shall be empty. But one can found in the other branches + of this developpment some examples of non-empty instantiation of + this predicate. **) + +Inductive implementation_prealloc : prealloc -> Prop := + . + + +(**************************************************************) +(** Shorthand **) + +Definition vret : state -> value -> specret value := ret (T:=value). +Definition dret : state -> full_descriptor -> specret full_descriptor := ret (T:=full_descriptor). + diff --git a/samples/Coq/Main.v b/samples/Coq/Main.v new file mode 100644 index 0000000000..71d67bc1d4 --- /dev/null +++ b/samples/Coq/Main.v @@ -0,0 +1,42 @@ +Require Import FunctionNinjas.All. +Require Import ListString.All. +Require Import Computation. + +Import C.Notations. + +Definition error (message : LString.t) : C.t := + do_call! Command.ShowError message in + ret. + +Definition main : C.t := + call! card_is_valid := Command.AskCard in + if card_is_valid then + call! pin := Command.AskPIN in + match pin with + | None => error @@ LString.s "No PIN given." + | Some pin => + call! pin_is_valid := Command.CheckPIN pin in + if pin_is_valid then + call! ask_amount := Command.AskAmount in + match ask_amount with + | None => error @@ LString.s "No amount given." + | Some amount => + call! amount_is_valid := Command.CheckAmount amount in + if amount_is_valid then + call! card_is_given := Command.GiveCard in + if card_is_given then + call! amount_is_given := Command.GiveAmount amount in + if amount_is_given then + ret + else + error @@ LString.s "Cannot give you the amount. Please contact your bank." + else + error @@ LString.s "Cannot give you back the card. Please contact your bank." + else + error @@ LString.s "Invalid amount." + end + else + error @@ LString.s "Invalid PIN." + end + else + error @@ LString.s "Invalid card.". diff --git a/samples/Coq/Spec.v b/samples/Coq/Spec.v new file mode 100644 index 0000000000..3013e00c48 --- /dev/null +++ b/samples/Coq/Spec.v @@ -0,0 +1,62 @@ +(** Specifications. *) +Require Import Coq.Lists.List. +Require Import Coq.Strings.Ascii. +Require Import FunctionNinjas.All. +Require Import ListString.All. +Require Import Computation. + +Import ListNotations. +Local Open Scope char. + +(** A run is an execution of the program with explicit answers for the + system calls. *) +Module Run. + (** We define a run by induction on the structure of a computation. *) + Inductive t : C.t -> Type := + | Ret : t C.Ret + | Call : forall (command : Command.t) (answer : Command.answer command) + {handler : Command.answer command -> C.t}, t (handler answer) -> + t (C.Call command handler). + + (** The trace of a run. *) + Fixpoint trace {x : C.t} (run : t x) + : list {command : Command.t & Command.answer command} := + match run with + | Ret => [] + | Call command answer _ run => existT _ command answer :: trace run + end. +End Run. + +Module Temporal. + Module All. + Inductive t (P : Command.t -> Prop) : C.t -> Prop := + | Ret : t P C.Ret + | Call : forall (c : Command.t) (h : Command.answer c -> C.t), + P c -> (forall a, t P (h a)) -> + t P (C.Call c h). + End All. + + Module One. + Inductive t (P : Command.t -> Prop) : C.t -> Prop := + | CallThis : forall (c : Command.t) (h : Command.answer c -> C.t), + P c -> + t P (C.Call c h) + | CallOther : forall (c : Command.t) (h : Command.answer c -> C.t), + (forall a, t P (h a)) -> + t P (C.Call c h). + End One. + + Module Then. + Inductive t (P1 P2 : Command.t -> Prop) : C.t -> Prop := + | Ret : t P1 P2 C.Ret + | Call : forall (c : Command.t) (h : Command.answer c -> C.t), + (forall a, t P1 P2 (h a)) -> + t P1 P2 (C.Call c h) + | CallThen : forall (c : Command.t) (h : Command.answer c -> C.t), + P1 c -> (forall a, One.t P2 (h a)) -> + t P1 P2 (C.Call c h). + End Then. +End Temporal. + +Module CardBeforeMoney. +End CardBeforeMoney. From d3e2ea3f71df97e29cb0ad0f188e0bd8c7798756 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 2 Nov 2016 13:25:50 -0400 Subject: [PATCH 0163/1214] Grammar updates --- vendor/CodeMirror | 2 +- vendor/grammars/ABNF.tmbundle | 2 +- vendor/grammars/c.tmbundle | 2 +- vendor/grammars/language-javascript | 2 +- vendor/grammars/language-jsoniq | 2 +- vendor/grammars/language-viml | 2 +- vendor/grammars/perl.tmbundle | 2 +- vendor/grammars/sublime-rexx | 2 +- vendor/grammars/sublime-rust | 2 +- vendor/grammars/sublime-typescript | 2 +- vendor/grammars/swift.tmbundle | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/vendor/CodeMirror b/vendor/CodeMirror index db12d64243..e6ec325be0 160000 --- a/vendor/CodeMirror +++ b/vendor/CodeMirror @@ -1 +1 @@ -Subproject commit db12d64243ee9d2994e12ffb2935ebac0cbf3c1c +Subproject commit e6ec325be0535893137b26545ec14b1c411fb16d diff --git a/vendor/grammars/ABNF.tmbundle b/vendor/grammars/ABNF.tmbundle index 86a961c91b..d87cd81570 160000 --- a/vendor/grammars/ABNF.tmbundle +++ b/vendor/grammars/ABNF.tmbundle @@ -1 +1 @@ -Subproject commit 86a961c91ba7a48cd9a07bcac5cb63196f0bfe63 +Subproject commit d87cd81570a4828444d3ce6734c0c23ef647ef6c diff --git a/vendor/grammars/c.tmbundle b/vendor/grammars/c.tmbundle index 936e4347d2..90362c89e1 160000 --- a/vendor/grammars/c.tmbundle +++ b/vendor/grammars/c.tmbundle @@ -1 +1 @@ -Subproject commit 936e4347d22d1a821588551ca8f7e960c1242120 +Subproject commit 90362c89e15b6320d726466b0922f2e810f4c223 diff --git a/vendor/grammars/language-javascript b/vendor/grammars/language-javascript index f1cf9a61e8..3228dac47e 160000 --- a/vendor/grammars/language-javascript +++ b/vendor/grammars/language-javascript @@ -1 +1 @@ -Subproject commit f1cf9a61e8f7ef55dd85a8564928f1b36bef4d39 +Subproject commit 3228dac47e8baa6cccce4733690f59f2e023398f diff --git a/vendor/grammars/language-jsoniq b/vendor/grammars/language-jsoniq index 7e2a77f372..5e400b06f1 160000 --- a/vendor/grammars/language-jsoniq +++ b/vendor/grammars/language-jsoniq @@ -1 +1 @@ -Subproject commit 7e2a77f3720f5a221bc9aaa2a136c26a38af3f6a +Subproject commit 5e400b06f1b417746c4c6aff42a2a938b6ef2f82 diff --git a/vendor/grammars/language-viml b/vendor/grammars/language-viml index cec8c86334..c4bd6d26af 160000 --- a/vendor/grammars/language-viml +++ b/vendor/grammars/language-viml @@ -1 +1 @@ -Subproject commit cec8c86334ff5b57ad1d0bdc51323eabd26423d5 +Subproject commit c4bd6d26afcd539e6499a2076a1c617647187644 diff --git a/vendor/grammars/perl.tmbundle b/vendor/grammars/perl.tmbundle index dedebdcfd4..7a786e331d 160000 --- a/vendor/grammars/perl.tmbundle +++ b/vendor/grammars/perl.tmbundle @@ -1 +1 @@ -Subproject commit dedebdcfd43e7be93ea713c1932eb770fcbcea0d +Subproject commit 7a786e331dec2012f2f4321e26cdf8b946a5ae75 diff --git a/vendor/grammars/sublime-rexx b/vendor/grammars/sublime-rexx index a649cf3aef..c263f248ee 160000 --- a/vendor/grammars/sublime-rexx +++ b/vendor/grammars/sublime-rexx @@ -1 +1 @@ -Subproject commit a649cf3aefdade911e71f3cf086678c16b47fbbd +Subproject commit c263f248ee82b98545819d0a618edec8229165ab diff --git a/vendor/grammars/sublime-rust b/vendor/grammars/sublime-rust index 9792e3be0e..3bc8200ec7 160000 --- a/vendor/grammars/sublime-rust +++ b/vendor/grammars/sublime-rust @@ -1 +1 @@ -Subproject commit 9792e3be0e470231f8c36eff19441a1813950f7c +Subproject commit 3bc8200ec709ce9ceaa9f73117f6c2efa3265a0b diff --git a/vendor/grammars/sublime-typescript b/vendor/grammars/sublime-typescript index 3475f8febc..9b60d84069 160000 --- a/vendor/grammars/sublime-typescript +++ b/vendor/grammars/sublime-typescript @@ -1 +1 @@ -Subproject commit 3475f8febcdd02b10477903652dd82a03cb3acac +Subproject commit 9b60d84069614addb8b8a0d491e3f56e6470029a diff --git a/vendor/grammars/swift.tmbundle b/vendor/grammars/swift.tmbundle index 0d618bff2b..841f53ff0c 160000 --- a/vendor/grammars/swift.tmbundle +++ b/vendor/grammars/swift.tmbundle @@ -1 +1 @@ -Subproject commit 0d618bff2bf15aca63a5d529ac00b5b4f2e99918 +Subproject commit 841f53ff0ce3666de05fd0740ecf7709d8d9fdc7 From aa27f18ea695fb9d16261896079baec2c84ac2bb Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 2 Nov 2016 13:33:16 -0400 Subject: [PATCH 0164/1214] Bumping version to v4.8.17 --- lib/linguist/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/version.rb b/lib/linguist/version.rb index 2acc8fabf5..3540174fa4 100644 --- a/lib/linguist/version.rb +++ b/lib/linguist/version.rb @@ -1,3 +1,3 @@ module Linguist - VERSION = "4.8.16" + VERSION = "4.8.17" end From 2a320cb98858889641f35ba447205a5bcf53be54 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Thu, 3 Nov 2016 20:22:21 -0400 Subject: [PATCH 0165/1214] Adding new GitHub staff --- CONTRIBUTING.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 27b419f9bd..e38125eb01 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -81,7 +81,11 @@ Linguist is maintained with :heart: by: - **@Alhadis** - **@arfon** +- **@brandonblack** (GitHub staff) - **@larsbrinkhoff** +- **@lildude** (GitHub staff) +- **@lizzhale** (GitHub staff) +- **@mikemcquaid** (GitHub staff) - **@pchaigno** As Linguist is a production dependency for GitHub we have a couple of workflow restrictions: From 009a4e67b6f46bb06fa01d3c3d0af176ac641cf8 Mon Sep 17 00:00:00 2001 From: Danila Malyutin Date: Sat, 12 Nov 2016 06:11:39 +0300 Subject: [PATCH 0166/1214] add py3 extension to Python --- lib/linguist/languages.yml | 1 + samples/Python/py3.py3 | 1 + 2 files changed, 2 insertions(+) create mode 100644 samples/Python/py3.py3 diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 6e6346a357..f1a3dc13cc 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3372,6 +3372,7 @@ Python: color: "#3572A5" extensions: - ".py" + - ".py3" - ".bzl" - ".cgi" - ".fcgi" diff --git a/samples/Python/py3.py3 b/samples/Python/py3.py3 new file mode 100644 index 0000000000..f7cf60e14f --- /dev/null +++ b/samples/Python/py3.py3 @@ -0,0 +1 @@ +print("Hello, world!") From 00dc775daf12f34615647254f265a02c895481f1 Mon Sep 17 00:00:00 2001 From: Danila Malyutin Date: Sat, 12 Nov 2016 18:46:25 +0300 Subject: [PATCH 0167/1214] Update, according to comments --- lib/linguist/languages.yml | 2 +- samples/Python/py3.py3 | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index f1a3dc13cc..968b152ce6 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3372,12 +3372,12 @@ Python: color: "#3572A5" extensions: - ".py" - - ".py3" - ".bzl" - ".cgi" - ".fcgi" - ".gyp" - ".lmi" + - ".py3" - ".pyde" - ".pyp" - ".pyt" diff --git a/samples/Python/py3.py3 b/samples/Python/py3.py3 index f7cf60e14f..6e52193151 100644 --- a/samples/Python/py3.py3 +++ b/samples/Python/py3.py3 @@ -1 +1,20 @@ -print("Hello, world!") +import random + +guesses = 0 + +number = random.randint(1, 20) + +print("Guess the number between 1 and 20! You have 6 tries.") +while guesses < 6: + guess = int(input("Is it... ")) + + if guess == number: + print("Hooray! You guessed it right!") + break + elif guess < number: + print("It's bigger...") + elif guess > number: + print("It's not so big.") + guesses += 1 +if guesses == 6: + print("You've ran out of tries.") From 202f3c08cd311a58998835c78db21c9a5d0ccbce Mon Sep 17 00:00:00 2001 From: Ahmad Salim Al-Sibahi Date: Mon, 14 Nov 2016 14:29:30 +0100 Subject: [PATCH 0168/1214] Started on adding support for rascal. --- lib/linguist/languages.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 968b152ce6..736a2d093f 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -4830,6 +4830,13 @@ ooc: - ".ooc" ace_mode: text language_id: 418 +Rascal: + type: programming + color: "FFFAA0" + extensions: + - ".rsc" + tm_scope: source.rascal + ace_mode: rascal reStructuredText: type: prose wrap: true From 78b2853d701a0faed47e0206ec2f54559ae8f6ec Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Fri, 18 Nov 2016 23:36:40 +0100 Subject: [PATCH 0169/1214] License of Ant grammar is correctly detected The last version of Licensee can recognize underlined license headers in READMEs --- test/test_grammars.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_grammars.rb b/test/test_grammars.rb index 418fca8a41..7344be30e8 100644 --- a/test/test_grammars.rb +++ b/test/test_grammars.rb @@ -6,7 +6,6 @@ class TestGrammars < Minitest::Test # List of projects that are allowed without licenses PROJECT_WHITELIST = [ "vendor/grammars/Sublime-Lasso", - "vendor/grammars/ant.tmbundle", "vendor/grammars/sublime-spintools", "vendor/grammars/blitzmax" ].freeze @@ -40,6 +39,7 @@ class TestGrammars < Minitest::Test "c9118c370411f2f049c746c0fd096554e877aea2", # perl6fe "8ccf886749c32fb7e65d4d1316a7ed0479c93dc9", # language-less "2f03492b52d7dd83b4e7472f01b87c6121e5b1a4", # monkey + "241e5ddbb4423d792216783e9f668bd670b026e4", # ant.tmbundle "bdab9fdc21e6790b479ccb5945b78bc0f6ce2493" # language-blade ].freeze From 1d2ec4dbc316e4d0fcd250f2696fe545115e55e8 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Tue, 29 Nov 2016 16:42:50 +0100 Subject: [PATCH 0170/1214] Fix error with filenames ending with a dot (#3349) The second negative argument to split instructs it to preserve null fields in the returned array --- lib/linguist/blob.rb | 2 +- test/test_language.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/linguist/blob.rb b/lib/linguist/blob.rb index dc0cf2acf7..4e77bc5850 100644 --- a/lib/linguist/blob.rb +++ b/lib/linguist/blob.rb @@ -63,7 +63,7 @@ def extension # # Returns an Array def extensions - _, *segments = name.downcase.split(".") + _, *segments = name.downcase.split(".", -1) segments.map.with_index do |segment, index| "." + segments[index..-1].join(".") diff --git a/test/test_language.rb b/test/test_language.rb index 67066cc303..7dc7dc5d5b 100644 --- a/test/test_language.rb +++ b/test/test_language.rb @@ -235,6 +235,7 @@ def test_find_by_filename assert_equal [Language['Clojure']], Language.find_by_filename('riemann.config') assert_equal [Language['HTML+Django']], Language.find_by_filename('index.jinja') assert_equal [Language['Chapel']], Language.find_by_filename('examples/hello.chpl') + assert_equal [], Language.find_by_filename('F.I.L.E.') end def test_find_by_interpreter From d46a529b6a0f4e9994bb513e39f6dc672529ee19 Mon Sep 17 00:00:00 2001 From: Kyle Smith Date: Tue, 29 Nov 2016 10:49:41 -0500 Subject: [PATCH 0171/1214] Add support for Thrift-generated PHP code. (#3329) --- lib/linguist/generated.rb | 6 +-- samples/PHP/ThriftGenerated.php | 93 +++++++++++++++++++++++++++++++++ test/test_blob.rb | 1 + 3 files changed, 96 insertions(+), 4 deletions(-) create mode 100644 samples/PHP/ThriftGenerated.php diff --git a/lib/linguist/generated.rb b/lib/linguist/generated.rb index a9ca4914e9..de16e68320 100644 --- a/lib/linguist/generated.rb +++ b/lib/linguist/generated.rb @@ -275,16 +275,14 @@ def generated_protocol_buffer? return lines[0].include?("Generated by the protocol buffer compiler. DO NOT EDIT!") end - APACHE_THRIFT_EXTENSIONS = ['.rb', '.py', '.go', '.js', '.m', '.java', '.h', '.cc', '.cpp'] + APACHE_THRIFT_EXTENSIONS = ['.rb', '.py', '.go', '.js', '.m', '.java', '.h', '.cc', '.cpp', '.php'] # Internal: Is the blob generated by Apache Thrift compiler? # # Returns true or false def generated_apache_thrift? return false unless APACHE_THRIFT_EXTENSIONS.include?(extname) - return false unless lines.count > 1 - - return lines[0].include?("Autogenerated by Thrift Compiler") || lines[1].include?("Autogenerated by Thrift Compiler") + return lines.first(6).any? { |l| l.include?("Autogenerated by Thrift Compiler") } end # Internal: Is the blob a C/C++ header generated by the Java JNI tool javah? diff --git a/samples/PHP/ThriftGenerated.php b/samples/PHP/ThriftGenerated.php new file mode 100644 index 0000000000..0f031ffd06 --- /dev/null +++ b/samples/PHP/ThriftGenerated.php @@ -0,0 +1,93 @@ + array( + 'var' => 'title', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['title'])) { + $this->title = $vals['title']; + } + } + } + + public function getName() { + return 'PullRequest'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->title); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('PullRequest'); + if ($this->title !== null) { + $xfer += $output->writeFieldBegin('title', TType::STRING, 1); + $xfer += $output->writeString($this->title); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} diff --git a/test/test_blob.rb b/test/test_blob.rb index 588360ff11..4294594141 100644 --- a/test/test_blob.rb +++ b/test/test_blob.rb @@ -202,6 +202,7 @@ def test_generated assert sample_blob_memory("JavaScript/gen-js-linguist-thrift.js").generated? assert sample_blob_memory("Ruby/gen-rb-linguist-thrift.rb").generated? assert sample_blob_memory("Objective-C/gen-cocoa-linguist-thrift.m").generated? + assert sample_blob_memory("PHP/ThriftGenerated.php").generated? # Generated JNI assert sample_blob_memory("C/jni_layer.h").generated? From 0980e304b1c588f3c0cdd4079863cf471fdb154f Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Tue, 29 Nov 2016 16:50:44 +0100 Subject: [PATCH 0172/1214] Generate language_id (#3284) * Generate language_id from language names The language_id is generated from the SHA256 hash of the language's name * Test the validity of language ids All languages should have a positive 32bit integer as an id * Update languages.yml header in set-language-ids --- script/set-language-ids | 26 +++++++++++--------------- test/test_language.rb | 8 ++++++++ 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/script/set-language-ids b/script/set-language-ids index ecbe1e764d..6b141ab4b5 100755 --- a/script/set-language-ids +++ b/script/set-language-ids @@ -11,6 +11,8 @@ header = <<-EOF # ace_mode - A String name of the Ace Mode used for highlighting whenever # a file is edited. This must match one of the filenames in http://git.io/3XO_Cg. # Use "text" if a mode does not exist. +# codemirror_mode - A String name of the CodeMirror Mode used for highlighting whenever a file is edited. +# This must match a mode from https://git.io/vi9Fx # wrap - Boolean wrap to enable line wrapping (default: false) # extensions - An Array of associated extensions (the first one is # considered the primary extension, the others should be @@ -20,9 +22,9 @@ header = <<-EOF # search_term - Deprecated: Some languages may be indexed under a # different alias. Avoid defining new exceptions. # language_id - Integer used as a language-name-independent indexed field so that we can rename -# languages in Linguist without reindexing all the code on GitHub. Must not be +# languages in Linguist without reindexing all the code on GitHub. Must not be # changed for existing languages without the explicit permission of GitHub staff. -# color - CSS hex color to represent the language. +# color - CSS hex color to represent the language. Only used if type is "programming" or "prose". # tm_scope - The TextMate scope that represents this programming # language. This should match one of the scopes listed in # the grammars.yml file. Use "none" if there is no grammar @@ -36,21 +38,23 @@ header = <<-EOF # Please keep this list alphabetized. Capitalization comes before lowercase. EOF +require 'digest' generated = true if ARGV[0] == "--force" update = true if ARGV[0] == "--update" +def generate_language_id(language) + Digest::SHA256.hexdigest(language).to_i(16) % (2**30 - 1) +end + if generated puts "You're regenerating all of the language_id attributes for all Linguist " puts "languages defined in languages.yml. This is almost certainly NOT what" puts "you meant to do!" - language_index = 0 - languages = YAML.load(File.read("lib/linguist/languages.yml")) languages.each do |name, vals| - vals.merge!('language_id' => language_index) - language_index += 1 + vals.merge!('language_id' => generate_language_id(name)) end File.write("lib/linguist/languages.yml", header + YAML.dump(languages)) @@ -58,20 +62,12 @@ elsif update puts "Adding new language_id attributes to languages.yml that don't have one set" languages = YAML.load(File.read("lib/linguist/languages.yml")) - # First grab the maximum language_id - language_ids = [] - languages.each { |name, vals| language_ids << vals['language_id'] if vals.has_key?('language_id')} - max_language_id = language_ids.max - puts "Current maximum language_id is #{max_language_id}" - missing_count = 0 - language_index = max_language_id languages.each do |name, vals| unless vals.has_key?('language_id') - language_index += 1 missing_count += 1 - vals.merge!('language_id' => language_index) + vals.merge!('language_id' => generate_language_id(name)) end end diff --git a/test/test_language.rb b/test/test_language.rb index 7dc7dc5d5b..a82040e2cd 100644 --- a/test/test_language.rb +++ b/test/test_language.rb @@ -427,6 +427,14 @@ def test_all_languages_have_a_language_id_set assert missing.empty?, message end + def test_all_languages_have_a_valid_id + invalid = Language.all.select { |language| language.language_id < 0 || language.language_id >= (2**31 - 1) } + + message = "The following languages do not have a valid language_id. Please use script/set-language-ids --update as per the contribution guidelines.\n" + invalid.each { |language| message << "#{language.name}\n" } + assert invalid.empty?, message + end + def test_all_language_id_are_unique duplicates = Language.all.group_by{ |language| language.language_id }.select { |k, v| v.size > 1 }.map(&:first) From 581723748b3539ea273c1f02354632416a9f01d9 Mon Sep 17 00:00:00 2001 From: Santi Aguilera Date: Tue, 29 Nov 2016 13:01:35 -0300 Subject: [PATCH 0173/1214] Added Dangerfile for ruby (#3333) * Added Dangerfile for ruby * rm ant.tmbundle from wlist because has license Travis output says ant.tmbundle has license, so Im removing it from the whitelist (projects without license) * Added sample * New line at EOF * Fix * Remove bad file --- lib/linguist/languages.yml | 1 + samples/Ruby/filenames/Dangerfile | 75 +++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 samples/Ruby/filenames/Dangerfile diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 968b152ce6..35d9d20897 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3686,6 +3686,7 @@ Ruby: - Berksfile - Brewfile - Buildfile + - Dangerfile - Deliverfile - Fastfile - Gemfile diff --git a/samples/Ruby/filenames/Dangerfile b/samples/Ruby/filenames/Dangerfile new file mode 100644 index 0000000000..f8ddfee977 --- /dev/null +++ b/samples/Ruby/filenames/Dangerfile @@ -0,0 +1,75 @@ +# Sometimes its a README fix, or something like that - which isn't relevant for +# including in a CHANGELOG for example +# From https://github.com/danger/danger/blob/master/Dangerfile + +has_app_changes = !git.modified_files.grep(/lib/).empty? +has_test_changes = !git.modified_files.grep(/spec/).empty? +is_version_bump = git.modified_files.sort == ["CHANGELOG.md", "lib/danger/version.rb"].sort + +if has_app_changes && !has_test_changes && !is_version_bump + warn("Tests were not updated", sticky: false) +end + +# Thanks other people! +message(":tada:") if is_version_bump && github.pr_author != "orta" + +# Make a note about contributors not in the organization +unless github.api.organization_member?('danger', github.pr_author) + message "@#{github.pr_author} is not a contributor yet, would you like to join the Danger org?" + + # Pay extra attention if they modify the gemspec + if git.modified_files.include?("*.gemspec") + warn "External contributor has edited the Gemspec" + end +end + +# Mainly to encourage writing up some reasoning about the PR, rather than +# just leaving a title +if github.pr_body.length < 5 + fail "Please provide a summary in the Pull Request description" +end + +# Let people say that this isn't worth a CHANGELOG entry in the PR if they choose +declared_trivial = (github.pr_title + github.pr_body).include?("#trivial") || !has_app_changes + +if !git.modified_files.include?("CHANGELOG.md") && !declared_trivial + fail("Please include a CHANGELOG entry. \nYou can find it at [CHANGELOG.md](https://github.com/danger/danger/blob/master/CHANGELOG.md).", sticky: false) +end + +# Docs are critical, so let's re-run the docs part of the specs and show any issues: +core_plugins_docs = `bundle exec danger plugins lint lib/danger/danger_core/plugins/*.rb --warnings-as-errors` + +# If it failed, fail the build, and include markdown with the output error. +unless $?.success? + # We want to strip ANSI colors for our markdown, and make paths relative + colourless_error = core_plugins_docs.gsub(/\e\[(\d+)(;\d+)*m/, "") + markdown("### Core Docs Errors \n\n#{colourless_error}") + fail("Failing due to documentation issues, see below.", sticky: false) +end + +# Oddly enough, it's quite possible to do some testing of Danger, inside Danger +# So, you can ignore these, if you're looking at the Dangerfile to get ideas. +# +# If these are all empty something has gone wrong, better to raise it in a comment +if git.modified_files.empty? && git.added_files.empty? && git.deleted_files.empty? + fail "This PR has no changes at all, this is likely an issue during development." +end + +# This comes from `./danger_plugins/protect_files.rb` which is automatically parsed by Danger +files.protect_files(path: "danger.gemspec", message: ".gemspec modified", fail_build: false) + +# Ensure that our core plugins all have 100% documentation +core_plugins = Dir.glob("lib/danger/danger_core/plugins/*.rb") +core_lint_output = `bundle exec yard stats #{core_plugins.join ' '} --list-undoc --tag tags` + +if !core_lint_output.include?("100.00%") + fail "The core plugins are not at 100% doc'd - see below:", sticky: false + markdown "```\n#{core_lint_output}```" +elsif core_lint_output.include? "warning" + warn "The core plugins are have yard warnings - see below", sticky: false + markdown "```\n#{core_lint_output}```" +end + +junit.parse "junit-results.xml" +junit.headers = [:file, :name] +junit.report From 12f9295dd71b21d26e4278a77cb36955965ba6f5 Mon Sep 17 00:00:00 2001 From: meganemura Date: Wed, 30 Nov 2016 03:13:33 +0900 Subject: [PATCH 0174/1214] Improve grammar scripts (#3350) * Remove trailing spaces * Setup Bundler in some scripts * Update grammar index * Make prune-grammars script to be callable in a script directory * Prune unused xquery grammar repo source.xq by language-jsoniq is actual tm_scope for XQuery. * Remove xquery submodule git submodule deinit vendor/grammars/xquery/ git rm vendor/grammars/xquery/ * Fix invocation of script/list-grammars This fixes #3339. * Make add-grammars script to be callable in a script directory * Generate samples.json before running list-grammars list-grammars requires linguist. --- .gitmodules | 3 --- grammars.yml | 2 -- script/add-grammar | 5 ++++- script/convert-grammars | 1 + script/list-grammars | 17 +++++++++-------- script/prune-grammars | 9 ++++++--- script/set-language-ids | 2 ++ vendor/README.md | 3 +++ vendor/grammars/xquery | 1 - 9 files changed, 25 insertions(+), 18 deletions(-) delete mode 160000 vendor/grammars/xquery diff --git a/.gitmodules b/.gitmodules index 64144255f4..f7a30d0416 100644 --- a/.gitmodules +++ b/.gitmodules @@ -776,9 +776,6 @@ [submodule "vendor/grammars/vhdl"] path = vendor/grammars/vhdl url = https://github.com/textmate/vhdl.tmbundle -[submodule "vendor/grammars/xquery"] - path = vendor/grammars/xquery - url = https://github.com/textmate/xquery.tmbundle [submodule "vendor/grammars/language-rpm-spec"] path = vendor/grammars/language-rpm-spec url = https://github.com/waveclaw/language-rpm-spec diff --git a/grammars.yml b/grammars.yml index 806c1f9503..0d28c873d0 100755 --- a/grammars.yml +++ b/grammars.yml @@ -653,7 +653,5 @@ vendor/grammars/xc.tmbundle: vendor/grammars/xml.tmbundle: - text.xml - text.xml.xsl -vendor/grammars/xquery: -- source.xquery vendor/grammars/zephir-sublime: - source.php.zephir diff --git a/script/add-grammar b/script/add-grammar index d97d8202ef..f5a8bf115a 100755 --- a/script/add-grammar +++ b/script/add-grammar @@ -78,6 +78,8 @@ https = "https://#{parts[:host]}/#{parts[:user]}/#{parts[:repo]}" repo_new = "vendor/grammars/#{parts[:repo]}" repo_old = parse_submodule($replace) if $replace +Dir.chdir(ROOT) + if repo_old log "Deregistering: #{repo_old}" `git submodule deinit #{repo_old}` @@ -93,4 +95,5 @@ log "Confirming license" `script/licensed --module "#{repo_new}"` log "Updating grammar documentation in vendor/REAEDME.md" -`script list-grammars` +`bundle exec rake samples` +`script/list-grammars` diff --git a/script/convert-grammars b/script/convert-grammars index 2155827f48..64c75d14b2 100755 --- a/script/convert-grammars +++ b/script/convert-grammars @@ -1,5 +1,6 @@ #!/usr/bin/env ruby +require 'bundler/setup' require 'json' require 'net/http' require 'optparse' diff --git a/script/list-grammars b/script/list-grammars index 96e3a35d6b..09aaa09cbb 100755 --- a/script/list-grammars +++ b/script/list-grammars @@ -1,19 +1,20 @@ #!/usr/bin/env ruby +require "bundler/setup" require "linguist" require "json" require "yaml" class GrammarList - + ROOT = File.expand_path "../../", __FILE__ - + def initialize @submodules = load_submodules() @sources = load_sources() @language_names = load_languages() end - + # Load .gitmodules def load_submodules submodules = {} @@ -29,14 +30,14 @@ class GrammarList end submodules end - + # Grab the name of each language, sorted case-insensitively def load_languages Linguist::Language.all.map(&:name).sort do |a, b| a.downcase() <=> b.downcase() end end - + # Load grammars.yml def load_sources sources = {} @@ -46,7 +47,7 @@ class GrammarList end sources end - + # Shorten a repository URL def shorten(url) if url =~ /^https?:\/\/(?:www\.)?github\.com\/([^\/]+\/[^\/]+)/i @@ -57,7 +58,7 @@ class GrammarList url.replace(/^https?:\/\/(?:www\.)?/i, "") end end - + # Markdown: Generate grammar list def to_markdown markdown = "" @@ -87,7 +88,7 @@ class GrammarList markdown end - + # Update the file displaying the reader-friendly list of grammar repos def update_readme readme = "#{ROOT}/vendor/README.md" diff --git a/script/prune-grammars b/script/prune-grammars index 0fab9e6a4e..6fb81236ca 100755 --- a/script/prune-grammars +++ b/script/prune-grammars @@ -1,10 +1,13 @@ #!/usr/bin/env ruby +require "bundler/setup" require "json" require "linguist" require "set" require "yaml" +ROOT = File.expand_path("../../", __FILE__) + def find_includes(json) case json when Hash @@ -32,7 +35,7 @@ def transitive_includes(scope, includes) end includes = {} -Dir["grammars/*.json"].each do |path| +Dir[File.join(ROOT, "grammars/*.json")].each do |path| scope = File.basename(path).sub(/\.json/, '') json = JSON.load(File.read(path)) incs = find_includes(json) @@ -41,7 +44,7 @@ Dir["grammars/*.json"].each do |path| includes[scope] += incs end -yaml = YAML.load(File.read("grammars.yml")) +yaml = YAML.load(File.read(File.join(ROOT, "grammars.yml"))) language_scopes = Linguist::Language.all.map(&:tm_scope).to_set # The set of used scopes is the scopes for each language, plus all the scopes @@ -54,4 +57,4 @@ puts "Unused grammar repos" puts unused.map { |repo, scopes| sprintf("%-100s %s", repo, scopes.join(", ")) }.sort.join("\n") yaml.delete_if { |k| unused.key?(k) } -File.write("grammars.yml", YAML.dump(yaml)) +File.write(File.join(ROOT, "grammars.yml"), YAML.dump(yaml)) diff --git a/script/set-language-ids b/script/set-language-ids index 6b141ab4b5..769b850c94 100755 --- a/script/set-language-ids +++ b/script/set-language-ids @@ -1,4 +1,6 @@ #!/usr/bin/env ruby + +require 'bundler/setup' require 'yaml' require 'pry' diff --git a/vendor/README.md b/vendor/README.md index 7900b209af..0e389ab702 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -6,6 +6,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **1C Enterprise:** [xDrivenDevelopment/atom-language-1c-bsl](https://github.com/xDrivenDevelopment/atom-language-1c-bsl) - **ABAP:** [pvl/abap.tmbundle](https://github.com/pvl/abap.tmbundle) +- **ABNF:** [sanssecours/ABNF.tmbundle](https://github.com/sanssecours/ABNF.tmbundle) - **ActionScript:** [simongregory/actionscript3-tmbundle](https://github.com/simongregory/actionscript3-tmbundle) - **Ada:** [textmate/ada.tmbundle](https://github.com/textmate/ada.tmbundle) - **Agda:** [mokus0/Agda.tmbundle](https://github.com/mokus0/Agda.tmbundle) @@ -91,6 +92,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **DTrace:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) - **Dylan:** [textmate/dylan.tmbundle](https://github.com/textmate/dylan.tmbundle) - **Eagle:** [textmate/xml.tmbundle](https://github.com/textmate/xml.tmbundle) +- **EBNF:** [sanssecours/EBNF.tmbundle](https://github.com/sanssecours/EBNF.tmbundle) - **eC:** [ecere/ec.tmbundle](https://github.com/ecere/ec.tmbundle) - **Ecere Projects:** [textmate/json.tmbundle](https://github.com/textmate/json.tmbundle) - **ECLiPSe:** [alnkpa/sublimeprolog](https://github.com/alnkpa/sublimeprolog) @@ -264,6 +266,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **Puppet:** [russCloak/SublimePuppet](https://github.com/russCloak/SublimePuppet) - **PureScript:** [purescript-contrib/atom-language-purescript](https://github.com/purescript-contrib/atom-language-purescript) - **Python:** [MagicStack/MagicPython](https://github.com/MagicStack/MagicPython) +- **Python console:** [atom/language-python](https://github.com/atom/language-python) - **Python traceback:** [atom/language-python](https://github.com/atom/language-python) - **QMake:** [textmate/cpp-qt.tmbundle](https://github.com/textmate/cpp-qt.tmbundle) - **QML:** [skozlovf/Sublime-QML](https://github.com/skozlovf/Sublime-QML) diff --git a/vendor/grammars/xquery b/vendor/grammars/xquery deleted file mode 160000 index 1908094946..0000000000 --- a/vendor/grammars/xquery +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 19080949463e8eb6fca5ac94d597007a7c3605f8 From 0e9109c3fcdacb17b27581710c7b435086b70485 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 29 Nov 2016 19:14:25 +0100 Subject: [PATCH 0175/1214] Add Nunjucks highlighting (#3341) --- lib/linguist/languages.yml | 5 +++- samples/HTML+Django/nunjucks.njk | 48 ++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 samples/HTML+Django/nunjucks.njk diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 35d9d20897..da4aa88913 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1659,13 +1659,16 @@ HTML+Django: tm_scope: text.html.django group: HTML extensions: - - ".mustache" - ".jinja" + - ".mustache" + - ".njk" aliases: - django - html+django/jinja - html+jinja - htmldjango + - njk + - nunjucks ace_mode: django codemirror_mode: django codemirror_mime_type: text/x-django diff --git a/samples/HTML+Django/nunjucks.njk b/samples/HTML+Django/nunjucks.njk new file mode 100644 index 0000000000..3370de57ab --- /dev/null +++ b/samples/HTML+Django/nunjucks.njk @@ -0,0 +1,48 @@ +{% from "forms.html" import label as description %} + + +{% macro field(name, value='', type='text') %} +
+ +
+{% endmacro %} + + + + {% extends "head.html" %} + + +{% if horse %} + Chuck Norris once kicked a horse in the chin. Its descendants are known today as Giraffes. +{% elif optimus %} + Chuck Norris once urinated in a semi truck's gas tank as a joke....that truck is now known as Optimus Prime. +{% else %} + Chuck Norris threw a grenade and killed 50 people, then the grenade exploded. +{% endif %} + +{% block left %} + This is the left side! +{% endblock %} + +{% block right %} + This is the right side! +{% endblock %} + +{{ description('Username') }} +{{ field('user') }} +{{ field('pass', type='password') }} + +

Posts

+
    + {% for item in items %} +
  • {{ item.title }}
  • + {% else %} +
  • This would display if the 'item' collection were empty
  • + {% endfor %} +
+ +{# Don't escape foo #} +{{ foo | safe }} + + From c87976330f84c198701d72218648456968efa5f7 Mon Sep 17 00:00:00 2001 From: Ahmad Salim Al-Sibahi Date: Tue, 29 Nov 2016 23:15:16 +0100 Subject: [PATCH 0176/1214] Added Rascal Grammar Link --- .gitmodules | 3 ++ grammars.yml | 2 ++ vendor/grammars/rascal-syntax-highlighting | 1 + .../grammar/rascal-syntax-highlighting.txt | 30 +++++++++++++++++++ 4 files changed, 36 insertions(+) create mode 160000 vendor/grammars/rascal-syntax-highlighting create mode 100644 vendor/licenses/grammar/rascal-syntax-highlighting.txt diff --git a/.gitmodules b/.gitmodules index 64144255f4..63f3695125 100644 --- a/.gitmodules +++ b/.gitmodules @@ -803,3 +803,6 @@ [submodule "vendor/grammars/EBNF.tmbundle"] path = vendor/grammars/EBNF.tmbundle url = https://github.com/sanssecours/EBNF.tmbundle +[submodule "vendor/grammars/rascal-syntax-highlighting"] + path = vendor/grammars/rascal-syntax-highlighting + url = https://github.com/usethesource/rascal-syntax-highlighting diff --git a/grammars.yml b/grammars.yml index 806c1f9503..5a93eca2a4 100755 --- a/grammars.yml +++ b/grammars.yml @@ -531,6 +531,8 @@ vendor/grammars/python-django.tmbundle: vendor/grammars/r.tmbundle: - source.r - text.tex.latex.rd +vendor/grammars/rascal-syntax-highlighting: +- source.rascal vendor/grammars/ruby-haml.tmbundle: - text.haml vendor/grammars/ruby-slim.tmbundle: diff --git a/vendor/grammars/rascal-syntax-highlighting b/vendor/grammars/rascal-syntax-highlighting new file mode 160000 index 0000000000..3f0d87fef1 --- /dev/null +++ b/vendor/grammars/rascal-syntax-highlighting @@ -0,0 +1 @@ +Subproject commit 3f0d87fef146edf4c1d8bccbfe6e35b90b31fedf diff --git a/vendor/licenses/grammar/rascal-syntax-highlighting.txt b/vendor/licenses/grammar/rascal-syntax-highlighting.txt new file mode 100644 index 0000000000..5506b61b3d --- /dev/null +++ b/vendor/licenses/grammar/rascal-syntax-highlighting.txt @@ -0,0 +1,30 @@ +--- +type: grammar +name: rascal-syntax-highlighting +license: bsd-2-clause +--- +BSD 2-Clause License + +Copyright (c) 2016, Ahmad Salim Al-Sibahi +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. From 4e6e58a0999b60a99c6d9259f392501a5f03fb31 Mon Sep 17 00:00:00 2001 From: Ahmad Salim Al-Sibahi Date: Tue, 29 Nov 2016 23:37:34 +0100 Subject: [PATCH 0177/1214] Added Example Rascal files --- samples/Rascal/Analyze.rsc | 10 + samples/Rascal/Compile.rsc | 18 + samples/Rascal/Rascal.rsc | 887 +++++++++++++++++++++++++++++++++++++ samples/Rascal/Syntax.rsc | 8 + 4 files changed, 923 insertions(+) create mode 100644 samples/Rascal/Analyze.rsc create mode 100644 samples/Rascal/Compile.rsc create mode 100644 samples/Rascal/Rascal.rsc create mode 100644 samples/Rascal/Syntax.rsc diff --git a/samples/Rascal/Analyze.rsc b/samples/Rascal/Analyze.rsc new file mode 100644 index 0000000000..3a56a2d424 --- /dev/null +++ b/samples/Rascal/Analyze.rsc @@ -0,0 +1,10 @@ +module Analyze + +import Syntax; + +set[Id] unreachable(Machine m) { + r = { | (State)`state ` <- m.states, + (Trans)`: ` <- ts }+; + qs = [ q.name | /State q := m ]; + return { q | q <- qs, q notin r[qs[0]] }; +} diff --git a/samples/Rascal/Compile.rsc b/samples/Rascal/Compile.rsc new file mode 100644 index 0000000000..2ebe7659f9 --- /dev/null +++ b/samples/Rascal/Compile.rsc @@ -0,0 +1,18 @@ +module Compile + +import Syntax; + +str compile(Machine m) = + "while (true) { + ' event = input.next(); + ' switch (current) { + ' + ' case \"\": + ' + ' if (event.equals(\"\")) + ' current = \"\"; + ' <}> + ' break; + ' <}> + ' } + '}"; diff --git a/samples/Rascal/Rascal.rsc b/samples/Rascal/Rascal.rsc new file mode 100644 index 0000000000..92ae4ae773 --- /dev/null +++ b/samples/Rascal/Rascal.rsc @@ -0,0 +1,887 @@ + @license{ + Copyright (c) 2009-2015 CWI + All rights reserved. This program and the accompanying materials + are made available under the terms of the Eclipse Public License v1.0 + which accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html +} +@contributor{Jurgen J. Vinju - Jurgen.Vinju@cwi.nl - CWI} +@contributor{Tijs van der Storm - Tijs.van.der.Storm@cwi.nl} +@contributor{Paul Klint - Paul.Klint@cwi.nl - CWI} +@contributor{Arnold Lankamp - Arnold.Lankamp@cwi.nl} +@contributor{Michael Steindorfer - Michael.Steindorfer@cwi.nl - CWI} +@doc{The syntax definition of Rascal, excluding concrete syntax fragments} +module lang::rascal::\syntax::Rascal + +lexical BooleanLiteral + = "true" + | "false" ; + +syntax Literal + = integer: IntegerLiteral integerLiteral + | regExp: RegExpLiteral regExpLiteral + | \real: RealLiteral realLiteral + | boolean: BooleanLiteral booleanLiteral + | string: StringLiteral stringLiteral + | dateTime: DateTimeLiteral dateTimeLiteral + | location: LocationLiteral locationLiteral + | rational: RationalLiteral rationalLiteral + ; + +syntax Expression = concrete: Concrete concrete; +syntax Pattern = concrete: Concrete concrete; + +lexical Concrete + = typed: "(" LAYOUTLIST l1 Sym symbol LAYOUTLIST l2 ")" LAYOUTLIST l3 "`" ConcretePart* parts "`"; + +lexical ConcretePart + = @category="MetaSkipped" text : ![`\<\>\\\n]+ !>> ![`\<\>\\\n] + | newline: "\n" [\ \t \u00A0 \u1680 \u2000-\u200A \u202F \u205F \u3000]* "\'" + | @category="MetaVariable" hole : ConcreteHole hole + | @category="MetaSkipped" lt: "\\\<" + | @category="MetaSkipped" gt: "\\\>" + | @category="MetaSkipped" bq: "\\`" + | @category="MetaSkipped" bs: "\\\\" + ; + +syntax ConcreteHole + = \one: "\<" Sym symbol Name name "\>" + ; + +start syntax Module + = \default: Header header Body body ; + +syntax ModuleParameters + = \default: "[" {TypeVar ","}+ parameters "]" ; + +lexical DateAndTime + = "$" DatePart "T" TimePartNoTZ !>> [+\-] "$" + | "$" DatePart "T" TimePartNoTZ TimeZonePart "$"; + +syntax Strategy + = topDownBreak: "top-down-break" + | topDown: "top-down" + | bottomUp: "bottom-up" + | bottomUpBreak: "bottom-up-break" + | outermost: "outermost" + | innermost: "innermost" ; + +lexical UnicodeEscape + = utf16: "\\" [u] [0-9 A-F a-f] [0-9 A-F a-f] [0-9 A-F a-f] [0-9 A-F a-f] + | utf32: "\\" [U] (("0" [0-9 A-F a-f]) | "10") [0-9 A-F a-f] [0-9 A-F a-f] [0-9 A-F a-f] [0-9 A-F a-f] // 24 bits + | ascii: "\\" [a] [0-7] [0-9A-Fa-f] + ; + +syntax Variable + = initialized: Name name "=" Expression initial + | unInitialized: Name name ; + +lexical OctalIntegerLiteral + = [0] [0-7]+ !>> [0-9 A-Z _ a-z] ; + +syntax TypeArg + = \default: Type type + | named: Type type Name name ; + +syntax Renaming + = \default: Name from "=\>" Name to ; + +syntax Catch + = \default: "catch" ":" Statement body + | binding: "catch" Pattern pattern ":" Statement body ; + +lexical PathChars + = URLChars [|] ; + +syntax Signature + = withThrows: FunctionModifiers modifiers Type type Name name Parameters parameters "throws" {Type ","}+ exceptions + | noThrows: FunctionModifiers modifiers Type type Name name Parameters parameters ; + +syntax Sym +// named non-terminals + = nonterminal: Nonterminal nonterminal !>> "[" + | parameter: "&" Nonterminal nonterminal + | parametrized: Nonterminal nonterminal >> "[" "[" {Sym ","}+ parameters "]" + | \start: "start" "[" Nonterminal nonterminal "]" + | labeled: Sym symbol NonterminalLabel label +// literals + | characterClass: Class charClass + | literal: StringConstant string + | caseInsensitiveLiteral: CaseInsensitiveStringConstant cistring +// regular expressions + | iter: Sym symbol "+" + | iterStar: Sym symbol "*" + | iterSep: "{" Sym symbol Sym sep "}" "+" + | iterStarSep: "{" Sym symbol Sym sep "}" "*" + | optional: Sym symbol "?" + | alternative: "(" Sym first "|" {Sym "|"}+ alternatives ")" + | sequence: "(" Sym first Sym+ sequence ")" + // TODO: MinimalIter: Sym symbol IntegerConstant minimal "+" + // TODO: MinimalIterSep: "{" Sym symbol Symbol sep "}" IntegerConstant minimal "+" + // TODO | Permutation: "(" Sym first "~" {Sym "~"}+ participants ")" + // TODO | Combination: "(" Sym first "#" {Sym "#"}+ elements ")" + | empty: "(" ")" +// conditionals + | column: Sym symbol "@" IntegerLiteral column + | endOfLine: Sym symbol "$" + | startOfLine: "^" Sym symbol + | except: Sym symbol "!" NonterminalLabel label + > + assoc ( + left ( follow: Sym symbol "\>\>" Sym match + | notFollow: Sym symbol "!\>\>" Sym match + ) + | + right ( precede: Sym match "\<\<" Sym symbol + | notPrecede: Sym match "!\<\<" Sym symbol + ) + ) + > + left unequal: Sym symbol "\\" Sym match + ; + +lexical TimePartNoTZ + = [0-2] [0-9] [0-5] [0-9] [0-5] [0-9] ([, .] [0-9] ([0-9] [0-9]?)?)? + | [0-2] [0-9] ":" [0-5] [0-9] ":" [0-5] [0-9] ([, .] [0-9] ([0-9] [0-9]?)?)? + ; + +syntax Header + = parameters: Tags tags "module" QualifiedName name ModuleParameters params Import* imports + | \default: Tags tags "module" QualifiedName name Import* imports ; + +lexical Name + // Names are surrounded by non-alphabetical characters, i.e. we want longest match. + = ([A-Z a-z _] !<< [A-Z _ a-z] [0-9 A-Z _ a-z]* !>> [0-9 A-Z _ a-z]) \ RascalKeywords + | [\\] [A-Z _ a-z] [\- 0-9 A-Z _ a-z]* !>> [\- 0-9 A-Z _ a-z] + ; + +syntax SyntaxDefinition + = @Foldable \layout : Visibility vis "layout" Sym defined "=" Prod production ";" + | @Foldable \lexical : "lexical" Sym defined "=" Prod production ";" + | @Foldable \keyword : "keyword" Sym defined "=" Prod production ";" + | @Foldable language: Start start "syntax" Sym defined "=" Prod production ";" ; + +syntax Kind + = function: "function" + | variable: "variable" + | \all: "all" + | \anno: "anno" + | \data: "data" + | view: "view" + | \alias: "alias" + | \module: "module" + | \tag: "tag" ; + +syntax ImportedModule + = \default: QualifiedName name + | actualsRenaming: QualifiedName name ModuleActuals actuals Renamings renamings + | renamings: QualifiedName name Renamings renamings + | actuals: QualifiedName name ModuleActuals actuals + ; + +syntax Target + = empty: + | labeled: Name name ; + +syntax IntegerLiteral + = /*prefer()*/ decimalIntegerLiteral: DecimalIntegerLiteral decimal + | /*prefer()*/ hexIntegerLiteral: HexIntegerLiteral hex + | /*prefer()*/ octalIntegerLiteral: OctalIntegerLiteral octal ; + +syntax FunctionBody + = \default: "{" Statement* statements "}" ; + +syntax Expression + = nonEmptyBlock : "{" Statement+ statements "}" + | bracket \bracket: "(" Expression expression ")" + | closure : Type type Parameters parameters "{" Statement+ statements "}" + | stepRange : "[" Expression first "," Expression second ".." Expression last "]" + | voidClosure : Parameters parameters "{" Statement* statements0 "}" + | \visit : Label label Visit visit + | reducer : "(" Expression init "|" Expression result "|" {Expression ","}+ generators ")" + | reifiedType : "type" "(" Expression symbol "," Expression definitions ")" + | callOrTree : Expression!transitiveClosure!transitiveReflexiveClosure!isDefined expression "(" {Expression ","}* arguments KeywordArguments[Expression] keywordArguments ")" + | literal : Literal literal + | \any : "any" "(" {Expression ","}+ generators ")" + | \all : "all" "(" {Expression ","}+ generators ")" + | comprehension : Comprehension comprehension + | \set : "{" {Expression ","}* elements0 "}" + | \list : "[" {Expression ","}* elements0 "]" + | reifyType : "#" Type type !>> "[" !selector + | range : "[" Expression first ".." Expression last "]" + | \tuple : "\<" {Expression ","}+ elements "\>" + | \map : "(" {Mapping[Expression] ","}* mappings ")" + | \it : [A-Z a-z _] !<< "it" !>> [A-Z a-z _] + | qualifiedName : QualifiedName qualifiedName + | subscript : Expression expression!transitiveClosure!transitiveReflexiveClosure!isDefined "[" {Expression ","}+ subscripts "]" + | slice : Expression expression!transitiveClosure!transitiveReflexiveClosure!isDefined "[" OptionalExpression optFirst ".." OptionalExpression optLast "]" + | sliceStep : Expression expression!transitiveClosure!transitiveReflexiveClosure!isDefined "[" OptionalExpression optFirst "," Expression second ".." OptionalExpression optLast "]" + | fieldAccess : Expression expression "." Name field + | fieldUpdate : Expression expression "[" Name key "=" Expression replacement "]" + | fieldProject : Expression expression!transitiveClosure!transitiveReflexiveClosure!isDefined "\<" {Field ","}+ fields "\>" + | setAnnotation: Expression expression "[" "@" Name name "=" Expression value "]" + | getAnnotation: Expression expression >> "@" "@" Name name + | is : Expression expression "is" Name name + | has : Expression expression "has" Name name + | transitiveClosure: Expression argument "+" !>> "=" + | transitiveReflexiveClosure: Expression argument "*" !>> "=" + > isDefined : Expression argument "?" + > negation : "!" Expression!match!noMatch argument + | negative : "-" Expression argument + | non-assoc splice : "*" Expression argument + | asType : "[" Type type "]" Expression!match!noMatch argument + > left composition: Expression lhs "o" Expression rhs + > left ( product: Expression lhs "*" () !>> "*" Expression!noMatch!match rhs + | \join : Expression lhs "join" Expression rhs + | remainder: Expression lhs "%" Expression rhs + | division: Expression lhs "/" Expression rhs + ) + > left intersection: Expression lhs "&" !>> "&" Expression rhs + > left ( addition : Expression lhs "+" Expression!noMatch!match rhs + | subtraction: Expression!transitiveClosure!transitiveReflexiveClosure lhs "-" Expression rhs + | appendAfter: Expression lhs "\<\<" !>> "=" Expression rhs + | insertBefore: Expression lhs "\>\>" Expression rhs + ) + > left modulo: Expression lhs "mod" Expression rhs + > non-assoc ( notIn: Expression lhs "notin" Expression rhs + | \in: Expression lhs "in" Expression rhs + ) + > non-assoc ( greaterThanOrEq: Expression lhs "\>=" Expression rhs + | lessThanOrEq : Expression lhs "\<=" Expression rhs + | lessThan : Expression lhs "\<" !>> "-" Expression rhs + | greaterThan : Expression lhs "\>" Expression rhs + ) + > non-assoc ( equals : Expression lhs "==" Expression rhs + | nonEquals : Expression lhs "!=" Expression rhs + ) + > non-assoc ifDefinedOtherwise: Expression lhs "?" Expression rhs + > non-assoc ( noMatch: Pattern pattern "!:=" Expression expression + | match: Pattern pattern ":=" Expression expression + | enumerator: Pattern pattern "\<-" Expression expression + ) + > non-assoc ( implication: Expression lhs "==\>" Expression rhs + | equivalence: Expression lhs "\<==\>" Expression rhs + ) + > left and: Expression lhs "&&" Expression rhs + > left or: Expression lhs "||" Expression rhs + > right ifThenElse: Expression condition "?" Expression thenExp ":" Expression elseExp + ; + +syntax OptionalExpression + = expression: Expression expression + | noExpression: () + ; + +syntax UserType + = name: QualifiedName name + | parametric: QualifiedName name >> "[" "[" {Type ","}+ parameters "]" ; + +syntax Import + = \extend: "extend" ImportedModule module ";" + | \default: "import" ImportedModule module ";" + | \external: "import" QualifiedName name "=" LocationLiteral at ";" + | \syntax: SyntaxDefinition syntax ; + +syntax Body + = toplevels: Toplevel* toplevels ; + +lexical URLChars + = ![\t-\n \r \ \< |]* ; + +lexical TimeZonePart + = [+ \-] [0-1] [0-9] ":" [0-5] [0-9] + | "Z" + | [+ \-] [0-1] [0-9] + | [+ \-] [0-1] [0-9] [0-5] [0-9] + ; + +syntax ProtocolPart + = nonInterpolated: ProtocolChars protocolChars + | interpolated: PreProtocolChars pre Expression expression ProtocolTail tail ; + +syntax StringTemplate + = ifThen : "if" "(" {Expression ","}+ conditions ")" "{" Statement* preStats StringMiddle body Statement* postStats "}" + | ifThenElse: "if" "(" {Expression ","}+ conditions ")" "{" Statement* preStatsThen StringMiddle thenString Statement* postStatsThen "}" "else" "{" Statement* preStatsElse StringMiddle elseString Statement* postStatsElse "}" + | \for : "for" "(" {Expression ","}+ generators ")" "{" Statement* preStats StringMiddle body Statement* postStats "}" + | doWhile : "do" "{" Statement* preStats StringMiddle body Statement* postStats "}" "while" "(" Expression condition ")" + | \while : "while" "(" Expression condition ")" "{" Statement* preStats StringMiddle body Statement* postStats "}" ; + +lexical PreStringChars + = @category="Constant" [\"] StringCharacter* [\<] ; + +lexical CaseInsensitiveStringConstant + = @category="Constant" "\'" StringCharacter* chars "\'" ; + +lexical Backslash + = [\\] !>> [/ \< \> \\] ; + +syntax Label + = \default: Name name ":" + | empty: ; + +lexical MidProtocolChars + = "\>" URLChars "\<" ; + +lexical NamedBackslash + = [\\] !>> [\< \> \\] ; + +syntax Field + = index: IntegerLiteral fieldIndex + | name: Name fieldName ; + +lexical JustDate + = "$" DatePart "$"; + +lexical PostPathChars + = "\>" URLChars "|" ; + +syntax PathPart + = nonInterpolated: PathChars pathChars + | interpolated: PrePathChars pre Expression expression PathTail tail ; + +lexical DatePart + = [0-9] [0-9] [0-9] [0-9] "-" [0-1] [0-9] "-" [0-3] [0-9] + | [0-9] [0-9] [0-9] [0-9] [0-1] [0-9] [0-3] [0-9] ; + +syntax FunctionModifier + = java: "java" + | \test: "test" + | \default: "default"; + +syntax Assignment + = ifDefined: "?=" + | division: "/=" + | product: "*=" + | intersection: "&=" + | subtraction: "-=" + | \default: "=" + | addition: "+=" + | \append: "\<\<=" + ; + +syntax Assignable + = bracket \bracket : "(" Assignable arg ")" + | variable : QualifiedName qualifiedName + | subscript : Assignable receiver "[" Expression subscript "]" + | slice : Assignable receiver "[" OptionalExpression optFirst ".." OptionalExpression optLast "]" + | sliceStep : Assignable receiver "[" OptionalExpression optFirst "," Expression second ".." OptionalExpression optLast "]" + | fieldAccess : Assignable receiver "." Name field + | ifDefinedOrDefault: Assignable receiver "?" Expression defaultExpression + | constructor : Name name "(" {Assignable ","}+ arguments ")" + | \tuple : "\<" {Assignable ","}+ elements "\>" + | annotation : Assignable receiver "@" Name annotation ; + +lexical StringConstant + = @category="Constant" "\"" StringCharacter* chars "\"" ; + + + +syntax Assoc + = associative: "assoc" + | left: "left" + | nonAssociative: "non-assoc" + | right: "right" ; + +syntax Replacement + = unconditional: Expression replacementExpression + | conditional: Expression replacementExpression "when" {Expression ","}+ conditions ; + +syntax DataTarget + = empty: + | labeled: Name label ":" ; + +lexical StringCharacter + = "\\" [\" \' \< \> \\ b f n r t] + | UnicodeEscape + | ![\" \' \< \> \\] + | [\n][\ \t \u00A0 \u1680 \u2000-\u200A \u202F \u205F \u3000]* [\'] // margin + ; + +lexical JustTime + = "$T" TimePartNoTZ !>> [+\-] "$" + | "$T" TimePartNoTZ TimeZonePart "$" + ; + +lexical MidStringChars + = @category="Constant" [\>] StringCharacter* [\<] ; + +lexical ProtocolChars + = [|] URLChars "://" !>> [\t-\n \r \ \u00A0 \u1680 \u2000-\u200A \u202F \u205F \u3000]; + +lexical RegExpModifier + = [d i m s]* ; + +syntax CommonKeywordParameters + = absent: () + | present: "(" {KeywordFormal ","}+ keywordFormalList ")" + ; + +syntax Parameters + = \default: "(" Formals formals KeywordFormals keywordFormals ")" + | varArgs: "(" Formals formals "..." KeywordFormals keywordFormals ")" ; + +lexical OptionalComma = \default: ","? ; + +syntax KeywordFormals + = \default: OptionalComma optionalComma [,\ (\t\n] << {KeywordFormal ","}+ keywordFormalList + | none: () + ; + +syntax KeywordFormal + = \default: Type type Name name "=" Expression expression + ; + +syntax KeywordArguments[&T] + = \default: OptionalComma optionalComma [,\ (\t\n] << {KeywordArgument[&T] ","}+ keywordArgumentList + | none: () + ; + +syntax KeywordArgument[&T] = \default: Name name "=" &T expression ; + +lexical RegExp + = ![/ \< \> \\] + | "\<" Name "\>" + | [\\] [/ \< \> \\] + | "\<" Name ":" NamedRegExp* "\>" + | Backslash + // | @category="MetaVariable" [\<] Expression expression [\>] TODO: find out why this production existed + ; + + +layout LAYOUTLIST + = LAYOUT* !>> [\u0009-\u000D \u0020 \u0085 \u00A0 \u1680 \u180E \u2000-\u200A \u2028 \u2029 \u202F \u205F \u3000] !>> "//" !>> "/*"; + +syntax LocalVariableDeclaration + = \default: Declarator declarator + | \dynamic: "dynamic" Declarator declarator ; + +lexical RealLiteral + = [0-9]+ [D F d f] + | [0-9]+ [E e] [+ \-]? [0-9]+ [D F d f]? + | [0-9]+ "." !>> "." [0-9]* [D F d f]? + | [0-9]+ "." [0-9]* [E e] [+ \-]? [0-9]+ [D F d f]? + | [.] !<< "." [0-9]+ [D F d f]? + | [.] !<< "." [0-9]+ [E e] [+ \-]? [0-9]+ [D F d f]? + ; + +syntax Range + = fromTo: Char start "-" Char end + | character: Char character ; + +syntax LocationLiteral + = \default: ProtocolPart protocolPart PathPart pathPart ; + +syntax ShellCommand + = setOption: "set" QualifiedName name Expression expression + | undeclare: "undeclare" QualifiedName name + | help: "help" + | edit: "edit" QualifiedName name + | unimport: "unimport" QualifiedName name + | listDeclarations: "declarations" + | quit: "quit" + | history: "history" + | \test: "test" + | listModules: "modules" + | clear: "clear"; + +syntax StringMiddle + = mid: MidStringChars mid + | template: MidStringChars mid StringTemplate template StringMiddle tail + | interpolated: MidStringChars mid Expression expression StringMiddle tail ; + +syntax QualifiedName + = \default: {Name "::"}+ names !>> "::" ; + +lexical RationalLiteral + = [0-9][0-9]* [r] + | [1-9][0-9]* [r] [0-9][0-9]* !>> [0-9 A-Z _ a-z] + ; + +lexical DecimalIntegerLiteral + = "0" !>> [0-9 A-Z _ a-z] + | [1-9] [0-9]* !>> [0-9 A-Z _ a-z] ; + +syntax DataTypeSelector + = selector: QualifiedName sort "." Name production ; + +syntax StringTail + = midInterpolated: MidStringChars mid Expression expression StringTail tail + | post: PostStringChars post + | midTemplate: MidStringChars mid StringTemplate template StringTail tail ; + +syntax PatternWithAction + = replacing: Pattern pattern "=\>" Replacement replacement + | arbitrary: Pattern pattern ":" Statement statement ; + +lexical LAYOUT + = Comment + // all the white space chars defined in Unicode 6.0 + | [\u0009-\u000D \u0020 \u0085 \u00A0 \u1680 \u180E \u2000-\u200A \u2028 \u2029 \u202F \u205F \u3000] + ; + +syntax Visit + = givenStrategy: Strategy strategy "visit" "(" Expression subject ")" "{" Case+ cases "}" + | defaultStrategy: "visit" "(" Expression subject ")" "{" Case+ cases "}" ; + +start syntax Commands + = \commandlist: EvalCommand+ commands + ; + +start syntax EvalCommand + = declaration: Declaration declaration + | statement: Statement!variableDeclaration!functionDeclaration!visit statement + | \import: Import imported + | output: Output + ; + +lexical Output + = @category="Result" resultOutput: "⇨" ![\n\r]* [\n] + | @category="StdOut" stdoutOutput: ^ "≫" ![\n\r]* [\n] + | @category="StdErr" stderrOutput: ^ "⚠" ![\n\r]* [\n] + ; + +start syntax Command + = expression: Expression!nonEmptyBlock expression + | declaration: Declaration declaration + | shell: ":" ShellCommand command + | statement: Statement!variableDeclaration!functionDeclaration!visit statement + | \import: Import imported ; + +lexical TagString + = "\\" !<< "{" ( ![{}] | ("\\" [{}]) | TagString)* contents "\\" !<< "}"; + +syntax ProtocolTail + = mid: MidProtocolChars mid Expression expression ProtocolTail tail + | post: PostProtocolChars post ; + +lexical Nonterminal + = ([A-Z] !<< [A-Z] [0-9 A-Z _ a-z]* !>> [0-9 A-Z _ a-z]) \ RascalKeywords; + +syntax PathTail + = mid: MidPathChars mid Expression expression PathTail tail + | post: PostPathChars post ; + +syntax Visibility + = \private: "private" + | \default: + | \public: "public" ; + +syntax StringLiteral + = template: PreStringChars pre StringTemplate template StringTail tail + | interpolated: PreStringChars pre Expression expression StringTail tail + | nonInterpolated: StringConstant constant ; + +lexical Comment + = @category="Comment" "/*" (![*] | [*] !>> [/])* "*/" + | @category="Comment" "//" ![\n]* !>> [\ \t\r \u00A0 \u1680 \u2000-\u200A \u202F \u205F \u3000] $ // the restriction helps with parsing speed + ; + + +syntax Renamings + = \default: "renaming" {Renaming ","}+ renamings ; + +syntax Tags + = \default: Tag* tags ; + +syntax Formals + = \default: {Pattern ","}* formals ; + +lexical PostProtocolChars + = "\>" URLChars "://" ; + +syntax Start + = absent: + | present: "start" ; + +syntax Statement + = @breakable \assert: "assert" Expression expression ";" + | @breakable assertWithMessage: "assert" Expression expression ":" Expression message ";" + | @breakable expression: Expression!visit!nonEmptyBlock expression ";" + | @breakable \visit: Label label Visit visit + | @breakable \while: Label label "while" "(" {Expression ","}+ conditions ")" Statement!variableDeclaration!functionDeclaration body + | @breakable doWhile: Label label "do" Statement body "while" "(" Expression condition ")" ";" + | @breakable @breakable{generators} \for: Label label "for" "(" {Expression ","}+ generators ")" Statement body + | @breakable ifThen: Label label "if" "(" {Expression ","}+ conditions ")" Statement!variableDeclaration!functionDeclaration thenStatement () !>> "else" + | @breakable ifThenElse: Label label "if" "(" {Expression ","}+ conditions ")" Statement thenStatement "else" Statement!variableDeclaration!functionDeclaration elseStatement + | @breakable \switch: Label label "switch" "(" Expression expression ")" "{" Case+ cases "}" + | @breakable \fail: "fail" Target target ";" + | @breakable \break: "break" Target target ";" + | @breakable \continue: "continue" Target target ";" + | @breakable \filter: "filter" ";" + | @breakable \solve: "solve" "(" {QualifiedName ","}+ variables Bound bound ")" Statement!variableDeclaration!functionDeclaration body + | @breakable non-assoc \try: "try" Statement body Catch+ handlers + | @breakable tryFinally: "try" Statement body Catch+ handlers "finally" Statement!variableDeclaration!functionDeclaration finallyBody + | nonEmptyBlock: Label label "{" Statement+ statements "}" + | emptyStatement: ";" + | @breakable globalDirective: "global" Type type {QualifiedName ","}+ names ";" + | @breakable assignment: Assignable assignable Assignment operator Statement!functionDeclaration!variableDeclaration statement + | non-assoc ( + @breakable \return : "return" Statement!functionDeclaration!variableDeclaration statement + | @breakable \throw : "throw" Statement!functionDeclaration!variableDeclaration statement + | @breakable \insert : "insert" DataTarget dataTarget Statement!functionDeclaration!variableDeclaration statement + | @breakable \append : "append" DataTarget dataTarget Statement!functionDeclaration!variableDeclaration statement + ) + | @breakable functionDeclaration: FunctionDeclaration functionDeclaration + | @breakable variableDeclaration: LocalVariableDeclaration declaration ";" + ; + + +syntax StructuredType + = \default: BasicType basicType "[" {TypeArg ","}+ arguments "]" ; + +lexical NonterminalLabel + = [a-z] [0-9 A-Z _ a-z]* !>> [0-9 A-Z _ a-z] ; + +syntax FunctionType + = typeArguments: Type type "(" {TypeArg ","}* arguments ")" ; + +syntax Case + = @Foldable patternWithAction: "case" PatternWithAction patternWithAction + | @Foldable \default: "default" ":" Statement statement ; + +syntax Declarator + = \default: Type type {Variable ","}+ variables ; + +syntax Bound + = \default: ";" Expression expression + | empty: ; + +keyword RascalKeywords + = "o" + | "syntax" + | "keyword" + | "lexical" + | "int" + | "break" + | "continue" + | "rat" + | "true" + | "bag" + | "num" + | "node" + | "finally" + | "private" + | "real" + | "list" + | "fail" + | "filter" + | "if" + | "tag" + | BasicType + | "extend" + | "append" + | "rel" + | "lrel" + | "void" + | "non-assoc" + | "assoc" + | "test" + | "anno" + | "layout" + | "data" + | "join" + | "it" + | "bracket" + | "in" + | "import" + | "false" + | "all" + | "dynamic" + | "solve" + | "type" + | "try" + | "catch" + | "notin" + | "else" + | "insert" + | "switch" + | "return" + | "case" + | "while" + | "str" + | "throws" + | "visit" + | "tuple" + | "for" + | "assert" + | "loc" + | "default" + | "map" + | "alias" + | "any" + | "module" + | "mod" + | "bool" + | "public" + | "one" + | "throw" + | "set" + | "start" + | "datetime" + | "value" + ; + +syntax Type + = bracket \bracket: "(" Type type ")" + | user: UserType user + | function: FunctionType function + | structured: StructuredType structured + | basic: BasicType basic + | selector: DataTypeSelector selector + | variable: TypeVar typeVar + | symbol: Sym!nonterminal!labeled!parametrized!parameter symbol + ; + +syntax Declaration + = variable : Tags tags Visibility visibility Type type {Variable ","}+ variables ";" + | annotation : Tags tags Visibility visibility "anno" Type annoType Type onType "@" Name name ";" + | \alias : Tags tags Visibility visibility "alias" UserType user "=" Type base ";" + | \tag : Tags tags Visibility visibility "tag" Kind kind Name name "on" {Type ","}+ types ";" + | dataAbstract: Tags tags Visibility visibility "data" UserType user CommonKeywordParameters commonKeywordParameters ";" + | @Foldable \data : Tags tags Visibility visibility "data" UserType user CommonKeywordParameters commonKeywordParameters"=" {Variant "|"}+ variants ";" + | function : FunctionDeclaration functionDeclaration + ; + +syntax Class + = simpleCharclass: "[" Range* ranges "]" + | complement: "!" Class charClass + > left difference: Class lhs "-" Class rhs + > left intersection: Class lhs "&&" Class rhs + > left union: Class lhs "||" Class rhs + | bracket \bracket: "(" Class charclass ")" ; + +lexical RegExpLiteral + = "/" RegExp* "/" RegExpModifier ; + +syntax FunctionModifiers + = \modifierlist: FunctionModifier* modifiers ; + +syntax Comprehension + = @breakable{results,generators} \set: "{" {Expression ","}+ results "|" {Expression ","}+ generators "}" + | @breakable{from,to,generators} \map: "(" Expression from ":" Expression to "|" {Expression ","}+ generators ")" + | @breakable{results,generators} \list: "[" {Expression ","}+ results "|" {Expression ","}+ generators "]" ; + +syntax Variant + = nAryConstructor: Name name "(" {TypeArg ","}* arguments KeywordFormals keywordArguments ")" ; + +syntax FunctionDeclaration + = abstract: Tags tags Visibility visibility Signature signature ";" + | @Foldable @breakable{expression} expression: Tags tags Visibility visibility Signature signature "=" Expression expression ";" + | @Foldable @breakable{expression,conditions} conditional: Tags tags Visibility visibility Signature signature "=" Expression expression "when" {Expression ","}+ conditions ";" + | @Foldable \default: Tags tags Visibility visibility Signature signature FunctionBody body ; + +lexical PreProtocolChars + = "|" URLChars "\<" ; + +lexical NamedRegExp + = "\<" Name "\>" + | [\\] [/ \< \> \\] + | NamedBackslash + | ![/ \< \> \\] ; + +syntax ProdModifier + = associativity: Assoc associativity + | \bracket: "bracket" + | \tag: Tag tag; + +syntax Toplevel + = givenVisibility: Declaration declaration ; + +lexical PostStringChars + = @category="Constant" [\>] StringCharacter* [\"] ; + +lexical HexIntegerLiteral + = [0] [X x] [0-9 A-F a-f]+ !>> [0-9 A-Z _ a-z] ; + +syntax TypeVar + = free: "&" Name name + | bounded: "&" Name name "\<:" Type bound ; + + + +syntax BasicType + = \value: "value" + | \loc: "loc" + | \node: "node" + | \num: "num" + | \type: "type" + | \bag: "bag" + | \int: "int" + | rational: "rat" + | relation: "rel" + | listRelation: "lrel" + | \real: "real" + | \tuple: "tuple" + | string: "str" + | \bool: "bool" + | \void: "void" + | dateTime: "datetime" + | \set: "set" + | \map: "map" + | \list: "list" + ; + +lexical Char + = @category="Constant" "\\" [\ \" \' \- \< \> \[ \\ \] b f n r t] + | @category="Constant" ![\ \" \' \- \< \> \[ \\ \]] + | @category="Constant" UnicodeEscape + ; + +syntax Prod + = reference: ":" Name referenced + | labeled: ProdModifier* modifiers Name name ":" Sym* syms + | others: "..." + | unlabeled: ProdModifier* modifiers Sym* syms + | @Foldable associativityGroup: Assoc associativity "(" Prod group ")" + // | TODO add bracket rule for easy readability + > left \all : Prod lhs "|" Prod rhs + > left first : Prod lhs "\>" !>> "\>" Prod rhs + ; + +syntax DateTimeLiteral + = /*prefer()*/ dateLiteral: JustDate date + | /*prefer()*/ timeLiteral: JustTime time + | /*prefer()*/ dateAndTimeLiteral: DateAndTime dateAndTime ; + +lexical PrePathChars + = URLChars "\<" ; + +syntax Mapping[&T] + = \default: &T!ifDefinedOtherwise from ":" &T to + ; + +lexical MidPathChars + = "\>" URLChars "\<" ; + +/* + Note that Pattern must closely follow the definitions of Expression because eventually + these two non-terminals will be fused just before AST generation. +*/ +syntax Pattern + = \set : "{" {Pattern ","}* elements0 "}" + | \list : "[" {Pattern ","}* elements0 "]" + | qualifiedName : QualifiedName qualifiedName + | multiVariable : QualifiedName qualifiedName "*" + | splice : "*" Pattern argument + | splicePlus : "+" Pattern argument + | negative : "-" Pattern argument + | literal : Literal literal + | \tuple : "\<" {Pattern ","}+ elements "\>" + | typedVariable : Type type Name name + | \map : "(" {Mapping[Pattern] ","}* mappings ")" + | reifiedType : "type" "(" Pattern symbol "," Pattern definitions ")" + | callOrTree : Pattern expression "(" {Pattern ","}* arguments KeywordArguments[Pattern] keywordArguments ")" + > variableBecomes : Name name ":" Pattern pattern + | asType : "[" Type type "]" Pattern argument + | descendant : "/" Pattern pattern + | anti : "!" Pattern pattern + | typedVariableBecomes: Type type Name name ":" Pattern pattern + ; + +syntax Tag + = @Folded @category="Comment" \default : "@" Name name TagString contents + | @Folded @category="Comment" empty : "@" Name name + | @Folded @category="Comment" expression: "@" Name name "=" Expression expression !>> "@"; + +syntax ModuleActuals + = \default: "[" {Type ","}+ types "]" ; diff --git a/samples/Rascal/Syntax.rsc b/samples/Rascal/Syntax.rsc new file mode 100644 index 0000000000..13acb37cfa --- /dev/null +++ b/samples/Rascal/Syntax.rsc @@ -0,0 +1,8 @@ +module Syntax + +extend lang::std::Layout; +extend lang::std::Id; + +start syntax Machine = machine: State+ states; +syntax State = @Foldable state: "state" Id name Trans* out; +syntax Trans = trans: Id event ":" Id to; From 77eb36a982702e0dcff3a7e7d61a7fde552abd0b Mon Sep 17 00:00:00 2001 From: Ahmad Salim Al-Sibahi Date: Tue, 29 Nov 2016 23:42:02 +0100 Subject: [PATCH 0178/1214] Added Rascal Language Id --- lib/linguist/languages.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 736a2d093f..b98c1f7700 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -4832,11 +4832,12 @@ ooc: language_id: 418 Rascal: type: programming - color: "FFFAA0" + color: FFFAA0 extensions: - ".rsc" tm_scope: source.rascal ace_mode: rascal + language_id: 431 reStructuredText: type: prose wrap: true From 9233f1d17f7e0dbe3c01d2ab1e65f7c6ae138b4e Mon Sep 17 00:00:00 2001 From: Ahmad Salim Al-Sibahi Date: Wed, 30 Nov 2016 00:03:55 +0100 Subject: [PATCH 0179/1214] Fixed color, order and ace mode --- lib/linguist/languages.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index b98c1f7700..661a53c5db 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3466,6 +3466,14 @@ RAML: extensions: - ".raml" language_id: 308 +Rascal: + type: programming + color: "#fffaa0" + extensions: + - ".rsc" + tm_scope: source.rascal + ace_mode: text + language_id: 431 RDoc: type: prose ace_mode: rdoc @@ -4830,14 +4838,6 @@ ooc: - ".ooc" ace_mode: text language_id: 418 -Rascal: - type: programming - color: FFFAA0 - extensions: - - ".rsc" - tm_scope: source.rascal - ace_mode: rascal - language_id: 431 reStructuredText: type: prose wrap: true From 8a911b8ff3f3e1e6d1c97f7b1f935deb3e1b8ce4 Mon Sep 17 00:00:00 2001 From: Ahmad Salim Al-Sibahi Date: Wed, 30 Nov 2016 00:15:17 +0100 Subject: [PATCH 0180/1214] Fixed ordering correctly --- lib/linguist/languages.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 661a53c5db..65a9833073 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3466,14 +3466,6 @@ RAML: extensions: - ".raml" language_id: 308 -Rascal: - type: programming - color: "#fffaa0" - extensions: - - ".rsc" - tm_scope: source.rascal - ace_mode: text - language_id: 431 RDoc: type: prose ace_mode: rdoc @@ -3574,6 +3566,14 @@ Ragel in Ruby Host: tm_scope: none ace_mode: text language_id: 317 +Rascal: + type: programming + color: "#fffaa0" + extensions: + - ".rsc" + tm_scope: source.rascal + ace_mode: text + language_id: 431 Raw token data: type: data search_term: raw From 31aafa2c78de58e3f10a1668740973fdbc1060af Mon Sep 17 00:00:00 2001 From: meganemura Date: Thu, 1 Dec 2016 11:35:42 +0900 Subject: [PATCH 0181/1214] Replace ruby-haml.tmbundle with language-haml ./script/add-grammar --replace ruby-haml.tmbundle https://github.com/ezekg/language-haml --- .gitmodules | 6 ++--- grammars.yml | 5 ++-- vendor/README.md | 2 +- vendor/grammars/language-haml | 1 + vendor/grammars/ruby-haml.tmbundle | 1 - vendor/licenses/grammar/language-haml.txt | 25 +++++++++++++++++++ .../licenses/grammar/ruby-haml.tmbundle.txt | 15 ----------- 7 files changed, 33 insertions(+), 22 deletions(-) create mode 160000 vendor/grammars/language-haml delete mode 160000 vendor/grammars/ruby-haml.tmbundle create mode 100644 vendor/licenses/grammar/language-haml.txt delete mode 100644 vendor/licenses/grammar/ruby-haml.tmbundle.txt diff --git a/.gitmodules b/.gitmodules index f7a30d0416..b19a3d2d2c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -355,9 +355,6 @@ [submodule "vendor/grammars/r.tmbundle"] path = vendor/grammars/r.tmbundle url = https://github.com/textmate/r.tmbundle -[submodule "vendor/grammars/ruby-haml.tmbundle"] - path = vendor/grammars/ruby-haml.tmbundle - url = https://github.com/textmate/ruby-haml.tmbundle [submodule "vendor/grammars/scheme.tmbundle"] path = vendor/grammars/scheme.tmbundle url = https://github.com/textmate/scheme.tmbundle @@ -800,3 +797,6 @@ [submodule "vendor/grammars/EBNF.tmbundle"] path = vendor/grammars/EBNF.tmbundle url = https://github.com/sanssecours/EBNF.tmbundle +[submodule "vendor/grammars/language-haml"] + path = vendor/grammars/language-haml + url = https://github.com/ezekg/language-haml diff --git a/grammars.yml b/grammars.yml index 0d28c873d0..a9c215052b 100755 --- a/grammars.yml +++ b/grammars.yml @@ -366,6 +366,9 @@ vendor/grammars/language-gfm: - source.gfm vendor/grammars/language-graphql: - source.graphql +vendor/grammars/language-haml: +- text.haml +- text.hamlc vendor/grammars/language-haskell: - hint.haskell - hint.message.haskell @@ -531,8 +534,6 @@ vendor/grammars/python-django.tmbundle: vendor/grammars/r.tmbundle: - source.r - text.tex.latex.rd -vendor/grammars/ruby-haml.tmbundle: -- text.haml vendor/grammars/ruby-slim.tmbundle: - text.slim vendor/grammars/ruby.tmbundle: diff --git a/vendor/README.md b/vendor/README.md index 0e389ab702..6a3f5b9e05 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -138,7 +138,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **Groovy:** [textmate/groovy.tmbundle](https://github.com/textmate/groovy.tmbundle) - **Groovy Server Pages:** [textmate/java.tmbundle](https://github.com/textmate/java.tmbundle) - **Hack:** [textmate/php.tmbundle](https://github.com/textmate/php.tmbundle) -- **Haml:** [textmate/ruby-haml.tmbundle](https://github.com/textmate/ruby-haml.tmbundle) +- **Haml:** [ezekg/language-haml](https://github.com/ezekg/language-haml) - **Handlebars:** [daaain/Handlebars](https://github.com/daaain/Handlebars) - **Harbour:** [hernad/atom-language-harbour](https://github.com/hernad/atom-language-harbour) - **Haskell:** [atom-haskell/language-haskell](https://github.com/atom-haskell/language-haskell) diff --git a/vendor/grammars/language-haml b/vendor/grammars/language-haml new file mode 160000 index 0000000000..301625dff4 --- /dev/null +++ b/vendor/grammars/language-haml @@ -0,0 +1 @@ +Subproject commit 301625dff414653eb88320c624434429ef8e244c diff --git a/vendor/grammars/ruby-haml.tmbundle b/vendor/grammars/ruby-haml.tmbundle deleted file mode 160000 index 57b1b35231..0000000000 --- a/vendor/grammars/ruby-haml.tmbundle +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 57b1b3523136e3dce9479d46c1d3c16aaa7f8f70 diff --git a/vendor/licenses/grammar/language-haml.txt b/vendor/licenses/grammar/language-haml.txt new file mode 100644 index 0000000000..04eadbe3df --- /dev/null +++ b/vendor/licenses/grammar/language-haml.txt @@ -0,0 +1,25 @@ +--- +type: grammar +name: language-haml +license: mit +--- +The MIT License (MIT) + +Copyright (c) 2014 Rob Cameron + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/licenses/grammar/ruby-haml.tmbundle.txt b/vendor/licenses/grammar/ruby-haml.tmbundle.txt deleted file mode 100644 index 78fd05a6b9..0000000000 --- a/vendor/licenses/grammar/ruby-haml.tmbundle.txt +++ /dev/null @@ -1,15 +0,0 @@ ---- -type: grammar -name: ruby-haml.tmbundle -license: permissive -curated: true ---- - -If not otherwise specified (see below), files in this repository fall under the following license: - - Permission to copy, use, modify, sell and distribute this - software is granted. This software is provided "as is" without - express or implied warranty, and with no claim as to its - suitability for any purpose. - -An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”. From ecdae8336421cff1b171ec1946c7a01290befe2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20P=C3=A4per?= Date: Tue, 6 Dec 2016 03:50:05 +0100 Subject: [PATCH 0182/1214] Add support for font-specific formats (#3142) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * markdown and font-specific updates languages.yml - Markdown: ← extensions: .md.txt - Text: ← extensions: .text - Text: ← filenames: FONTLOG http://scripts.sil.org/cms/scripts/page.php?item_id=OFL-FAQ_web#43cecb44 - OpenType: ← extensions: .fea https://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html - Spline Font: ← extensions: .sfd http://fontforge.github.io/en-US/documentation/developers/sfdformat/ * Update languages.yml `type: data` for SFD * Update languages.yml OpenType feature ← type: markup * Update languages.yml alphabetic order * Update languages.yml incorporated suggestions: - “OpenType Font Feature” → “Opentype feature” (no “file” at the end, because that’s left out almost everywhere else, too) - `tm_scope` according to https://github.com/Alhadis/language-fontforge * remove non-font related additions - `.md.txt` Markdown - `.text` Plain Text * Update languages.yml remove comment * changed names as requested * Merge remote-tracking branch 'github/master' into patch-2 # Conflicts: # lib/linguist/languages.yml * quote marks * Revert "Merge remote-tracking branch 'github/master' into patch-2" This reverts commit 18e4256b828c4186fec806319cbf8b76f0d2c79b. * Update language IDs * Add missing submodule to grammars list --- .gitmodules | 3 +++ grammars.yml | 4 +++ lib/linguist/languages.yml | 25 ++++++++++++++++--- vendor/grammars/language-fontforge | 1 + .../licenses/grammar/language-fontforge.txt | 18 +++++++++++++ 5 files changed, 47 insertions(+), 4 deletions(-) create mode 160000 vendor/grammars/language-fontforge create mode 100644 vendor/licenses/grammar/language-fontforge.txt diff --git a/.gitmodules b/.gitmodules index f7a30d0416..e8dd1bc754 100644 --- a/.gitmodules +++ b/.gitmodules @@ -800,3 +800,6 @@ [submodule "vendor/grammars/EBNF.tmbundle"] path = vendor/grammars/EBNF.tmbundle url = https://github.com/sanssecours/EBNF.tmbundle +[submodule "vendor/grammars/language-fontforge"] + path = vendor/grammars/language-fontforge + url = https://github.com/Alhadis/language-fontforge diff --git a/grammars.yml b/grammars.yml index 0d28c873d0..545070cea4 100755 --- a/grammars.yml +++ b/grammars.yml @@ -362,6 +362,10 @@ vendor/grammars/language-csound: - source.csound-score vendor/grammars/language-emacs-lisp: - source.emacs.lisp +vendor/grammars/language-fontforge: +- source.fontforge +- source.opentype +- text.sfd vendor/grammars/language-gfm: - source.gfm vendor/grammars/language-graphql: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index da4aa88913..ffcff6cce0 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1141,9 +1141,9 @@ Emacs Lisp: - ".gnus" - ".spacemacs" - ".viper" - - "Project.ede" - - "_emacs" - - "abbrev_defs" + - Project.ede + - _emacs + - abbrev_defs extensions: - ".el" - ".emacs" @@ -2956,6 +2956,15 @@ OpenSCAD: - ".scad" tm_scope: none ace_mode: scad + language_id: 431 +OpenType Feature File: + type: data + aliases: + - AFDKO + extensions: + - ".fea" + tm_scope: source.opentype + ace_mode: text language_id: 266 Org: type: prose @@ -3175,7 +3184,7 @@ Perl6: Pic: type: markup group: Groff - tm_scope: "source.pic" + tm_scope: source.pic extensions: - ".pic" - ".chem" @@ -4030,6 +4039,13 @@ SourcePawn: - ".sma" tm_scope: source.sp ace_mode: text + language_id: 432 +Spline Font Database: + type: data + extensions: + - ".sfd" + tm_scope: text.sfd + ace_mode: yaml language_id: 354 Squirrel: type: programming @@ -4261,6 +4277,7 @@ Text: - ".no" filenames: - COPYING + - FONTLOG - INSTALL - LICENSE - NEWS diff --git a/vendor/grammars/language-fontforge b/vendor/grammars/language-fontforge new file mode 160000 index 0000000000..b8233304fd --- /dev/null +++ b/vendor/grammars/language-fontforge @@ -0,0 +1 @@ +Subproject commit b8233304fdc9575a08a62f9280587050b10518f6 diff --git a/vendor/licenses/grammar/language-fontforge.txt b/vendor/licenses/grammar/language-fontforge.txt new file mode 100644 index 0000000000..3c0b29a85d --- /dev/null +++ b/vendor/licenses/grammar/language-fontforge.txt @@ -0,0 +1,18 @@ +--- +type: grammar +name: language-fontforge +license: isc +--- +Copyright (c) 2016, John Gardner + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. From c17cdca896f09d19ecd96dd8e31687d411fa1289 Mon Sep 17 00:00:00 2001 From: Ahmad Salim Al-Sibahi Date: Tue, 6 Dec 2016 11:22:09 +0100 Subject: [PATCH 0183/1214] Updated to the latest available grammar --- vendor/grammars/rascal-syntax-highlighting | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/grammars/rascal-syntax-highlighting b/vendor/grammars/rascal-syntax-highlighting index 3f0d87fef1..13f2e4040c 160000 --- a/vendor/grammars/rascal-syntax-highlighting +++ b/vendor/grammars/rascal-syntax-highlighting @@ -1 +1 @@ -Subproject commit 3f0d87fef146edf4c1d8bccbfe6e35b90b31fedf +Subproject commit 13f2e4040cb91ea720d04a46357cdb0a0b73c862 From 5aa53c07117c448f06643d5e6223d3086ddac927 Mon Sep 17 00:00:00 2001 From: John Gardner Date: Wed, 7 Dec 2016 16:32:11 +1100 Subject: [PATCH 0184/1214] Swap grammar used for Ninja highlighting (#3353) --- .gitmodules | 6 +++--- grammars.yml | 4 ++-- vendor/README.md | 1 - vendor/grammars/language-ninja | 1 + vendor/grammars/ninja.tmbundle | 1 - vendor/licenses/grammar/language-ninja.txt | 25 ++++++++++++++++++++++ vendor/licenses/grammar/ninja.tmbundle.txt | 15 ------------- 7 files changed, 31 insertions(+), 22 deletions(-) create mode 160000 vendor/grammars/language-ninja delete mode 160000 vendor/grammars/ninja.tmbundle create mode 100644 vendor/licenses/grammar/language-ninja.txt delete mode 100644 vendor/licenses/grammar/ninja.tmbundle.txt diff --git a/.gitmodules b/.gitmodules index e8dd1bc754..8892627fdf 100644 --- a/.gitmodules +++ b/.gitmodules @@ -325,9 +325,6 @@ [submodule "vendor/grammars/nemerle.tmbundle"] path = vendor/grammars/nemerle.tmbundle url = https://github.com/textmate/nemerle.tmbundle -[submodule "vendor/grammars/ninja.tmbundle"] - path = vendor/grammars/ninja.tmbundle - url = https://github.com/textmate/ninja.tmbundle [submodule "vendor/grammars/objective-c.tmbundle"] path = vendor/grammars/objective-c.tmbundle url = https://github.com/textmate/objective-c.tmbundle @@ -800,6 +797,9 @@ [submodule "vendor/grammars/EBNF.tmbundle"] path = vendor/grammars/EBNF.tmbundle url = https://github.com/sanssecours/EBNF.tmbundle +[submodule "vendor/grammars/language-ninja"] + path = vendor/grammars/language-ninja + url = https://github.com/khyo/language-ninja [submodule "vendor/grammars/language-fontforge"] path = vendor/grammars/language-fontforge url = https://github.com/Alhadis/language-fontforge diff --git a/grammars.yml b/grammars.yml index 545070cea4..90bb2c0a3b 100755 --- a/grammars.yml +++ b/grammars.yml @@ -397,6 +397,8 @@ vendor/grammars/language-maxscript: - source.maxscript vendor/grammars/language-ncl: - source.ncl +vendor/grammars/language-ninja: +- source.ninja vendor/grammars/language-povray: - source.pov-ray sdl vendor/grammars/language-python: @@ -478,8 +480,6 @@ vendor/grammars/nemerle.tmbundle: - source.nemerle vendor/grammars/nesC: - source.nesc -vendor/grammars/ninja.tmbundle: -- source.ninja vendor/grammars/nix: - source.nix vendor/grammars/nu.tmbundle: diff --git a/vendor/README.md b/vendor/README.md index 0e389ab702..898c22517a 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -224,7 +224,6 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **NewLisp:** [textmate/lisp.tmbundle](https://github.com/textmate/lisp.tmbundle) - **Nginx:** [brandonwamboldt/sublime-nginx](https://github.com/brandonwamboldt/sublime-nginx) - **Nimrod:** [Varriount/NimLime](https://github.com/Varriount/NimLime) -- **Ninja:** [textmate/ninja.tmbundle](https://github.com/textmate/ninja.tmbundle) - **Nit:** [R4PaSs/Sublime-Nit](https://github.com/R4PaSs/Sublime-Nit) - **Nix:** [wmertens/sublime-nix](https://github.com/wmertens/sublime-nix) - **NSIS:** [github-linguist/NSIS](https://github.com/github-linguist/NSIS) diff --git a/vendor/grammars/language-ninja b/vendor/grammars/language-ninja new file mode 160000 index 0000000000..207a60371f --- /dev/null +++ b/vendor/grammars/language-ninja @@ -0,0 +1 @@ +Subproject commit 207a60371f4c86d094dcad17e12ea57d4ca0eb7f diff --git a/vendor/grammars/ninja.tmbundle b/vendor/grammars/ninja.tmbundle deleted file mode 160000 index 89d9cf3330..0000000000 --- a/vendor/grammars/ninja.tmbundle +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 89d9cf333074a6f948053bbcf724281ec4a7adc6 diff --git a/vendor/licenses/grammar/language-ninja.txt b/vendor/licenses/grammar/language-ninja.txt new file mode 100644 index 0000000000..85caa51867 --- /dev/null +++ b/vendor/licenses/grammar/language-ninja.txt @@ -0,0 +1,25 @@ +--- +type: grammar +name: language-ninja +license: mit +--- +Copyright (c) 2015 Kyle Howen + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/licenses/grammar/ninja.tmbundle.txt b/vendor/licenses/grammar/ninja.tmbundle.txt deleted file mode 100644 index 41f94c59f8..0000000000 --- a/vendor/licenses/grammar/ninja.tmbundle.txt +++ /dev/null @@ -1,15 +0,0 @@ ---- -type: grammar -name: ninja.tmbundle -license: permissive -curated: true ---- - -If not otherwise specified (see below), files in this repository fall under the following license: - - Permission to copy, use, modify, sell and distribute this - software is granted. This software is provided "as is" without - express or implied warranty, and with no claim as to its - suitability for any purpose. - -An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”. From cd30c7613c52bdcc2fc88d7a53018f9feaf99c5f Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Wed, 7 Dec 2016 14:43:33 +0900 Subject: [PATCH 0185/1214] Detect `.babelrc` (#3358) `.babelrc` is Babel configuration file in JSON 5 format. --- lib/linguist/languages.yml | 2 ++ samples/JSON5/filenames/.babelrc | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 samples/JSON5/filenames/.babelrc diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index ffcff6cce0..ac73cf4d4b 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1962,6 +1962,8 @@ JSON5: type: data extensions: - ".json5" + filenames: + - ".babelrc" tm_scope: source.js ace_mode: javascript codemirror_mode: javascript diff --git a/samples/JSON5/filenames/.babelrc b/samples/JSON5/filenames/.babelrc new file mode 100644 index 0000000000..432c768423 --- /dev/null +++ b/samples/JSON5/filenames/.babelrc @@ -0,0 +1,6 @@ +{ + "presets": [ + "es2015", + "es2016" + ] +} From 79f20e805731cdeae67757899355827fd82ea652 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Wed, 7 Dec 2016 06:50:33 +0100 Subject: [PATCH 0186/1214] Heuristic rule for TeX .cls files (#3360) --- lib/linguist/heuristics.rb | 6 ++++++ test/test_heuristics.rb | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index 7216003faf..b98465dd1f 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -110,6 +110,12 @@ def call(data) end end + disambiguate ".cls" do |data| + if /\\\w+{/.match(data) + Language["TeX"] + end + end + disambiguate ".cs" do |data| if /![\w\s]+methodsFor: /.match(data) Language["Smalltalk"] diff --git a/test/test_heuristics.rb b/test/test_heuristics.rb index 921cc0213e..4fe3d38a2d 100644 --- a/test/test_heuristics.rb +++ b/test/test_heuristics.rb @@ -73,6 +73,15 @@ def test_cl_by_heuristics }) end + def test_cls_by_heuristics + assert_heuristics({ + "TeX" => all_fixtures("TeX", "*.cls"), + nil => all_fixtures("Apex", "*.cls"), + nil => all_fixtures("OpenEdge ABL", "*.cls"), + nil => all_fixtures("Visual Basic", "*.cls"), + }) + end + def test_cs_by_heuristics assert_heuristics({ "C#" => all_fixtures("C#", "*.cs"), From 9f3b7d0ba515219cdbcbf8850a8f8218f24304ef Mon Sep 17 00:00:00 2001 From: Jim Deville Date: Wed, 7 Dec 2016 00:55:25 -0500 Subject: [PATCH 0187/1214] Allow golang as an alias for Go code fences (#3221) --- lib/linguist/languages.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index ac73cf4d4b..e4c0255844 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1473,6 +1473,8 @@ Gnuplot: Go: type: programming color: "#375eab" + aliases: + - golang extensions: - ".go" ace_mode: golang From c486f56204fa87d570e8c13e12aca98bb932cc33 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Wed, 7 Dec 2016 06:59:28 +0100 Subject: [PATCH 0188/1214] Mark .indent.pro files as vendored (#3361) --- lib/linguist/vendor.yml | 3 +++ test/test_file_blob.rb | 2 ++ 2 files changed, 5 insertions(+) diff --git a/lib/linguist/vendor.yml b/lib/linguist/vendor.yml index 5e83cd5008..16515c983b 100644 --- a/lib/linguist/vendor.yml +++ b/lib/linguist/vendor.yml @@ -50,6 +50,9 @@ # Go dependencies - Godeps/_workspace/ +# GNU indent profiles +- .indent.pro + # Minified JavaScript and CSS - (\.|-)min\.(js|css)$ diff --git a/test/test_file_blob.rb b/test/test_file_blob.rb index 84cee723f3..2c52b0a7c0 100644 --- a/test/test_file_blob.rb +++ b/test/test_file_blob.rb @@ -294,6 +294,8 @@ def test_vendored assert !sample_blob("Godeps/Godeps.json").vendored? assert sample_blob("Godeps/_workspace/src/github.com/kr/s3/sign.go").vendored? + assert sample_blob(".indent.pro").vendored? + # Rails vendor/ assert sample_blob("vendor/plugins/will_paginate/lib/will_paginate.rb").vendored? From 5569d2056d74606a77209389ab176706c38dc713 Mon Sep 17 00:00:00 2001 From: Ahmad Salim Al-Sibahi Date: Wed, 7 Dec 2016 08:47:40 +0100 Subject: [PATCH 0189/1214] Removed old submodules --- vendor/grammars/ninja.tmbundle | 1 - vendor/grammars/ruby-haml.tmbundle | 1 - vendor/grammars/xquery | 1 - 3 files changed, 3 deletions(-) delete mode 160000 vendor/grammars/ninja.tmbundle delete mode 160000 vendor/grammars/ruby-haml.tmbundle delete mode 160000 vendor/grammars/xquery diff --git a/vendor/grammars/ninja.tmbundle b/vendor/grammars/ninja.tmbundle deleted file mode 160000 index 89d9cf3330..0000000000 --- a/vendor/grammars/ninja.tmbundle +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 89d9cf333074a6f948053bbcf724281ec4a7adc6 diff --git a/vendor/grammars/ruby-haml.tmbundle b/vendor/grammars/ruby-haml.tmbundle deleted file mode 160000 index 57b1b35231..0000000000 --- a/vendor/grammars/ruby-haml.tmbundle +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 57b1b3523136e3dce9479d46c1d3c16aaa7f8f70 diff --git a/vendor/grammars/xquery b/vendor/grammars/xquery deleted file mode 160000 index 1908094946..0000000000 --- a/vendor/grammars/xquery +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 19080949463e8eb6fca5ac94d597007a7c3605f8 From 0fbc29bf689dd198f7c34ebbda107c80de8ba970 Mon Sep 17 00:00:00 2001 From: Ahmad Salim Al-Sibahi Date: Wed, 7 Dec 2016 08:53:40 +0100 Subject: [PATCH 0190/1214] Updated language id --- lib/linguist/languages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index bbe6b372a1..b8766dd316 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -19,7 +19,7 @@ # language_id - Integer used as a language-name-independent indexed field so that we can rename # languages in Linguist without reindexing all the code on GitHub. Must not be # changed for existing languages without the explicit permission of GitHub staff. -# color - CSS hex color to represent the language. Only used if type is "programming" or "prose" +# color - CSS hex color to represent the language. Only used if type is "programming" or "prose". # tm_scope - The TextMate scope that represents this programming # language. This should match one of the scopes listed in # the grammars.yml file. Use "none" if there is no grammar @@ -3589,7 +3589,7 @@ Rascal: - ".rsc" tm_scope: source.rascal ace_mode: text - language_id: 431 + language_id: 173616037 Raw token data: type: data search_term: raw From 45c27f26a2aa37033e6f7a65147a2e4058084663 Mon Sep 17 00:00:00 2001 From: John Gardner Date: Thu, 8 Dec 2016 04:20:23 +1100 Subject: [PATCH 0191/1214] Add support for the GN configuration language (#3368) * Add samples and definition for GN build files * Add grammar to provide GN syntax highlighting * Fix failing tests * Add Python extensions for GYP includes and .gclient configs --- .gitmodules | 3 + grammars.yml | 2 + lib/linguist/languages.yml | 16 +- samples/GN/BUILD.2.gn | 59 + samples/GN/BUILD.3.gn | 1646 +++++++++++++ samples/GN/BUILD.gn | 2583 +++++++++++++++++++++ samples/GN/android-rules.gni | 2781 ++++++++++++++++++++++ samples/GN/clang.gni | 13 + samples/GN/filenames/.gn | 25 + samples/GN/gcc_toolchain.gni | 503 ++++ samples/GN/icu.gn | 235 ++ samples/GN/internal_rules.gni | 2788 +++++++++++++++++++++++ samples/GN/ios-rules.gni | 1422 ++++++++++++ samples/GN/isolate.gni | 193 ++ samples/Python/filenames/.gclient | 9 + samples/Python/standalone.gypi | 1522 +++++++++++++ samples/Python/toolchain.gypi | 1420 ++++++++++++ vendor/README.md | 4 + vendor/grammars/language-gn | 1 + vendor/licenses/grammar/language-gn.txt | 32 + vendor/licenses/grammar/xquery.txt | 14 - 21 files changed, 15256 insertions(+), 15 deletions(-) create mode 100644 samples/GN/BUILD.2.gn create mode 100644 samples/GN/BUILD.3.gn create mode 100644 samples/GN/BUILD.gn create mode 100644 samples/GN/android-rules.gni create mode 100644 samples/GN/clang.gni create mode 100644 samples/GN/filenames/.gn create mode 100644 samples/GN/gcc_toolchain.gni create mode 100644 samples/GN/icu.gn create mode 100644 samples/GN/internal_rules.gni create mode 100644 samples/GN/ios-rules.gni create mode 100644 samples/GN/isolate.gni create mode 100644 samples/Python/filenames/.gclient create mode 100644 samples/Python/standalone.gypi create mode 100644 samples/Python/toolchain.gypi create mode 160000 vendor/grammars/language-gn create mode 100644 vendor/licenses/grammar/language-gn.txt delete mode 100644 vendor/licenses/grammar/xquery.txt diff --git a/.gitmodules b/.gitmodules index 1e71bd4ab6..69934d0f81 100644 --- a/.gitmodules +++ b/.gitmodules @@ -803,3 +803,6 @@ [submodule "vendor/grammars/language-fontforge"] path = vendor/grammars/language-fontforge url = https://github.com/Alhadis/language-fontforge +[submodule "vendor/grammars/language-gn"] + path = vendor/grammars/language-gn + url = https://github.com/devoncarew/language-gn diff --git a/grammars.yml b/grammars.yml index 2c710cb211..18f9f069a1 100755 --- a/grammars.yml +++ b/grammars.yml @@ -368,6 +368,8 @@ vendor/grammars/language-fontforge: - text.sfd vendor/grammars/language-gfm: - source.gfm +vendor/grammars/language-gn: +- source.gn vendor/grammars/language-graphql: - source.graphql vendor/grammars/language-haml: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index e4c0255844..5af7884d19 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -19,7 +19,7 @@ # language_id - Integer used as a language-name-independent indexed field so that we can rename # languages in Linguist without reindexing all the code on GitHub. Must not be # changed for existing languages without the explicit permission of GitHub staff. -# color - CSS hex color to represent the language. Only used if type is "programming" or "prose" +# color - CSS hex color to represent the language. Only used if type is "programming" or "prose". # tm_scope - The TextMate scope that represents this programming # language. This should match one of the scopes listed in # the grammars.yml file. Use "none" if there is no grammar @@ -1393,6 +1393,18 @@ GLSL: - ".vshader" ace_mode: glsl language_id: 124 +GN: + type: data + extensions: + - ".gn" + - ".gni" + interpreters: + - gn + tm_scope: source.gn + ace_mode: python + codemirror_mode: python + codemirror_mime_type: text/x-python + language_id: 302957008 Game Maker Language: type: programming color: "#8fb200" @@ -3392,6 +3404,7 @@ Python: - ".cgi" - ".fcgi" - ".gyp" + - ".gypi" - ".lmi" - ".py3" - ".pyde" @@ -3404,6 +3417,7 @@ Python: - ".wsgi" - ".xpy" filenames: + - .gclient - BUCK - BUILD - SConscript diff --git a/samples/GN/BUILD.2.gn b/samples/GN/BUILD.2.gn new file mode 100644 index 0000000000..4f97777a6a --- /dev/null +++ b/samples/GN/BUILD.2.gn @@ -0,0 +1,59 @@ +# Copyright 2016 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("../gni/isolate.gni") + +group("gn_all") { + testonly = true + + if (v8_test_isolation_mode != "noop") { + deps = [ + ":check-static-initializers_run", + ":jsfunfuzz_run", + ":run-deopt-fuzzer_run", + ":run-gcmole_run", + ":run-valgrind_run", + ] + } +} + +v8_isolate_run("check-static-initializers") { + deps = [ + "..:d8_run", + ] + + isolate = "check-static-initializers.isolate" +} + +v8_isolate_run("jsfunfuzz") { + deps = [ + "..:d8_run", + ] + + isolate = "jsfunfuzz/jsfunfuzz.isolate" +} + +v8_isolate_run("run-deopt-fuzzer") { + deps = [ + "..:d8_run", + ] + + isolate = "run-deopt-fuzzer.isolate" +} + +v8_isolate_run("run-gcmole") { + deps = [ + "..:d8_run", + ] + + isolate = "gcmole/run-gcmole.isolate" +} + +v8_isolate_run("run-valgrind") { + deps = [ + "..:d8_run", + ] + + isolate = "run-valgrind.isolate" +} diff --git a/samples/GN/BUILD.3.gn b/samples/GN/BUILD.3.gn new file mode 100644 index 0000000000..d0765475b5 --- /dev/null +++ b/samples/GN/BUILD.3.gn @@ -0,0 +1,1646 @@ +# Copyright (c) 2013 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/android/config.gni") +import("//build/config/chrome_build.gni") +import("//build/config/compiler/compiler.gni") +import("//build/config/nacl/config.gni") +import("//build/toolchain/cc_wrapper.gni") +import("//build/toolchain/toolchain.gni") +import("//build_overrides/build.gni") + +if (current_cpu == "arm" || current_cpu == "arm64") { + import("//build/config/arm.gni") +} +if (current_cpu == "mipsel" || current_cpu == "mips64el") { + import("//build/config/mips.gni") +} +if (is_mac) { + import("//build/config/mac/symbols.gni") +} + +declare_args() { + # Default to warnings as errors for default workflow, where we catch + # warnings with known toolchains. Allow overriding this e.g. for Chromium + # builds on Linux that could use a different version of the compiler. + # With GCC, warnings in no-Chromium code are always not treated as errors. + treat_warnings_as_errors = true + + # Normally, Android builds are lightly optimized, even for debug builds, to + # keep binary size down. Setting this flag to true disables such optimization + android_full_debug = false + + # Whether to use the binary binutils checked into third_party/binutils. + # These are not multi-arch so cannot be used except on x86 and x86-64 (the + # only two architectures that are currently checked in). Turn this off when + # you are using a custom toolchain and need to control -B in cflags. + linux_use_bundled_binutils = + linux_use_bundled_binutils_override && is_linux && + (current_cpu == "x64" || current_cpu == "x86") + binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", + root_build_dir) + + # Compile in such a way as to make it possible for the profiler to unwind full + # stack frames. Setting this flag has a large effect on the performance of the + # generated code than just setting profiling, but gives the profiler more + # information to analyze. + # Requires profiling to be set to true. + enable_full_stack_frames_for_profiling = false + + # When we are going to use gold we need to find it. + # This is initialized below, after use_gold might have been overridden. + gold_path = false + + if (is_win) { + # Whether the VS xtree header has been patched to disable warning 4702. If + # it has, then we don't need to disable 4702 (unreachable code warning). + # The patch is preapplied to the internal toolchain and hence all bots. + msvs_xtree_patched = false + } + + # Omit unwind support in official builds to save space. + # We can use breakpad for these builds. + exclude_unwind_tables = is_chrome_branded && is_official_build + + # If true, gold linker will save symbol table inside object files. + # This speeds up gdb startup by 60% + gdb_index = false + + # If true, optimize for size. Does not affect windows builds. + # Linux & Mac favor speed over size. + # TODO(brettw) it's weird that Mac and desktop Linux are different. We should + # explore favoring size over speed in this case as well. + optimize_for_size = is_android || is_ios + + # Enable fatal linker warnings. Building Chromium with certain versions + # of binutils can cause linker warning. + # See: https://bugs.chromium.org/p/chromium/issues/detail?id=457359 + fatal_linker_warnings = true + + # AFDO (Automatic Feedback Directed Optimizer) is a form of profile-guided + # optimization that GCC supports. It used by ChromeOS in their official + # builds. To use it, set auto_profile_path to the path to a file containing + # the needed gcov profiling data. + auto_profile_path = "" + + # Optimize for coverage guided fuzzing (balance between speed and number of + # branches) + optimize_for_fuzzing = false +} + +if (is_clang && !is_nacl) { + update_args = [ "--print-revision" ] + if (llvm_force_head_revision) { + update_args += [ "--llvm-force-head-revision" ] + } + clang_revision = + exec_script("//tools/clang/scripts/update.py", update_args, "trim string") +} + +# Apply the default logic for these values if they were not set explicitly. +if (gold_path == false) { + if (use_gold) { + gold_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", + root_build_dir) + } else { + gold_path = "" + } +} + +if (use_debug_fission == "default") { + use_debug_fission = is_debug && !is_win && use_gold && + linux_use_bundled_binutils && cc_wrapper == "" +} + +# default_include_dirs --------------------------------------------------------- +# +# This is a separate config so that third_party code (which would not use the +# source root and might have conflicting versions of some headers) can remove +# this and specify their own include paths. +config("default_include_dirs") { + include_dirs = [ + "//", + root_gen_dir, + ] +} + +# compiler --------------------------------------------------------------------- +# +# Base compiler configuration. +# +# See also "runtime_library" below for related stuff and a discussion about +# where stuff should go. Put warning related stuff in the "warnings" config. + +config("compiler") { + asmflags = [] + cflags = [] + cflags_c = [] + cflags_cc = [] + cflags_objc = [] + cflags_objcc = [] + ldflags = [] + defines = [] + configs = [] + + # System-specific flags. If your compiler flags apply to one of the + # categories here, add it to the associated file to keep this shared config + # smaller. + if (is_win) { + configs += [ "//build/config/win:compiler" ] + } else if (is_android) { + configs += [ "//build/config/android:compiler" ] + } else if (is_linux) { + configs += [ "//build/config/linux:compiler" ] + } else if (is_nacl) { + configs += [ "//build/config/nacl:compiler" ] + } else if (is_ios || is_mac) { + configs += [ "//build/config/mac:compiler" ] + } + + # Applies to all Posix systems. + if (is_posix) { + configs += [ "//build/config/posix:compiler" ] + } + + # See the definitions below. + configs += [ + ":compiler_cpu_abi", + ":compiler_codegen", + ] + + # In general, Windows is totally different, but all the other builds share + # some common GCC configuration. + if (!is_win) { + # Common GCC compiler flags setup. + # -------------------------------- + cflags += [ "-fno-strict-aliasing" ] # See http://crbug.com/32204 + cflags_cc += [ + # If this is removed then remove the corresponding /Zc:threadSafeInit- for + # Windows. + "-fno-threadsafe-statics", + + # Not exporting C++ inline functions can generally be applied anywhere + # so we do so here. Normal function visibility is controlled by + # //build/config/gcc:symbol_visibility_hidden. + "-fvisibility-inlines-hidden", + ] + + # Stack protection. + if (is_mac) { + # The strong variant of the stack protector significantly increases + # binary size, so only enable it in debug mode. + if (is_debug) { + cflags += [ "-fstack-protector-strong" ] + } else { + cflags += [ "-fstack-protector" ] + } + } else if (is_posix && !is_chromeos && !is_nacl) { + # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it. + # See also https://crbug.com/533294 + cflags += [ "--param=ssp-buffer-size=4" ] + + # The x86 toolchain currently has problems with stack-protector. + if (is_android && current_cpu == "x86") { + cflags += [ "-fno-stack-protector" ] + } else { + cflags += [ "-fstack-protector" ] + } + } + + # Linker warnings. + if (fatal_linker_warnings && !(is_chromeos && current_cpu == "arm") && + !(is_android && use_order_profiling) && !is_mac && !is_ios) { + # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 + # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1 + # crbug.com/485542 + ldflags += [ "-Wl,--fatal-warnings" ] + } + } + + if (is_clang && is_debug) { + # Allow comparing the address of references and 'this' against 0 + # in debug builds. Technically, these can never be null in + # well-defined C/C++ and Clang can optimize such checks away in + # release builds, but they may be used in asserts in debug builds. + cflags_cc += [ + "-Wno-undefined-bool-conversion", + "-Wno-tautological-undefined-compare", + ] + } + + if (is_clang && !is_nacl) { + # This is here so that all files get recompiled after a clang roll and + # when turning clang on or off. (defines are passed via the command line, + # and build system rebuild things when their commandline changes). Nothing + # should ever read this define. + defines += [ "CR_CLANG_REVISION=$clang_revision" ] + } + + # Non-Mac Posix compiler flags setup. + # ----------------------------------- + if (is_posix && !(is_mac || is_ios)) { + if (enable_profiling) { + if (!is_debug) { + cflags += [ "-g" ] + + if (enable_full_stack_frames_for_profiling) { + cflags += [ + "-fno-inline", + "-fno-optimize-sibling-calls", + ] + } + } + } + + defines += [ "_FILE_OFFSET_BITS=64" ] + + if (!is_android) { + defines += [ + "_LARGEFILE_SOURCE", + "_LARGEFILE64_SOURCE", + ] + } + + if (!is_nacl) { + if (exclude_unwind_tables) { + cflags += [ + "-fno-unwind-tables", + "-fno-asynchronous-unwind-tables", + ] + defines += [ "NO_UNWIND_TABLES" ] + } else { + cflags += [ "-funwind-tables" ] + } + } + } + + # Linux/Android common flags setup. + # --------------------------------- + if (is_linux || is_android) { + cflags += [ + "-fPIC", + "-pipe", # Use pipes for communicating between sub-processes. Faster. + ] + + ldflags += [ + "-fPIC", + "-Wl,-z,noexecstack", + "-Wl,-z,now", + "-Wl,-z,relro", + ] + if (!using_sanitizer) { + if (!use_cfi_diag) { + ldflags += [ "-Wl,-z,defs" ] + } + + # Functions interposed by the sanitizers can make ld think + # that some libraries aren't needed when they actually are, + # http://crbug.com/234010. As workaround, disable --as-needed. + if (!is_nacl && !is_android) { + # TODO(pcc): Fix linker bug which requires us to link pthread + # unconditionally here (crbug.com/623236). + ldflags += [ + "-Wl,--no-as-needed", + "-lpthread", + ] + } + ldflags += [ "-Wl,--as-needed" ] + } + } + + # Linux-specific compiler flags setup. + # ------------------------------------ + if (is_android && is_clang) { + _rebased_android_toolchain_root = + rebase_path(android_toolchain_root, root_build_dir) + + # Let clang find the linker in the NDK. + ldflags += [ "--gcc-toolchain=$_rebased_android_toolchain_root" ] + } + + if (is_posix && use_lld && !is_nacl) { + ldflags += [ "-fuse-ld=lld" ] + } else if (use_gold) { + ldflags += [ "-fuse-ld=gold" ] + if (is_android) { + # Use -mstackrealign due to a bug on ia32 Jelly Bean. + # See crbug.com/521527 + if (current_cpu == "x86") { + cflags += [ "-mstackrealign" ] + } + } else { + # On Android, this isn't needed. gcc in the NDK knows to look next to + # it with -fuse-ld=gold, and clang gets a --gcc-toolchain flag passed + # above. + ldflags += [ "-B$gold_path" ] + + if (linux_use_bundled_binutils) { + ldflags += [ + # Experimentation found that using four linking threads + # saved ~20% of link time. + # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36 + # Only apply this to the target linker, since the host + # linker might not be gold, but isn't used much anyway. + "-Wl,--threads", + "-Wl,--thread-count=4", + ] + } + } + + if (gdb_index) { + ldflags += [ "-Wl,--gdb-index" ] + } + + # TODO(thestig): Make this flag work with GN. + #if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan || is_msan)) { + # ldflags += [ + # "-Wl,--detect-odr-violations", + # ] + #} + } else if (linux_use_bundled_binutils) { + # Gold is the default linker for the bundled binutils so we explicitly + # enable the bfd linker when use_gold is not set. + ldflags += [ "-fuse-ld=bfd" ] + } + + if (is_posix && (use_gold || (use_lld && !is_nacl)) && !using_sanitizer && + !(is_android && use_order_profiling)) { + # TODO(crbug.com/576197) - gcc on x86 platforms + gold + icf=all + # doesn't currently work on non-chromeos platforms. + # Additionally, on Android x86 --icf=safe seems to cause issues as well. + # Additionally, on cast Android x86, --icf=all causes issues. + if (is_android && current_cpu == "x86") { + ldflags += [ "-Wl,--icf=none" ] + } else if ((is_clang && !is_android) || is_chromeos || + (current_cpu != "x86" && current_cpu != "x64")) { + # TODO(thakis): Remove `!is_android` above once our gold has been rolled + # with the fix for https://sourceware.org/bugzilla/show_bug.cgi?id=17704 + # merged. See also https://crbug.com/663886 + ldflags += [ "-Wl,--icf=all" ] + } else if (!is_android || is_clang) { + ldflags += [ "-Wl,--icf=safe" ] + } + } + + if (linux_use_bundled_binutils) { + cflags += [ "-B$binutils_path" ] + } + + # Clang-specific compiler flags setup. + # ------------------------------------ + if (is_clang) { + cflags += [ "-fcolor-diagnostics" ] + } + + # Print absolute paths in diagnostics. There is no precedent for doing this + # on Linux/Mac (GCC doesn't support it), but MSVC does this with /FC and + # Windows developers rely on it (crbug.com/636109) so only do this on Windows. + if (is_clang && is_win) { + cflags += [ "-fdiagnostics-absolute-paths" ] + } + + # Makes builds independent of absolute file path. + # clang-cl (used if is_win) doesn't expose this flag. + # Currently disabled for nacl since its toolchain lacks this flag (too old). + # TODO(zforman): Once nacl's toolchain is updated, remove check. + if (is_clang && is_linux) { + absolute_path = rebase_path("//.") + cflags += [ "-fdebug-prefix-map=$absolute_path=." ] + } + + # C++11 compiler flags setup. + # --------------------------- + if (is_linux || is_android || (is_nacl && is_clang)) { + # gnu++11 instead of c++11 is needed because some code uses typeof() (a + # GNU extension). + # TODO(thakis): Eventually switch this to c++11 instead, + # http://crbug.com/427584 + cflags_cc += [ "-std=gnu++11" ] + } else if (!is_win && !is_nacl) { + # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either gnu++11 + # or c++11; we technically don't need this toolchain any more, but there + # are still a few buildbots using it, so until those are turned off + # we need the !is_nacl clause and the (is_nacl && is_clang) clause, above. + cflags_cc += [ "-std=c++11" ] + } + + if (is_mac) { + cflags_cc += [ "-stdlib=libc++" ] + ldflags += [ "-stdlib=libc++" ] + } + + # Add flags for link-time optimization. These flags enable + # optimizations/transformations that require whole-program visibility at link + # time, so they need to be applied to all translation units, and we may end up + # with miscompiles if only part of the program is compiled with LTO flags. For + # that reason, we cannot allow targets to enable or disable these flags, for + # example by disabling the optimize configuration. + # TODO(pcc): Make this conditional on is_official_build rather than on gn + # flags for specific features. + if (!is_debug && (allow_posix_link_time_opt || is_cfi) && !is_nacl) { + if (use_thin_lto) { + cflags += [ "-flto=thin" ] + ldflags += [ "-flto=thin" ] + + # Limit the parallelism to avoid too agressive competition between + # linker jobs. This is still suboptimal to a potential dynamic + # resource allocation scheme, but should be good enough. + if (use_lld) { + ldflags += [ "-Wl,--thinlto-jobs=8" ] + } else { + ldflags += [ "-Wl,-plugin-opt,jobs=8" ] + } + } else { + # Note: ThinLTO does not currently have this feature implemented + # For Full LTO, it provides a measurable runtime speedup of Chrome. + cflags += [ + "-flto", + "-fwhole-program-vtables", + ] + ldflags += [ + "-flto", + "-fwhole-program-vtables", + ] + + # Apply a lower LTO optimization level as the default is too slow. + if (is_linux) { + if (use_lld) { + ldflags += [ "-Wl,--lto-O1" ] + } else { + ldflags += [ "-Wl,-plugin-opt,O1" ] + } + } else if (is_mac) { + ldflags += [ "-Wl,-mllvm,-O1" ] + } + } + + # Work-around for http://openradar.appspot.com/20356002 + if (is_mac) { + ldflags += [ "-Wl,-all_load" ] + } + + # Allows the linker to apply ICF to the LTO object file. Also, when + # targeting ARM, without this flag, LTO produces a .text section that is + # larger than the maximum call displacement, preventing the linker from + # relocating calls (http://llvm.org/PR22999). + if (is_linux) { + ldflags += [ "-Wl,-plugin-opt,-function-sections" ] + } + } + + # Pass the same C/C++ flags to the objective C/C++ compiler. + cflags_objc += cflags_c + cflags_objcc += cflags_cc + + # Assign any flags set for the C compiler to asmflags so that they are sent + # to the assembler. The Windows assembler takes different types of flags + # so only do so for posix platforms. + if (is_posix) { + asmflags += cflags + asmflags += cflags_c + } +} + +# This is separate from :compiler (and not even a sub-config there) +# so that some targets can remove it from the list with: +# configs -= [ "//build/config/compiler:pthread" ] +config("pthread") { + if (is_linux) { + cflags = [ "-pthread" ] + ldflags = [ "-pthread" ] + } +} + +# This provides the basic options to select the target CPU and ABI. +# It is factored out of "compiler" so that special cases can use this +# without using everything that "compiler" brings in. Options that +# tweak code generation for a particular CPU do not belong here! +# See "compiler_codegen", below. +config("compiler_cpu_abi") { + cflags = [] + ldflags = [] + + if (is_posix && !(is_mac || is_ios)) { + # CPU architecture. We may or may not be doing a cross compile now, so for + # simplicity we always explicitly set the architecture. + if (current_cpu == "x64") { + cflags += [ + "-m64", + "-march=x86-64", + ] + ldflags += [ "-m64" ] + } else if (current_cpu == "x86") { + cflags += [ "-m32" ] + ldflags += [ "-m32" ] + if (!is_nacl) { + cflags += [ + "-msse2", + "-mfpmath=sse", + "-mmmx", + ] + } + } else if (current_cpu == "arm") { + if (is_clang && !is_android && !is_nacl) { + cflags += [ "--target=arm-linux-gnueabihf" ] + ldflags += [ "--target=arm-linux-gnueabihf" ] + } + if (!is_nacl) { + cflags += [ + "-march=$arm_arch", + "-mfloat-abi=$arm_float_abi", + ] + } + if (arm_tune != "") { + cflags += [ "-mtune=$arm_tune" ] + } + } else if (current_cpu == "arm64") { + if (is_clang && !is_android && !is_nacl) { + cflags += [ "--target=aarch64-linux-gnu" ] + ldflags += [ "--target=aarch64-linux-gnu" ] + } + } else if (current_cpu == "mipsel" && !is_nacl) { + if (mips_arch_variant == "r6") { + if (is_clang) { + cflags += [ + "--target=mipsel-linux-gnu", + "-march=mips32r6", + ] + ldflags += [ "--target=mipsel-linux-gnu" ] + } else { + cflags += [ + "-mips32r6", + "-Wa,-mips32r6", + ] + if (is_android) { + ldflags += [ + "-mips32r6", + "-Wl,-melf32ltsmip", + ] + } + } + if (mips_use_msa == true) { + cflags += [ + "-mmsa", + "-mfp64", + ] + } + } else if (mips_arch_variant == "r2") { + if (is_clang) { + if (is_android) { + cflags += [ + "--target=mipsel-linux-android", + "-march=mipsel", + "-mcpu=mips32r2", + ] + ldflags += [ "--target=mipsel-linux-android" ] + } else { + cflags += [ + "--target=mipsel-linux-gnu", + "-march=mipsel", + "-mcpu=mips32r2", + ] + ldflags += [ "--target=mipsel-linux-gnu" ] + } + } else { + cflags += [ + "-mips32r2", + "-Wa,-mips32r2", + ] + if (mips_float_abi == "hard" && mips_fpu_mode != "") { + cflags += [ "-m$mips_fpu_mode" ] + } + } + } else if (mips_arch_variant == "r1") { + if (is_clang) { + if (is_android) { + cflags += [ + "--target=mipsel-linux-android", + "-march=mipsel", + "-mcpu=mips32", + ] + ldflags += [ "--target=mipsel-linux-android" ] + } else { + cflags += [ + "--target=mipsel-linux-gnu", + "-march=mipsel", + "-mcpu=mips32", + ] + ldflags += [ "--target=mipsel-linux-gnu" ] + } + } else { + cflags += [ + "-mips32", + "-Wa,-mips32", + ] + } + } + + if (mips_dsp_rev == 1) { + cflags += [ "-mdsp" ] + } else if (mips_dsp_rev == 2) { + cflags += [ "-mdspr2" ] + } + + cflags += [ "-m${mips_float_abi}-float" ] + } else if (current_cpu == "mips64el") { + if (mips_arch_variant == "r6") { + if (is_clang) { + if (is_android) { + cflags += [ + "--target=mips64el-linux-android", + "-march=mips64el", + "-mcpu=mips64r6", + ] + ldflags += [ "--target=mips64el-linux-android" ] + } + } else { + cflags += [ + "-mips64r6", + "-Wa,-mips64r6", + ] + ldflags += [ "-mips64r6" ] + } + if (mips_use_msa == true) { + cflags += [ + "-mmsa", + "-mfp64", + ] + } + } else if (mips_arch_variant == "r2") { + cflags += [ + "-mips64r2", + "-Wa,-mips64r2", + ] + ldflags += [ "-mips64r2" ] + } + } else if (current_cpu == "pnacl" && is_nacl_nonsfi) { + if (target_cpu == "x86" || target_cpu == "x64") { + cflags += [ + "-arch", + "x86-32-nonsfi", + "--pnacl-bias=x86-32-nonsfi", + "--target=i686-unknown-nacl", + ] + ldflags += [ + "-arch", + "x86-32-nonsfi", + "--target=i686-unknown-nacl", + ] + } else if (target_cpu == "arm") { + cflags += [ + "-arch", + "arm-nonsfi", + "-mfloat-abi=hard", + "--pnacl-bias=arm-nonsfi", + "--target=armv7-unknown-nacl-gnueabihf", + ] + ldflags += [ + "-arch", + "arm-nonsfi", + "--target=armv7-unknown-nacl-gnueabihf", + ] + } + } + } + + asmflags = cflags +} + +# This provides options to tweak code generation that are necessary +# for particular Chromium code or for working around particular +# compiler bugs (or the combination of the two). +config("compiler_codegen") { + configs = [] + cflags = [] + + if (is_nacl) { + configs += [ "//build/config/nacl:compiler_codegen" ] + } else if (is_posix && !is_mac && !is_ios) { + if (current_cpu == "x86") { + if (is_clang) { + cflags += [ + # Else building libyuv gives clang's register allocator issues, + # see llvm.org/PR15798 / crbug.com/233709 + "-momit-leaf-frame-pointer", + ] + } + } else if (current_cpu == "arm") { + if (is_android && !is_clang) { + # Clang doesn't support these flags. + cflags += [ + # The tree-sra optimization (scalar replacement for + # aggregates enabling subsequent optimizations) leads to + # invalid code generation when using the Android NDK's + # compiler (r5-r7). This can be verified using + # webkit_unit_tests' WTF.Checked_int8_t test. + "-fno-tree-sra", + + # The following option is disabled to improve binary + # size and performance in gcc 4.9. + "-fno-caller-saves", + ] + } + } + } + + asmflags = cflags +} + +# This is separate from :compiler_codegen (and not even a sub-config there) +# so that some targets can remove it from the list with: +# configs -= [ "//build/config/compiler:clang_stackrealign" ] +# See https://crbug.com/556393 for details of where it must be avoided. +config("clang_stackrealign") { + if (is_clang && current_cpu == "x86" && is_linux) { + cflags = [ + # Align the stack on 16-byte boundaries, http://crbug.com/418554. + "-mstack-alignment=16", + "-mstackrealign", + ] + } +} + +config("compiler_arm_fpu") { + if (current_cpu == "arm" && !is_ios && !is_nacl) { + cflags = [ "-mfpu=$arm_fpu" ] + asmflags = cflags + } +} + +config("compiler_arm_thumb") { + if (current_cpu == "arm" && arm_use_thumb && is_posix && + !(is_mac || is_ios || is_nacl)) { + cflags = [ "-mthumb" ] + if (is_android && !is_clang) { + # Clang doesn't support this option. + cflags += [ "-mthumb-interwork" ] + } + } +} + +config("compiler_arm") { + if (current_cpu == "arm" && is_chromeos) { + # arm is normally the default mode for clang, but on chromeos a wrapper + # is used to pass -mthumb, and therefor change the default. + cflags = [ "-marm" ] + } +} + +# runtime_library ------------------------------------------------------------- +# +# Sets the runtime library and associated options. +# +# How do you determine what should go in here vs. "compiler" above? Consider if +# a target might choose to use a different runtime library (ignore for a moment +# if this is possible or reasonable on your system). If such a target would want +# to change or remove your option, put it in the runtime_library config. If a +# target wants the option regardless, put it in the compiler config. + +config("runtime_library") { + defines = [] + configs = [] + + # System-specific flags. If your compiler flags apply to one of the + # categories here, add it to the associated file to keep this shared config + # smaller. + if (is_win) { + configs += [ "//build/config/win:runtime_library" ] + } else if (is_linux) { + configs += [ "//build/config/linux:runtime_library" ] + } else if (is_ios) { + configs += [ "//build/config/ios:runtime_library" ] + } else if (is_mac) { + configs += [ "//build/config/mac:runtime_library" ] + } else if (is_android) { + configs += [ "//build/config/android:runtime_library" ] + } + + if (is_posix) { + configs += [ "//build/config/posix:runtime_library" ] + } + + if (is_component_build) { + defines += [ "COMPONENT_BUILD" ] + } +} + +# default_warnings ------------------------------------------------------------ +# +# Collects all warning flags that are used by default. This is used as a +# subconfig of both chromium_code and no_chromium_code. This way these +# flags are guaranteed to appear on the compile command line after -Wall. +config("default_warnings") { + cflags = [] + cflags_cc = [] + + if (is_win) { + if (treat_warnings_as_errors) { + cflags += [ "/WX" ] + } + + cflags += [ + # Warnings permanently disabled: + + # C4091: 'typedef ': ignored on left of 'X' when no variable is + # declared. + # This happens in a number of Windows headers. Dumb. + "/wd4091", + + # C4127: conditional expression is constant + # This warning can in theory catch dead code and other problems, but + # triggers in far too many desirable cases where the conditional + # expression is either set by macros or corresponds some legitimate + # compile-time constant expression (due to constant template args, + # conditionals comparing the sizes of different types, etc.). Some of + # these can be worked around, but it's not worth it. + "/wd4127", + + # C4251: 'identifier' : class 'type' needs to have dll-interface to be + # used by clients of class 'type2' + # This is necessary for the shared library build. + "/wd4251", + + # C4351: new behavior: elements of array 'array' will be default + # initialized + # This is a silly "warning" that basically just alerts you that the + # compiler is going to actually follow the language spec like it's + # supposed to, instead of not following it like old buggy versions did. + # There's absolutely no reason to turn this on. + "/wd4351", + + # C4355: 'this': used in base member initializer list + # It's commonly useful to pass |this| to objects in a class' initializer + # list. While this warning can catch real bugs, most of the time the + # constructors in question don't attempt to call methods on the passed-in + # pointer (until later), and annotating every legit usage of this is + # simply more hassle than the warning is worth. + "/wd4355", + + # C4503: 'identifier': decorated name length exceeded, name was + # truncated + # This only means that some long error messages might have truncated + # identifiers in the presence of lots of templates. It has no effect on + # program correctness and there's no real reason to waste time trying to + # prevent it. + "/wd4503", + + # Warning C4589 says: "Constructor of abstract class ignores + # initializer for virtual base class." Disable this warning because it + # is flaky in VS 2015 RTM. It triggers on compiler generated + # copy-constructors in some cases. + "/wd4589", + + # C4611: interaction between 'function' and C++ object destruction is + # non-portable + # This warning is unavoidable when using e.g. setjmp/longjmp. MSDN + # suggests using exceptions instead of setjmp/longjmp for C++, but + # Chromium code compiles without exception support. We therefore have to + # use setjmp/longjmp for e.g. JPEG decode error handling, which means we + # have to turn off this warning (and be careful about how object + # destruction happens in such cases). + "/wd4611", + + # Warnings to evaluate and possibly fix/reenable later: + + "/wd4100", # Unreferenced formal function parameter. + "/wd4121", # Alignment of a member was sensitive to packing. + "/wd4244", # Conversion: possible loss of data. + "/wd4505", # Unreferenced local function has been removed. + "/wd4510", # Default constructor could not be generated. + "/wd4512", # Assignment operator could not be generated. + "/wd4610", # Class can never be instantiated, constructor required. + "/wd4838", # Narrowing conversion. Doesn't seem to be very useful. + "/wd4995", # 'X': name was marked as #pragma deprecated + "/wd4996", # Deprecated function warning. + + # These are variable shadowing warnings that are new in VS2015. We + # should work through these at some point -- they may be removed from + # the RTM release in the /W4 set. + "/wd4456", + "/wd4457", + "/wd4458", + "/wd4459", + ] + + cflags += [ + # C4312 is a VS 2015 64-bit warning for integer to larger pointer. + # TODO(brucedawson): fix warnings, crbug.com/554200 + "/wd4312", + ] + + if (current_cpu == "x86") { + cflags += [ + # VC++ 2015 changes 32-bit size_t truncation warnings from 4244 to + # 4267. Example: short TruncTest(size_t x) { return x; } + # Since we disable 4244 we need to disable 4267 during migration. + # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. + "/wd4267", + ] + } + + # VS xtree header file needs to be patched or 4702 (unreachable code + # warning) is reported if _HAS_EXCEPTIONS=0. Disable the warning if xtree is + # not patched. + if (!msvs_xtree_patched && + exec_script("../../win_is_xtree_patched.py", [], "value") == 0) { + cflags += [ "/wd4702" ] # Unreachable code. + } + + # Building with Clang on Windows is a work in progress and very + # experimental. See crbug.com/82385. + if (is_clang) { + cflags += [ + # TODO(hans): Make this list shorter eventually, http://crbug.com/504657 + "-Wno-microsoft-enum-value", # http://crbug.com/505296 + "-Wno-unknown-pragmas", # http://crbug.com/505314 + "-Wno-microsoft-cast", # http://crbug.com/550065 + ] + } + } else { + if (is_mac && !is_nacl) { + # When compiling Objective-C, warns if a method is used whose + # availability is newer than the deployment target. This is not + # required when compiling Chrome for iOS. + cflags += [ "-Wpartial-availability" ] + } + + # Suppress warnings about ABI changes on ARM (Clang doesn't give this + # warning). + if (current_cpu == "arm" && !is_clang) { + cflags += [ "-Wno-psabi" ] + } + + if (!is_clang) { + cflags_cc += [ + # See comment for -Wno-c++11-narrowing. + "-Wno-narrowing", + ] + + # Don't warn about the "typedef 'foo' locally defined but not used" + # for gcc 4.8. + # TODO: remove this flag once all builds work. See crbug.com/227506 + cflags += [ "-Wno-unused-local-typedefs" ] + + # Don't warn about "maybe" uninitialized. Clang doesn't include this + # in -Wall but gcc does, and it gives false positives. + cflags += [ "-Wno-maybe-uninitialized" ] + } + } + + # Common Clang and GCC warning setup. + if (!is_win || is_clang) { + cflags += [ + # Disables. + "-Wno-missing-field-initializers", # "struct foo f = {0};" + "-Wno-unused-parameter", # Unused function parameters. + ] + } + + if (is_chromeos) { + # TODO(thakis): Remove, http://crbug.com/263960 + if (is_clang) { + cflags_cc += [ "-Wno-reserved-user-defined-literal" ] + } else { + cflags_cc += [ "-Wno-literal-suffix" ] + } + } + + if (is_clang) { + cflags += [ + # TODO(thakis): Consider -Wloop-analysis (turns on + # -Wrange-loop-analysis too). + + # This warns on using ints as initializers for floats in + # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|), + # which happens in several places in chrome code. Not sure if + # this is worth fixing. + "-Wno-c++11-narrowing", + + # Warns on switches on enums that cover all enum values but + # also contain a default: branch. Chrome is full of that. + "-Wno-covered-switch-default", + + # Clang considers the `register` keyword as deprecated, but e.g. + # code generated by flex (used in angle) contains that keyword. + # http://crbug.com/255186 + "-Wno-deprecated-register", + + # TODO(thakis): This used to be implied by -Wno-unused-function, + # which we no longer use. Check if it makes sense to remove + # this as well. http://crbug.com/316352 + "-Wno-unneeded-internal-declaration", + + # TODO(hans): Get this cleaned up, http://crbug.com/428099 + "-Wno-inconsistent-missing-override", + ] + + # Chrome's hermetic Clang compiler, NaCl's Clang compiler and Xcode's Clang + # compiler will almost always have different versions. Certain flags may not + # be recognized by one version or the other. + if (!is_nacl) { + # Flags NaCl (Clang 3.7) does not recognize. + cflags += [ + # TODO(thakis): Enable this, crbug.com/507717 + "-Wno-shift-negative-value", + ] + } + if (!is_nacl && !use_xcode_clang) { + # Flags NaCl (Clang 3.7) and Xcode 7.3 (Clang clang-703.0.31) do not + # recognize. + cflags += [ + # TODO(thakis): https://crbug.com/604888 + "-Wno-undefined-var-template", + + # TODO(thakis): https://crbug.com/617318 + "-Wno-nonportable-include-path", + + # TODO(hans): https://crbug.com/637306 + "-Wno-address-of-packed-member", + ] + } + } +} + +# chromium_code --------------------------------------------------------------- +# +# Toggles between higher and lower warnings for code that is (or isn't) +# part of Chromium. + +config("chromium_code") { + if (is_win) { + cflags = [ "/W4" ] # Warning level 4. + + # Assume UTF-8 by default to avoid code page dependencies. + cflags += [ "/utf-8" ] + } else { + cflags = [ "-Wall" ] + if (treat_warnings_as_errors) { + cflags += [ "-Werror" ] + + # The compiler driver can sometimes (rarely) emit warnings before calling + # the actual linker. Make sure these warnings are treated as errors as + # well. + ldflags = [ "-Werror" ] + } + if (is_clang) { + # Enable -Wextra for chromium_code when we control the compiler. + cflags += [ "-Wextra" ] + } + + # In Chromium code, we define __STDC_foo_MACROS in order to get the + # C99 macros on Mac and Linux. + defines = [ + "__STDC_CONSTANT_MACROS", + "__STDC_FORMAT_MACROS", + ] + + if (!is_debug && !using_sanitizer && + (!is_linux || !is_clang || is_official_build)) { + # _FORTIFY_SOURCE isn't really supported by Clang now, see + # http://llvm.org/bugs/show_bug.cgi?id=16821. + # It seems to work fine with Ubuntu 12 headers though, so use it in + # official builds. + # + # Non-chromium code is not guaranteed to compile cleanly with + # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are + # disabled, so only do that for Release build. + defines += [ "_FORTIFY_SOURCE=2" ] + } + + if (is_mac || is_ios) { + cflags_objc = [ "-Wobjc-missing-property-synthesis" ] + cflags_objcc = [ "-Wobjc-missing-property-synthesis" ] + } + } + + configs = [ ":default_warnings" ] +} + +config("no_chromium_code") { + cflags = [] + cflags_cc = [] + defines = [] + + if (is_win) { + cflags += [ + "/W3", # Warning level 3. + "/wd4800", # Disable warning when forcing value to bool. + "/wd4267", # TODO(jschuh): size_t to int. + "/wd4996", # Deprecated function warning. + ] + defines += [ + "_CRT_NONSTDC_NO_WARNINGS", + "_CRT_NONSTDC_NO_DEPRECATE", + ] + } else { + # GCC may emit unsuppressible warnings so don't add -Werror for no chromium + # code. crbug.com/589724 + if (treat_warnings_as_errors && is_clang) { + cflags += [ "-Werror" ] + ldflags = [ "-Werror" ] + } + if (is_clang && !is_nacl) { + # TODO(thakis): Remove !is_nacl once + # https://codereview.webrtc.org/1552863002/ made its way into chromium. + cflags += [ "-Wall" ] + } + } + + if (is_clang) { + cflags += [ + # Lots of third-party libraries have unused variables. Instead of + # suppressing them individually, we just blanket suppress them here. + "-Wno-unused-variable", + ] + } + + if (is_linux || is_android) { + cflags_cc += [ + # Don't warn about hash_map in third-party code. + "-Wno-deprecated", + ] + } + + configs = [ ":default_warnings" ] +} + +# rtti ------------------------------------------------------------------------ +# +# Allows turning Run-Time Type Identification on or off. + +config("rtti") { + if (is_win) { + cflags_cc = [ "/GR" ] + } else { + cflags_cc = [ "-frtti" ] + } +} +config("no_rtti") { + # CFI diagnostics and UBsan vptr require RTTI. + if (!use_cfi_diag && !is_ubsan_vptr && !is_ubsan_security) { + if (is_win) { + cflags_cc = [ "/GR-" ] + } else { + cflags_cc = [ "-fno-rtti" ] + cflags_objcc = cflags_cc + } + } +} + +# Warnings --------------------------------------------------------------------- + +# This will generate warnings when using Clang if code generates exit-time +# destructors, which will slow down closing the program. +# TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 +config("wexit_time_destructors") { + # TODO: Enable on Windows too, http://crbug.com/404525 + if (is_clang && !is_win) { + cflags = [ "-Wexit-time-destructors" ] + } +} + +# On Windows compiling on x64, VC will issue a warning when converting +# size_t to int because it will truncate the value. Our code should not have +# these warnings and one should use a static_cast or a checked_cast for the +# conversion depending on the case. However, a lot of code still needs to be +# fixed. Apply this config to such targets to disable the warning. +# +# Note that this can be applied regardless of platform and architecture to +# clean up the call sites. This will only apply the flag when necessary. +# +# TODO(jschuh): crbug.com/167187 fix this and delete this config. +config("no_size_t_to_int_warning") { + if (is_win && current_cpu == "x64") { + cflags = [ "/wd4267" ] + } +} + +# Some code presumes that pointers to structures/objects are compatible +# regardless of whether what they point to is already known to be valid. +# gcc 4.9 and earlier had no way of suppressing this warning without +# supressing the rest of them. Here we centralize the identification of +# the gcc 4.9 toolchains. +config("no_incompatible_pointer_warnings") { + cflags = [] + if (is_clang) { + cflags += [ "-Wno-incompatible-pointer-types" ] + } else if (current_cpu == "mipsel") { + cflags += [ "-w" ] + } else if (is_chromeos && current_cpu == "arm") { + cflags += [ "-w" ] + } +} + +# Optimization ----------------------------------------------------------------- +# +# The BUILDCONFIG file sets the "default_optimization" config on targets by +# default. It will be equivalent to either "optimize" (release) or +# "no_optimize" (debug) optimization configs. +# +# You can override the optimization level on a per-target basis by removing the +# default config and then adding the named one you want: +# +# configs -= [ "//build/config/compiler:default_optimization" ] +# configs += [ "//build/config/compiler:optimize_max" ] + +# Shared settings for both "optimize" and "optimize_max" configs. +# IMPORTANT: On Windows "/O1" and "/O2" must go before the common flags. +if (is_win) { + common_optimize_on_cflags = [ + "/Ob2", # Both explicit and auto inlining. + "/Oy-", # Disable omitting frame pointers, must be after /O2. + "/d2Zi+", # Improve debugging of optimized code. + "/Zc:inline", # Remove unreferenced COMDAT (faster links). + ] + if (!is_asan) { + common_optimize_on_cflags += [ + # Put data in separate COMDATs. This allows the linker + # to put bit-identical constants at the same address even if + # they're unrelated constants, which saves binary size. + # This optimization can't be used when ASan is enabled because + # it is not compatible with the ASan ODR checker. + "/Gw", + ] + } + common_optimize_on_ldflags = [] + if (!is_component_build) { + common_optimize_on_ldflags += [ "/OPT:ICF" ] # Redundant COMDAT folding. + } + if (is_official_build) { + common_optimize_on_ldflags += [ "/OPT:REF" ] # Remove unreferenced data. + if (!use_lld) { + common_optimize_on_ldflags += [ + # Set the number of LTCG code-gen threads to eight. The default is four. + # This gives a 5-10% link speedup. + "/cgthreads:8", + ] + if (use_incremental_wpo) { + # Incremental Link-time code generation. + common_optimize_on_ldflags += [ "/LTCG:INCREMENTAL" ] + } else { + common_optimize_on_ldflags += [ "/LTCG" ] # Link-time code generation. + } + } + if (full_wpo_on_official) { + if (use_incremental_wpo) { + arflags = [ "/LTCG:INCREMENTAL" ] + } else { + arflags = [ "/LTCG" ] + } + } + } +} else { + common_optimize_on_cflags = [] + common_optimize_on_ldflags = [] + + if (is_android) { + # TODO(jdduke) Re-enable on mips after resolving linking + # issues with libc++ (crbug.com/456380). + if (current_cpu != "mipsel" && current_cpu != "mips64el") { + common_optimize_on_ldflags += [ + # Warn in case of text relocations. + "-Wl,--warn-shared-textrel", + ] + } + } + + if (is_mac || is_ios) { + if (symbol_level == 2) { + # Mac dead code stripping requires symbols. + common_optimize_on_ldflags += [ "-Wl,-dead_strip" ] + } + } else { + # Non-Mac Posix flags. + + common_optimize_on_cflags += [ + # Don't emit the GCC version ident directives, they just end up in the + # .comment section taking up binary size. + "-fno-ident", + + # Put data and code in their own sections, so that unused symbols + # can be removed at link time with --gc-sections. + "-fdata-sections", + "-ffunction-sections", + ] + + common_optimize_on_ldflags += [ + # Specifically tell the linker to perform optimizations. + # See http://lwn.net/Articles/192624/ . + "-Wl,-O1", + "-Wl,--gc-sections", + ] + } +} + +config("default_stack_frames") { + if (is_posix && !(is_mac || is_ios)) { + if (using_sanitizer || enable_profiling || is_debug || + current_cpu == "arm64") { + # Explicitly ask for frame pointers, otherwise: + # * Stacks may be missing for sanitizer and profiling builds. + # * Debug tcmalloc can crash (crbug.com/636489). + # * Stacks may be missing for arm64 crash dumps (crbug.com/391706). + cflags = [ "-fno-omit-frame-pointer" ] + } else if (is_android) { + cflags = [ "-fomit-frame-pointer" ] + } + } +} + +# Default "optimization on" config. +config("optimize") { + if (is_win) { + # TODO(thakis): Remove is_clang here, https://crbug.com/598772 + if (is_official_build && full_wpo_on_official && !is_clang) { + common_optimize_on_cflags += [ + "/GL", # Whole program optimization. + + # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds. + # Probably anything that this would catch that wouldn't be caught in a + # normal build isn't going to actually be a bug, so the incremental + # value of C4702 for PGO builds is likely very small. + "/wd4702", + ] + } + + # Favor size over speed, /O1 must be before the common flags. The GYP + # build also specifies /Os and /GF but these are implied by /O1. + cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ] + } else if (optimize_for_size) { + # Favor size over speed. + cflags = [ "-Os" ] + common_optimize_on_cflags + } else { + cflags = [ "-O2" ] + common_optimize_on_cflags + } + ldflags = common_optimize_on_ldflags +} + +# Same config as 'optimize' but without the WPO flag. +config("optimize_no_wpo") { + if (is_win) { + # Favor size over speed, /O1 must be before the common flags. The GYP + # build also specifies /Os and /GF but these are implied by /O1. + cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ] + } else if (optimize_for_size) { + # Favor size over speed. + cflags = [ "-Os" ] + common_optimize_on_cflags + } else if (optimize_for_fuzzing) { + cflags = [ "-O1" ] + common_optimize_on_cflags + } else { + cflags = [ "-O2" ] + common_optimize_on_cflags + } + ldflags = common_optimize_on_ldflags +} + +# Turn off optimizations. +config("no_optimize") { + if (is_win) { + cflags = [ + "/Od", # Disable optimization. + "/Ob0", # Disable all inlining (on by default). + ] + } else if (is_android && !android_full_debug) { + # On Android we kind of optimize some things that don't affect debugging + # much even when optimization is disabled to get the binary size down. + cflags = [ "-Os" ] + } else { + cflags = [ "-O0" ] + ldflags = [] + } +} + +# Turns up the optimization level. On Windows, this implies whole program +# optimization and link-time code generation which is very expensive and should +# be used sparingly. +config("optimize_max") { + if (is_nacl_irt) { + # The NaCl IRT is a special case and always wants its own config. + # Various components do: + # if (!is_debug) { + # configs -= [ "//build/config/compiler:default_optimization" ] + # configs += [ "//build/config/compiler:optimize_max" ] + # } + # So this config has to have the selection logic just like + # "default_optimization", below. + configs = [ "//build/config/nacl:irt_optimize" ] + } else { + ldflags = common_optimize_on_ldflags + if (is_win) { + # Favor speed over size, /O2 must be before the common flags. The GYP + # build also specifies /Ot, /Oi, and /GF, but these are implied by /O2. + cflags = [ "/O2" ] + common_optimize_on_cflags + + if (is_official_build) { + if (!is_clang) { + cflags += [ + "/GL", # Whole program optimization. + + # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds. + # Probably anything that this would catch that wouldn't be caught + # in a normal build isn't going to actually be a bug, so the + # incremental value of C4702 for PGO builds is likely very small. + "/wd4702", + ] + } else if (is_clang && use_lld) { + cflags += [ "-flto" ] # Link-time optimization (whole program optimization). + } + } + } else if (optimize_for_fuzzing) { + cflags = [ "-O1" ] + common_optimize_on_cflags + } else { + cflags = [ "-O2" ] + common_optimize_on_cflags + } + } +} + +# This config can be used to override the default settings for per-component +# and whole-program optimization, optimizing the particular target for speed +# instead of code size. This config is exactly the same as "optimize_max" +# except that we use -O3 instead of -O2 on non-win, non-IRT platforms. +# +# TODO(crbug.com/621335) - rework how all of these configs are related +# so that we don't need this disclaimer. +config("optimize_speed") { + if (is_nacl_irt) { + # The NaCl IRT is a special case and always wants its own config. + # Various components do: + # if (!is_debug) { + # configs -= [ "//build/config/compiler:default_optimization" ] + # configs += [ "//build/config/compiler:optimize_max" ] + # } + # So this config has to have the selection logic just like + # "default_optimization", below. + configs = [ "//build/config/nacl:irt_optimize" ] + } else { + ldflags = common_optimize_on_ldflags + if (is_win) { + # Favor speed over size, /O2 must be before the common flags. The GYP + # build also specifies /Ot, /Oi, and /GF, but these are implied by /O2. + cflags = [ "/O2" ] + common_optimize_on_cflags + + # TODO(thakis): Remove is_clang here, https://crbug.com/598772 + if (is_official_build && !is_clang) { + cflags += [ + "/GL", # Whole program optimization. + + # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds. + # Probably anything that this would catch that wouldn't be caught in a + # normal build isn't going to actually be a bug, so the incremental + # value of C4702 for PGO builds is likely very small. + "/wd4702", + ] + } + } else if (optimize_for_fuzzing) { + cflags = [ "-O1" ] + common_optimize_on_cflags + } else { + cflags = [ "-O3" ] + common_optimize_on_cflags + } + } +} + +config("optimize_fuzzing") { + cflags = [ "-O1" ] + common_optimize_on_cflags + ldflags = common_optimize_on_ldflags + visibility = [ ":default_optimization" ] +} + +# The default optimization applied to all targets. This will be equivalent to +# either "optimize" or "no_optimize", depending on the build flags. +config("default_optimization") { + if (is_nacl_irt) { + # The NaCl IRT is a special case and always wants its own config. + # It gets optimized the same way regardless of the type of build. + configs = [ "//build/config/nacl:irt_optimize" ] + } else if (is_debug) { + configs = [ ":no_optimize" ] + } else if (optimize_for_fuzzing) { + assert(!is_win, "Fuzzing optimize level not supported on Windows") + configs = [ ":optimize_fuzzing" ] + } else { + configs = [ ":optimize" ] + } +} + +# GCC supports a form of profile-guided optimization called AFDO, which +# is used by ChromeOS in their official builds. However, +# //base/allocator:tcmalloc currently doesn't work correctly with AFDO +# so we provide separate config so that the flag can be disabled per-target. +# TODO(crbug.com/633719): Remove this config once tcmalloc works with AFDO +# or we remove tcmalloc or we stop using AFDO. +config("afdo") { + if (auto_profile_path != "" && current_toolchain == default_toolchain) { + cflags = [ "-fauto-profile=${auto_profile_path}" ] + } +} + +# Symbols ---------------------------------------------------------------------- + +# The BUILDCONFIG file sets the "default_symbols" config on targets by +# default. It will be equivalent to one the three specific symbol levels. +# +# You can override the symbol level on a per-target basis by removing the +# default config and then adding the named one you want: +# +# configs -= [ "//build/config/compiler:default_symbols" ] +# configs += [ "//build/config/compiler:symbols" ] + +# Full symbols. +config("symbols") { + if (is_win) { + cflags = [ "/Zi" ] # Produce PDB file, no edit and continue. + + if (is_win_fastlink) { + # Tell VS 2015+ to create a PDB that references debug + # information in .obj and .lib files instead of copying + # it all. This flag is incompatible with /PROFILE + ldflags = [ "/DEBUG:FASTLINK" ] + } else { + ldflags = [ "/DEBUG" ] + } + } else { + if (is_mac || is_ios) { + cflags = [ "-gdwarf-2" ] + if (is_mac && enable_dsyms) { + # If generating dSYMs, specify -fno-standalone-debug. This was + # originally specified for https://crbug.com/479841 because dsymutil + # could not handle a 4GB dSYM file. But dsymutil from Xcodes prior to + # version 7 also produces debug data that is incompatible with Breakpad + # dump_syms, so this is still required (https://crbug.com/622406). + cflags += [ "-fno-standalone-debug" ] + } + } else if (is_android) { + # Breakpad can't handle DWARF 4 symbols properly yet, so use DWARF 3 + # explicitly on android where we are hitting https://crbug.com/638485. + # The arguments MUST be in this order because of a gcc arg parsing bug. + cflags = [ + "-gdwarf-3", + "-g2", + ] + } else { + cflags = [ "-g2" ] + } + if (use_debug_fission) { + cflags += [ "-gsplit-dwarf" ] + } + asmflags = cflags + ldflags = [] + } +} + +# Minimal symbols. +config("minimal_symbols") { + if (is_win) { + # Linker symbols for backtraces only. + cflags = [] + ldflags = [ "/DEBUG" ] + } else { + if (is_android) { + # Breakpad can't handle DWARF 4 symbols properly yet, so use DWARF 3 + # explicitly on android where we are hitting https://crbug.com/638485. + # The arguments MUST be in this order because of a gcc arg parsing bug. + cflags = [ + "-gdwarf-3", + "-g1", + ] + } else { + cflags = [ "-g1" ] + } + if (use_debug_fission) { + cflags += [ "-gsplit-dwarf" ] + } + asmflags = cflags + ldflags = [] + } +} + +# No symbols. +config("no_symbols") { + if (!is_win) { + cflags = [ "-g0" ] + asmflags = cflags + } +} + +# Default symbols. +config("default_symbols") { + if (symbol_level == 0) { + configs = [ ":no_symbols" ] + } else if (symbol_level == 1) { + configs = [ ":minimal_symbols" ] + } else if (symbol_level == 2) { + configs = [ ":symbols" ] + } else { + assert(false) + } +} + +if (is_ios || is_mac) { + # On Mac and iOS, this enables support for ARC (automatic ref-counting). + # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. + config("enable_arc") { + common_flags = [ "-fobjc-arc" ] + cflags_objc = common_flags + cflags_objcc = common_flags + } +} diff --git a/samples/GN/BUILD.gn b/samples/GN/BUILD.gn new file mode 100644 index 0000000000..dcefe3706b --- /dev/null +++ b/samples/GN/BUILD.gn @@ -0,0 +1,2583 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/android/config.gni") +import("//build/config/arm.gni") +import("//build/config/dcheck_always_on.gni") +import("//build/config/mips.gni") +import("//build/config/sanitizers/sanitizers.gni") + +if (is_android) { + import("//build/config/android/rules.gni") +} + +import("gni/v8.gni") +import("gni/isolate.gni") +import("//build_overrides/v8.gni") + +import("snapshot_toolchain.gni") + +declare_args() { + # Print to stdout on Android. + v8_android_log_stdout = false + + # Sets -DVERIFY_HEAP. + v8_enable_verify_heap = false + + # Enable compiler warnings when using V8_DEPRECATED apis. + v8_deprecation_warnings = false + + # Enable compiler warnings when using V8_DEPRECATE_SOON apis. + v8_imminent_deprecation_warnings = "" + + # Embeds the given script into the snapshot. + v8_embed_script = "" + + # Sets -dENABLE_DISASSEMBLER. + v8_enable_disassembler = "" + + # Sets -dENABLE_GDB_JIT_INTERFACE. + v8_enable_gdbjit = "" + + # Sets -dENABLE_HANDLE_ZAPPING. + v8_enable_handle_zapping = is_debug + + # Enable ECMAScript Internationalization API. Enabling this feature will + # add a dependency on the ICU library. + v8_enable_i18n_support = true + + # Enable slow dchecks. + v8_enable_slow_dchecks = false + + # Interpreted regexp engine exists as platform-independent alternative + # based where the regular expression is compiled to a bytecode. + v8_interpreted_regexp = false + + # Sets -dOBJECT_PRINT. + v8_object_print = "" + + # With post mortem support enabled, metadata is embedded into libv8 that + # describes various parameters of the VM for use by debuggers. See + # tools/gen-postmortem-metadata.py for details. + v8_postmortem_support = false + + # Similar to vfp but on MIPS. + v8_can_use_fpu_instructions = true + + # Similar to the ARM hard float ABI but on MIPS. + v8_use_mips_abi_hardfloat = true +} + +# Set project-specific defaults for some args if not provided in args.gn. The +# defaults can be set in the respective build_overrides files. +if (v8_imminent_deprecation_warnings == "") { + if (defined(v8_imminent_deprecation_warnings_default)) { + v8_imminent_deprecation_warnings = v8_imminent_deprecation_warnings_default + } else { + v8_imminent_deprecation_warnings = false + } +} +if (v8_enable_gdbjit == "") { + if (defined(v8_enable_gdbjit_default)) { + v8_enable_gdbjit = v8_enable_gdbjit_default + } else { + v8_enable_gdbjit = false + } +} + +# Derived defaults. +if (v8_object_print == "") { + v8_object_print = is_debug && !v8_optimized_debug +} +if (v8_enable_disassembler == "") { + v8_enable_disassembler = is_debug && !v8_optimized_debug +} + +v8_generated_peephole_source = "$target_gen_dir/bytecode-peephole-table.cc" +v8_random_seed = "314159265" +v8_toolset_for_shell = "host" + +############################################################################### +# Configurations +# +config("internal_config") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + include_dirs = [ "." ] + + if (is_component_build) { + defines = [ + "V8_SHARED", + "BUILDING_V8_SHARED", + ] + } +} + +config("internal_config_base") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + include_dirs = [ "." ] +} + +# This config should be applied to code using the libplatform. +config("libplatform_config") { + include_dirs = [ "include" ] +} + +# This config should be applied to code using the libsampler. +config("libsampler_config") { + include_dirs = [ "include" ] +} + +# This config should only be applied to code using V8 and not any V8 code +# itself. +config("external_config") { + if (is_component_build) { + defines = [ + "V8_SHARED", + "USING_V8_SHARED", + ] + } + include_dirs = [ "include" ] + libs = [] + if (is_android && current_toolchain != host_toolchain) { + libs += [ "log" ] + } +} + +# This config should only be applied to code that needs to be explicitly +# aware of whether we are using startup data or not. +config("external_startup_data") { + if (v8_use_external_startup_data) { + defines = [ "V8_USE_EXTERNAL_STARTUP_DATA" ] + } +} + +config("features") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + defines = [] + + if (v8_enable_disassembler) { + defines += [ "ENABLE_DISASSEMBLER" ] + } + if (v8_enable_gdbjit) { + defines += [ "ENABLE_GDB_JIT_INTERFACE" ] + } + if (v8_object_print) { + defines += [ "OBJECT_PRINT" ] + } + if (v8_enable_verify_heap) { + defines += [ "VERIFY_HEAP" ] + } + if (v8_interpreted_regexp) { + defines += [ "V8_INTERPRETED_REGEXP" ] + } + if (v8_deprecation_warnings) { + defines += [ "V8_DEPRECATION_WARNINGS" ] + } + if (v8_imminent_deprecation_warnings) { + defines += [ "V8_IMMINENT_DEPRECATION_WARNINGS" ] + } + if (v8_enable_i18n_support) { + defines += [ "V8_I18N_SUPPORT" ] + } + if (v8_enable_handle_zapping) { + defines += [ "ENABLE_HANDLE_ZAPPING" ] + } + if (v8_use_external_startup_data) { + defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ] + } +} + +config("toolchain") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + defines = [] + cflags = [] + ldflags = [] + + if (v8_current_cpu == "arm") { + defines += [ "V8_TARGET_ARCH_ARM" ] + if (arm_version == 7) { + defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ] + } + if (arm_fpu == "vfpv3-d16") { + defines += [ "CAN_USE_VFP3_INSTRUCTIONS" ] + } else if (arm_fpu == "vfpv3") { + defines += [ + "CAN_USE_VFP3_INSTRUCTIONS", + "CAN_USE_VFP32DREGS", + ] + } else if (arm_fpu == "neon") { + defines += [ + "CAN_USE_VFP3_INSTRUCTIONS", + "CAN_USE_VFP32DREGS", + "CAN_USE_NEON", + ] + } + + # TODO(jochen): Add support for arm_test_noprobe. + + if (current_cpu != "arm") { + # These defines ares used for the ARM simulator. + if (arm_float_abi == "hard") { + defines += [ "USE_EABI_HARDFLOAT=1" ] + } else if (arm_float_abi == "softfp") { + defines += [ "USE_EABI_HARDFLOAT=0" ] + } + } + } + if (v8_current_cpu == "arm64") { + defines += [ "V8_TARGET_ARCH_ARM64" ] + } + + # TODO(jochen): Add support for mips. + if (v8_current_cpu == "mipsel") { + defines += [ "V8_TARGET_ARCH_MIPS" ] + if (v8_can_use_fpu_instructions) { + defines += [ "CAN_USE_FPU_INSTRUCTIONS" ] + } + if (v8_use_mips_abi_hardfloat) { + defines += [ + "__mips_hard_float=1", + "CAN_USE_FPU_INSTRUCTIONS", + ] + } else { + defines += [ "__mips_soft_float=1" ] + } + if (mips_arch_variant == "r6") { + defines += [ + "_MIPS_ARCH_MIPS32R6", + "FPU_MODE_FP64", + ] + } else if (mips_arch_variant == "r2") { + defines += [ "_MIPS_ARCH_MIPS32R2" ] + if (mips_fpu_mode == "fp64") { + defines += [ "FPU_MODE_FP64" ] + } else if (mips_fpu_mode == "fpxx") { + defines += [ "FPU_MODE_FPXX" ] + } else if (mips_fpu_mode == "fp32") { + defines += [ "FPU_MODE_FP32" ] + } + } else if (mips_arch_variant == "r1") { + defines += [ "FPU_MODE_FP32" ] + } + + # TODO(jochen): Add support for mips_arch_variant rx and loongson. + } + + # TODO(jochen): Add support for mips64. + if (v8_current_cpu == "mips64el") { + defines += [ "V8_TARGET_ARCH_MIPS64" ] + if (v8_can_use_fpu_instructions) { + defines += [ "CAN_USE_FPU_INSTRUCTIONS" ] + } + + # TODO(jochen): Add support for big endian host byteorder. + defines += [ "V8_TARGET_ARCH_MIPS64_LE" ] + if (v8_use_mips_abi_hardfloat) { + defines += [ + "__mips_hard_float=1", + "CAN_USE_FPU_INSTRUCTIONS", + ] + } else { + defines += [ "__mips_soft_float=1" ] + } + if (mips_arch_variant == "r6") { + defines += [ "_MIPS_ARCH_MIPS64R6" ] + } else if (mips_arch_variant == "r2") { + defines += [ "_MIPS_ARCH_MIPS64R2" ] + } + } + if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") { + defines += [ "V8_TARGET_ARCH_S390" ] + if (v8_current_cpu == "s390x") { + defines += [ "V8_TARGET_ARCH_S390X" ] + } + if (host_cpu == "x64" || host_cpu == "x86") { + defines += [ "V8_TARGET_ARCH_S390_LE_SIM" ] + } + } + if (v8_current_cpu == "x86") { + defines += [ "V8_TARGET_ARCH_IA32" ] + if (is_win) { + # Ensure no surprising artifacts from 80bit double math with x86. + cflags += [ "/arch:SSE2" ] + } + } + if (v8_current_cpu == "x64") { + defines += [ "V8_TARGET_ARCH_X64" ] + if (is_win) { + # Increase the initial stack size. The default is 1MB, this is 2MB. This + # applies only to executables and shared libraries produced by V8 since + # ldflags are not pushed to dependants. + ldflags += [ "/STACK:2097152" ] + } + } + if (is_android && v8_android_log_stdout) { + defines += [ "V8_ANDROID_LOG_STDOUT" ] + } + + # TODO(jochen): Support v8_enable_prof on Windows. + # TODO(jochen): Add support for compiling with simulators. + + if (is_debug) { + if (is_linux && v8_enable_backtrace) { + ldflags += [ "-rdynamic" ] + } + + # TODO(jochen): Add support for different debug optimization levels. + defines += [ + "ENABLE_DISASSEMBLER", + "V8_ENABLE_CHECKS", + "OBJECT_PRINT", + "VERIFY_HEAP", + "DEBUG", + "TRACE_MAPS", + ] + if (v8_enable_slow_dchecks) { + defines += [ "ENABLE_SLOW_DCHECKS" ] + } + } else if (dcheck_always_on) { + defines += [ "DEBUG" ] + } +} + +############################################################################### +# Actions +# + +action("js2c") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + script = "tools/js2c.py" + + # The script depends on this other script, this rule causes a rebuild if it + # changes. + inputs = [ + "tools/jsmin.py", + ] + + # NOSORT + sources = [ + "src/js/macros.py", + "src/messages.h", + "src/js/prologue.js", + "src/js/runtime.js", + "src/js/v8natives.js", + "src/js/symbol.js", + "src/js/array.js", + "src/js/string.js", + "src/js/math.js", + "src/js/regexp.js", + "src/js/arraybuffer.js", + "src/js/typedarray.js", + "src/js/iterator-prototype.js", + "src/js/collection.js", + "src/js/weak-collection.js", + "src/js/collection-iterator.js", + "src/js/promise.js", + "src/js/messages.js", + "src/js/array-iterator.js", + "src/js/string-iterator.js", + "src/js/templates.js", + "src/js/spread.js", + "src/js/proxy.js", + "src/debug/mirrors.js", + "src/debug/debug.js", + "src/debug/liveedit.js", + ] + + outputs = [ + "$target_gen_dir/libraries.cc", + ] + + if (v8_enable_i18n_support) { + sources += [ "src/js/i18n.js" ] + } + + args = [ + rebase_path("$target_gen_dir/libraries.cc", root_build_dir), + "CORE", + ] + rebase_path(sources, root_build_dir) + + if (v8_use_external_startup_data) { + outputs += [ "$target_gen_dir/libraries.bin" ] + args += [ + "--startup_blob", + rebase_path("$target_gen_dir/libraries.bin", root_build_dir), + ] + } +} + +action("js2c_experimental") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + script = "tools/js2c.py" + + # The script depends on this other script, this rule causes a rebuild if it + # changes. + inputs = [ + "tools/jsmin.py", + ] + + # NOSORT + sources = [ + "src/js/macros.py", + "src/messages.h", + "src/js/harmony-async-await.js", + "src/js/harmony-atomics.js", + "src/js/harmony-simd.js", + "src/js/harmony-string-padding.js", + ] + + outputs = [ + "$target_gen_dir/experimental-libraries.cc", + ] + + if (v8_enable_i18n_support) { + sources += [ + "src/js/icu-case-mapping.js", + "src/js/intl-extra.js", + ] + } + + args = [ + rebase_path("$target_gen_dir/experimental-libraries.cc", + root_build_dir), + "EXPERIMENTAL", + ] + rebase_path(sources, root_build_dir) + + if (v8_use_external_startup_data) { + outputs += [ "$target_gen_dir/libraries_experimental.bin" ] + args += [ + "--startup_blob", + rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir), + ] + } +} + +action("js2c_extras") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + script = "tools/js2c.py" + + # The script depends on this other script, this rule causes a rebuild if it + # changes. + inputs = [ + "tools/jsmin.py", + ] + + sources = v8_extra_library_files + + outputs = [ + "$target_gen_dir/extras-libraries.cc", + ] + + args = [ + rebase_path("$target_gen_dir/extras-libraries.cc", root_build_dir), + "EXTRAS", + ] + rebase_path(sources, root_build_dir) + + if (v8_use_external_startup_data) { + outputs += [ "$target_gen_dir/libraries_extras.bin" ] + args += [ + "--startup_blob", + rebase_path("$target_gen_dir/libraries_extras.bin", root_build_dir), + ] + } +} + +action("js2c_experimental_extras") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + script = "tools/js2c.py" + + # The script depends on this other script, this rule causes a rebuild if it + # changes. + inputs = [ + "tools/jsmin.py", + ] + + sources = v8_experimental_extra_library_files + + outputs = [ + "$target_gen_dir/experimental-extras-libraries.cc", + ] + + args = [ + rebase_path("$target_gen_dir/experimental-extras-libraries.cc", + root_build_dir), + "EXPERIMENTAL_EXTRAS", + ] + rebase_path(sources, root_build_dir) + + if (v8_use_external_startup_data) { + outputs += [ "$target_gen_dir/libraries_experimental_extras.bin" ] + args += [ + "--startup_blob", + rebase_path("$target_gen_dir/libraries_experimental_extras.bin", + root_build_dir), + ] + } +} + +action("d8_js2c") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + script = "tools/js2c.py" + + # NOSORT + inputs = [ + "src/d8.js", + "src/js/macros.py", + ] + + outputs = [ + "$target_gen_dir/d8-js.cc", + ] + + args = rebase_path(outputs, root_build_dir) + [ "D8" ] + + rebase_path(inputs, root_build_dir) +} + +if (is_android && enable_java_templates) { + android_assets("v8_external_startup_data_assets") { + if (v8_use_external_startup_data) { + deps = [ + "//v8", + ] + sources = [ + "$root_out_dir/natives_blob.bin", + ] + renaming_sources = [ "$root_out_dir/snapshot_blob.bin" ] + if (current_cpu == "arm" || current_cpu == "x86" || + current_cpu == "mipsel") { + renaming_destinations = [ "snapshot_blob_32.bin" ] + } else { + renaming_destinations = [ "snapshot_blob_64.bin" ] + } + disable_compression = true + } + } +} + +if (v8_use_external_startup_data) { + action("natives_blob") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + deps = [ + ":js2c", + ":js2c_experimental", + ":js2c_experimental_extras", + ":js2c_extras", + ] + + # NOSORT + sources = [ + "$target_gen_dir/libraries.bin", + "$target_gen_dir/libraries_experimental.bin", + "$target_gen_dir/libraries_extras.bin", + "$target_gen_dir/libraries_experimental_extras.bin", + ] + + outputs = [ + "$root_out_dir/natives_blob.bin", + ] + + script = "tools/concatenate-files.py" + + args = rebase_path(sources + outputs, root_build_dir) + } +} + +action("postmortem-metadata") { + # Only targets in this file and the top-level visibility target can + # depend on this. + visibility = [ + ":*", + "//:gn_visibility", + ] + + script = "tools/gen-postmortem-metadata.py" + + # NOSORT + sources = [ + "src/objects.h", + "src/objects-inl.h", + ] + + outputs = [ + "$target_gen_dir/debug-support.cc", + ] + + args = rebase_path(outputs, root_build_dir) + + rebase_path(sources, root_build_dir) +} + +action("run_mksnapshot") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + deps = [ + ":mksnapshot($v8_snapshot_toolchain)", + ] + + script = "tools/run.py" + + sources = [] + + outputs = [ + "$target_gen_dir/snapshot.cc", + ] + + args = [ + "./" + rebase_path(get_label_info(":mksnapshot($v8_snapshot_toolchain)", + "root_out_dir") + "/mksnapshot", + root_build_dir), + "--startup_src", + rebase_path("$target_gen_dir/snapshot.cc", root_build_dir), + ] + + if (v8_random_seed != "0") { + args += [ + "--random-seed", + v8_random_seed, + ] + } + + if (v8_use_external_startup_data) { + outputs += [ "$root_out_dir/snapshot_blob.bin" ] + args += [ + "--startup_blob", + rebase_path("$root_out_dir/snapshot_blob.bin", root_build_dir), + ] + } + + if (v8_embed_script != "") { + sources += [ v8_embed_script ] + args += [ rebase_path(v8_embed_script, root_build_dir) ] + } +} + +action("run_mkpeephole") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + deps = [ + ":mkpeephole($v8_snapshot_toolchain)", + ] + + outputs = [ + v8_generated_peephole_source, + ] + + sources = [] + + script = "tools/run.py" + + args = [ + "./" + rebase_path(get_label_info(":mkpeephole($v8_snapshot_toolchain)", + "root_out_dir") + "/mkpeephole", + root_build_dir), + rebase_path(v8_generated_peephole_source, root_build_dir), + ] +} + +action("v8_dump_build_config") { + script = "tools/testrunner/utils/dump_build_config.py" + outputs = [ + "$root_out_dir/v8_build_config.json", + ] + args = [ + rebase_path("$root_out_dir/v8_build_config.json", root_build_dir), + "dcheck_always_on=$dcheck_always_on", + "is_asan=$is_asan", + "is_cfi=$is_cfi", + "is_component_build=$is_component_build", + "is_debug=$is_debug", + "is_msan=$is_msan", + "is_tsan=$is_tsan", + "target_cpu=\"$target_cpu\"", + "v8_enable_i18n_support=$v8_enable_i18n_support", + "v8_target_cpu=\"$v8_target_cpu\"", + "v8_use_snapshot=$v8_use_snapshot", + ] +} + +############################################################################### +# Source Sets (aka static libraries) +# + +source_set("v8_maybe_snapshot") { + if (v8_use_snapshot && v8_use_external_startup_data) { + public_deps = [ + ":v8_external_snapshot", + ] + } else if (v8_use_snapshot) { + public_deps = [ + ":v8_snapshot", + ] + } else { + # Ignore v8_use_external_startup_data setting if no snapshot is used. + public_deps = [ + ":v8_nosnapshot", + ] + } +} + +v8_source_set("v8_nosnapshot") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + deps = [ + ":js2c", + ":js2c_experimental", + ":js2c_experimental_extras", + ":js2c_extras", + ":v8_base", + ] + + sources = [ + "$target_gen_dir/experimental-extras-libraries.cc", + "$target_gen_dir/experimental-libraries.cc", + "$target_gen_dir/extras-libraries.cc", + "$target_gen_dir/libraries.cc", + "src/snapshot/snapshot-empty.cc", + ] + + configs = [ ":internal_config" ] +} + +v8_source_set("v8_snapshot") { + # Only targets in this file and the top-level visibility target can + # depend on this. + visibility = [ + ":*", + "//:gn_visibility", + ] + + deps = [ + ":js2c", + ":js2c_experimental", + ":js2c_experimental_extras", + ":js2c_extras", + ":v8_base", + ] + public_deps = [ + # This should be public so downstream targets can declare the snapshot + # output file as their inputs. + ":run_mksnapshot", + ] + + sources = [ + "$target_gen_dir/experimental-extras-libraries.cc", + "$target_gen_dir/experimental-libraries.cc", + "$target_gen_dir/extras-libraries.cc", + "$target_gen_dir/libraries.cc", + "$target_gen_dir/snapshot.cc", + ] + + configs = [ ":internal_config" ] +} + +if (v8_use_external_startup_data) { + v8_source_set("v8_external_snapshot") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + deps = [ + ":js2c", + ":js2c_experimental", + ":js2c_experimental_extras", + ":js2c_extras", + ":v8_base", + ] + public_deps = [ + ":natives_blob", + ":run_mksnapshot", + ] + + sources = [ + "src/snapshot/natives-external.cc", + "src/snapshot/snapshot-external.cc", + ] + + configs = [ ":internal_config" ] + } +} + +v8_source_set("v8_base") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + sources = [ + "//base/trace_event/common/trace_event_common.h", + "include/v8-debug.h", + "include/v8-experimental.h", + "include/v8-platform.h", + "include/v8-profiler.h", + "include/v8-testing.h", + "include/v8-util.h", + "include/v8-version.h", + "include/v8.h", + "include/v8config.h", + "src/accessors.cc", + "src/accessors.h", + "src/address-map.cc", + "src/address-map.h", + "src/allocation-site-scopes.cc", + "src/allocation-site-scopes.h", + "src/allocation.cc", + "src/allocation.h", + "src/api-arguments-inl.h", + "src/api-arguments.cc", + "src/api-arguments.h", + "src/api-experimental.cc", + "src/api-experimental.h", + "src/api-natives.cc", + "src/api-natives.h", + "src/api.cc", + "src/api.h", + "src/arguments.cc", + "src/arguments.h", + "src/asmjs/asm-js.cc", + "src/asmjs/asm-js.h", + "src/asmjs/asm-typer.cc", + "src/asmjs/asm-typer.h", + "src/asmjs/asm-types.cc", + "src/asmjs/asm-types.h", + "src/asmjs/asm-wasm-builder.cc", + "src/asmjs/asm-wasm-builder.h", + "src/assembler.cc", + "src/assembler.h", + "src/assert-scope.cc", + "src/assert-scope.h", + "src/ast/ast-expression-rewriter.cc", + "src/ast/ast-expression-rewriter.h", + "src/ast/ast-literal-reindexer.cc", + "src/ast/ast-literal-reindexer.h", + "src/ast/ast-numbering.cc", + "src/ast/ast-numbering.h", + "src/ast/ast-traversal-visitor.h", + "src/ast/ast-type-bounds.h", + "src/ast/ast-value-factory.cc", + "src/ast/ast-value-factory.h", + "src/ast/ast.cc", + "src/ast/ast.h", + "src/ast/context-slot-cache.cc", + "src/ast/context-slot-cache.h", + "src/ast/modules.cc", + "src/ast/modules.h", + "src/ast/prettyprinter.cc", + "src/ast/prettyprinter.h", + "src/ast/scopeinfo.cc", + "src/ast/scopeinfo.h", + "src/ast/scopes.cc", + "src/ast/scopes.h", + "src/ast/variables.cc", + "src/ast/variables.h", + "src/background-parsing-task.cc", + "src/background-parsing-task.h", + "src/bailout-reason.cc", + "src/bailout-reason.h", + "src/basic-block-profiler.cc", + "src/basic-block-profiler.h", + "src/bignum-dtoa.cc", + "src/bignum-dtoa.h", + "src/bignum.cc", + "src/bignum.h", + "src/bit-vector.cc", + "src/bit-vector.h", + "src/bootstrapper.cc", + "src/bootstrapper.h", + "src/builtins/builtins-api.cc", + "src/builtins/builtins-array.cc", + "src/builtins/builtins-arraybuffer.cc", + "src/builtins/builtins-boolean.cc", + "src/builtins/builtins-call.cc", + "src/builtins/builtins-callsite.cc", + "src/builtins/builtins-conversion.cc", + "src/builtins/builtins-dataview.cc", + "src/builtins/builtins-date.cc", + "src/builtins/builtins-debug.cc", + "src/builtins/builtins-error.cc", + "src/builtins/builtins-function.cc", + "src/builtins/builtins-generator.cc", + "src/builtins/builtins-global.cc", + "src/builtins/builtins-handler.cc", + "src/builtins/builtins-internal.cc", + "src/builtins/builtins-interpreter.cc", + "src/builtins/builtins-json.cc", + "src/builtins/builtins-math.cc", + "src/builtins/builtins-number.cc", + "src/builtins/builtins-object.cc", + "src/builtins/builtins-proxy.cc", + "src/builtins/builtins-reflect.cc", + "src/builtins/builtins-sharedarraybuffer.cc", + "src/builtins/builtins-string.cc", + "src/builtins/builtins-symbol.cc", + "src/builtins/builtins-typedarray.cc", + "src/builtins/builtins-utils.h", + "src/builtins/builtins.cc", + "src/builtins/builtins.h", + "src/cached-powers.cc", + "src/cached-powers.h", + "src/cancelable-task.cc", + "src/cancelable-task.h", + "src/char-predicates-inl.h", + "src/char-predicates.cc", + "src/char-predicates.h", + "src/checks.h", + "src/code-events.h", + "src/code-factory.cc", + "src/code-factory.h", + "src/code-stub-assembler.cc", + "src/code-stub-assembler.h", + "src/code-stubs-hydrogen.cc", + "src/code-stubs.cc", + "src/code-stubs.h", + "src/codegen.cc", + "src/codegen.h", + "src/collector.h", + "src/compilation-cache.cc", + "src/compilation-cache.h", + "src/compilation-dependencies.cc", + "src/compilation-dependencies.h", + "src/compilation-statistics.cc", + "src/compilation-statistics.h", + "src/compiler-dispatcher/compiler-dispatcher-job.cc", + "src/compiler-dispatcher/compiler-dispatcher-job.h", + "src/compiler-dispatcher/optimizing-compile-dispatcher.cc", + "src/compiler-dispatcher/optimizing-compile-dispatcher.h", + "src/compiler.cc", + "src/compiler.h", + "src/compiler/access-builder.cc", + "src/compiler/access-builder.h", + "src/compiler/access-info.cc", + "src/compiler/access-info.h", + "src/compiler/all-nodes.cc", + "src/compiler/all-nodes.h", + "src/compiler/ast-graph-builder.cc", + "src/compiler/ast-graph-builder.h", + "src/compiler/ast-loop-assignment-analyzer.cc", + "src/compiler/ast-loop-assignment-analyzer.h", + "src/compiler/basic-block-instrumentor.cc", + "src/compiler/basic-block-instrumentor.h", + "src/compiler/branch-elimination.cc", + "src/compiler/branch-elimination.h", + "src/compiler/bytecode-branch-analysis.cc", + "src/compiler/bytecode-branch-analysis.h", + "src/compiler/bytecode-graph-builder.cc", + "src/compiler/bytecode-graph-builder.h", + "src/compiler/bytecode-loop-analysis.cc", + "src/compiler/bytecode-loop-analysis.h", + "src/compiler/c-linkage.cc", + "src/compiler/checkpoint-elimination.cc", + "src/compiler/checkpoint-elimination.h", + "src/compiler/code-assembler.cc", + "src/compiler/code-assembler.h", + "src/compiler/code-generator-impl.h", + "src/compiler/code-generator.cc", + "src/compiler/code-generator.h", + "src/compiler/common-node-cache.cc", + "src/compiler/common-node-cache.h", + "src/compiler/common-operator-reducer.cc", + "src/compiler/common-operator-reducer.h", + "src/compiler/common-operator.cc", + "src/compiler/common-operator.h", + "src/compiler/control-builders.cc", + "src/compiler/control-builders.h", + "src/compiler/control-equivalence.cc", + "src/compiler/control-equivalence.h", + "src/compiler/control-flow-optimizer.cc", + "src/compiler/control-flow-optimizer.h", + "src/compiler/dead-code-elimination.cc", + "src/compiler/dead-code-elimination.h", + "src/compiler/diamond.h", + "src/compiler/effect-control-linearizer.cc", + "src/compiler/effect-control-linearizer.h", + "src/compiler/escape-analysis-reducer.cc", + "src/compiler/escape-analysis-reducer.h", + "src/compiler/escape-analysis.cc", + "src/compiler/escape-analysis.h", + "src/compiler/frame-elider.cc", + "src/compiler/frame-elider.h", + "src/compiler/frame-states.cc", + "src/compiler/frame-states.h", + "src/compiler/frame.cc", + "src/compiler/frame.h", + "src/compiler/gap-resolver.cc", + "src/compiler/gap-resolver.h", + "src/compiler/graph-reducer.cc", + "src/compiler/graph-reducer.h", + "src/compiler/graph-replay.cc", + "src/compiler/graph-replay.h", + "src/compiler/graph-trimmer.cc", + "src/compiler/graph-trimmer.h", + "src/compiler/graph-visualizer.cc", + "src/compiler/graph-visualizer.h", + "src/compiler/graph.cc", + "src/compiler/graph.h", + "src/compiler/instruction-codes.h", + "src/compiler/instruction-scheduler.cc", + "src/compiler/instruction-scheduler.h", + "src/compiler/instruction-selector-impl.h", + "src/compiler/instruction-selector.cc", + "src/compiler/instruction-selector.h", + "src/compiler/instruction.cc", + "src/compiler/instruction.h", + "src/compiler/int64-lowering.cc", + "src/compiler/int64-lowering.h", + "src/compiler/js-builtin-reducer.cc", + "src/compiler/js-builtin-reducer.h", + "src/compiler/js-call-reducer.cc", + "src/compiler/js-call-reducer.h", + "src/compiler/js-context-specialization.cc", + "src/compiler/js-context-specialization.h", + "src/compiler/js-create-lowering.cc", + "src/compiler/js-create-lowering.h", + "src/compiler/js-frame-specialization.cc", + "src/compiler/js-frame-specialization.h", + "src/compiler/js-generic-lowering.cc", + "src/compiler/js-generic-lowering.h", + "src/compiler/js-global-object-specialization.cc", + "src/compiler/js-global-object-specialization.h", + "src/compiler/js-graph.cc", + "src/compiler/js-graph.h", + "src/compiler/js-inlining-heuristic.cc", + "src/compiler/js-inlining-heuristic.h", + "src/compiler/js-inlining.cc", + "src/compiler/js-inlining.h", + "src/compiler/js-intrinsic-lowering.cc", + "src/compiler/js-intrinsic-lowering.h", + "src/compiler/js-native-context-specialization.cc", + "src/compiler/js-native-context-specialization.h", + "src/compiler/js-operator.cc", + "src/compiler/js-operator.h", + "src/compiler/js-typed-lowering.cc", + "src/compiler/js-typed-lowering.h", + "src/compiler/jump-threading.cc", + "src/compiler/jump-threading.h", + "src/compiler/linkage.cc", + "src/compiler/linkage.h", + "src/compiler/live-range-separator.cc", + "src/compiler/live-range-separator.h", + "src/compiler/liveness-analyzer.cc", + "src/compiler/liveness-analyzer.h", + "src/compiler/load-elimination.cc", + "src/compiler/load-elimination.h", + "src/compiler/loop-analysis.cc", + "src/compiler/loop-analysis.h", + "src/compiler/loop-peeling.cc", + "src/compiler/loop-peeling.h", + "src/compiler/loop-variable-optimizer.cc", + "src/compiler/loop-variable-optimizer.h", + "src/compiler/machine-operator-reducer.cc", + "src/compiler/machine-operator-reducer.h", + "src/compiler/machine-operator.cc", + "src/compiler/machine-operator.h", + "src/compiler/memory-optimizer.cc", + "src/compiler/memory-optimizer.h", + "src/compiler/move-optimizer.cc", + "src/compiler/move-optimizer.h", + "src/compiler/node-aux-data.h", + "src/compiler/node-cache.cc", + "src/compiler/node-cache.h", + "src/compiler/node-marker.cc", + "src/compiler/node-marker.h", + "src/compiler/node-matchers.cc", + "src/compiler/node-matchers.h", + "src/compiler/node-properties.cc", + "src/compiler/node-properties.h", + "src/compiler/node.cc", + "src/compiler/node.h", + "src/compiler/opcodes.cc", + "src/compiler/opcodes.h", + "src/compiler/operation-typer.cc", + "src/compiler/operation-typer.h", + "src/compiler/operator-properties.cc", + "src/compiler/operator-properties.h", + "src/compiler/operator.cc", + "src/compiler/operator.h", + "src/compiler/osr.cc", + "src/compiler/osr.h", + "src/compiler/pipeline-statistics.cc", + "src/compiler/pipeline-statistics.h", + "src/compiler/pipeline.cc", + "src/compiler/pipeline.h", + "src/compiler/raw-machine-assembler.cc", + "src/compiler/raw-machine-assembler.h", + "src/compiler/redundancy-elimination.cc", + "src/compiler/redundancy-elimination.h", + "src/compiler/register-allocator-verifier.cc", + "src/compiler/register-allocator-verifier.h", + "src/compiler/register-allocator.cc", + "src/compiler/register-allocator.h", + "src/compiler/representation-change.cc", + "src/compiler/representation-change.h", + "src/compiler/schedule.cc", + "src/compiler/schedule.h", + "src/compiler/scheduler.cc", + "src/compiler/scheduler.h", + "src/compiler/select-lowering.cc", + "src/compiler/select-lowering.h", + "src/compiler/simplified-lowering.cc", + "src/compiler/simplified-lowering.h", + "src/compiler/simplified-operator-reducer.cc", + "src/compiler/simplified-operator-reducer.h", + "src/compiler/simplified-operator.cc", + "src/compiler/simplified-operator.h", + "src/compiler/source-position.cc", + "src/compiler/source-position.h", + "src/compiler/state-values-utils.cc", + "src/compiler/state-values-utils.h", + "src/compiler/store-store-elimination.cc", + "src/compiler/store-store-elimination.h", + "src/compiler/tail-call-optimization.cc", + "src/compiler/tail-call-optimization.h", + "src/compiler/type-hint-analyzer.cc", + "src/compiler/type-hint-analyzer.h", + "src/compiler/type-hints.cc", + "src/compiler/type-hints.h", + "src/compiler/typer.cc", + "src/compiler/typer.h", + "src/compiler/unwinding-info-writer.h", + "src/compiler/value-numbering-reducer.cc", + "src/compiler/value-numbering-reducer.h", + "src/compiler/verifier.cc", + "src/compiler/verifier.h", + "src/compiler/wasm-compiler.cc", + "src/compiler/wasm-compiler.h", + "src/compiler/wasm-linkage.cc", + "src/compiler/zone-pool.cc", + "src/compiler/zone-pool.h", + "src/context-measure.cc", + "src/context-measure.h", + "src/contexts-inl.h", + "src/contexts.cc", + "src/contexts.h", + "src/conversions-inl.h", + "src/conversions.cc", + "src/conversions.h", + "src/counters-inl.h", + "src/counters.cc", + "src/counters.h", + "src/crankshaft/compilation-phase.cc", + "src/crankshaft/compilation-phase.h", + "src/crankshaft/hydrogen-alias-analysis.h", + "src/crankshaft/hydrogen-bce.cc", + "src/crankshaft/hydrogen-bce.h", + "src/crankshaft/hydrogen-canonicalize.cc", + "src/crankshaft/hydrogen-canonicalize.h", + "src/crankshaft/hydrogen-check-elimination.cc", + "src/crankshaft/hydrogen-check-elimination.h", + "src/crankshaft/hydrogen-dce.cc", + "src/crankshaft/hydrogen-dce.h", + "src/crankshaft/hydrogen-dehoist.cc", + "src/crankshaft/hydrogen-dehoist.h", + "src/crankshaft/hydrogen-environment-liveness.cc", + "src/crankshaft/hydrogen-environment-liveness.h", + "src/crankshaft/hydrogen-escape-analysis.cc", + "src/crankshaft/hydrogen-escape-analysis.h", + "src/crankshaft/hydrogen-flow-engine.h", + "src/crankshaft/hydrogen-gvn.cc", + "src/crankshaft/hydrogen-gvn.h", + "src/crankshaft/hydrogen-infer-representation.cc", + "src/crankshaft/hydrogen-infer-representation.h", + "src/crankshaft/hydrogen-infer-types.cc", + "src/crankshaft/hydrogen-infer-types.h", + "src/crankshaft/hydrogen-instructions.cc", + "src/crankshaft/hydrogen-instructions.h", + "src/crankshaft/hydrogen-load-elimination.cc", + "src/crankshaft/hydrogen-load-elimination.h", + "src/crankshaft/hydrogen-mark-deoptimize.cc", + "src/crankshaft/hydrogen-mark-deoptimize.h", + "src/crankshaft/hydrogen-mark-unreachable.cc", + "src/crankshaft/hydrogen-mark-unreachable.h", + "src/crankshaft/hydrogen-osr.cc", + "src/crankshaft/hydrogen-osr.h", + "src/crankshaft/hydrogen-range-analysis.cc", + "src/crankshaft/hydrogen-range-analysis.h", + "src/crankshaft/hydrogen-redundant-phi.cc", + "src/crankshaft/hydrogen-redundant-phi.h", + "src/crankshaft/hydrogen-removable-simulates.cc", + "src/crankshaft/hydrogen-removable-simulates.h", + "src/crankshaft/hydrogen-representation-changes.cc", + "src/crankshaft/hydrogen-representation-changes.h", + "src/crankshaft/hydrogen-sce.cc", + "src/crankshaft/hydrogen-sce.h", + "src/crankshaft/hydrogen-store-elimination.cc", + "src/crankshaft/hydrogen-store-elimination.h", + "src/crankshaft/hydrogen-types.cc", + "src/crankshaft/hydrogen-types.h", + "src/crankshaft/hydrogen-uint32-analysis.cc", + "src/crankshaft/hydrogen-uint32-analysis.h", + "src/crankshaft/hydrogen.cc", + "src/crankshaft/hydrogen.h", + "src/crankshaft/lithium-allocator-inl.h", + "src/crankshaft/lithium-allocator.cc", + "src/crankshaft/lithium-allocator.h", + "src/crankshaft/lithium-codegen.cc", + "src/crankshaft/lithium-codegen.h", + "src/crankshaft/lithium.cc", + "src/crankshaft/lithium.h", + "src/crankshaft/typing.cc", + "src/crankshaft/typing.h", + "src/crankshaft/unique.h", + "src/date.cc", + "src/date.h", + "src/dateparser-inl.h", + "src/dateparser.cc", + "src/dateparser.h", + "src/debug/debug-evaluate.cc", + "src/debug/debug-evaluate.h", + "src/debug/debug-frames.cc", + "src/debug/debug-frames.h", + "src/debug/debug-scopes.cc", + "src/debug/debug-scopes.h", + "src/debug/debug.cc", + "src/debug/debug.h", + "src/debug/liveedit.cc", + "src/debug/liveedit.h", + "src/deoptimize-reason.cc", + "src/deoptimize-reason.h", + "src/deoptimizer.cc", + "src/deoptimizer.h", + "src/disasm.h", + "src/disassembler.cc", + "src/disassembler.h", + "src/diy-fp.cc", + "src/diy-fp.h", + "src/double.h", + "src/dtoa.cc", + "src/dtoa.h", + "src/effects.h", + "src/eh-frame.cc", + "src/eh-frame.h", + "src/elements-kind.cc", + "src/elements-kind.h", + "src/elements.cc", + "src/elements.h", + "src/execution.cc", + "src/execution.h", + "src/extensions/externalize-string-extension.cc", + "src/extensions/externalize-string-extension.h", + "src/extensions/free-buffer-extension.cc", + "src/extensions/free-buffer-extension.h", + "src/extensions/gc-extension.cc", + "src/extensions/gc-extension.h", + "src/extensions/ignition-statistics-extension.cc", + "src/extensions/ignition-statistics-extension.h", + "src/extensions/statistics-extension.cc", + "src/extensions/statistics-extension.h", + "src/extensions/trigger-failure-extension.cc", + "src/extensions/trigger-failure-extension.h", + "src/external-reference-table.cc", + "src/external-reference-table.h", + "src/factory.cc", + "src/factory.h", + "src/fast-accessor-assembler.cc", + "src/fast-accessor-assembler.h", + "src/fast-dtoa.cc", + "src/fast-dtoa.h", + "src/field-index-inl.h", + "src/field-index.h", + "src/field-type.cc", + "src/field-type.h", + "src/fixed-dtoa.cc", + "src/fixed-dtoa.h", + "src/flag-definitions.h", + "src/flags.cc", + "src/flags.h", + "src/frames-inl.h", + "src/frames.cc", + "src/frames.h", + "src/full-codegen/full-codegen.cc", + "src/full-codegen/full-codegen.h", + "src/futex-emulation.cc", + "src/futex-emulation.h", + "src/gdb-jit.cc", + "src/gdb-jit.h", + "src/global-handles.cc", + "src/global-handles.h", + "src/globals.h", + "src/handles-inl.h", + "src/handles.cc", + "src/handles.h", + "src/heap-symbols.h", + "src/heap/array-buffer-tracker-inl.h", + "src/heap/array-buffer-tracker.cc", + "src/heap/array-buffer-tracker.h", + "src/heap/code-stats.cc", + "src/heap/code-stats.h", + "src/heap/gc-idle-time-handler.cc", + "src/heap/gc-idle-time-handler.h", + "src/heap/gc-tracer.cc", + "src/heap/gc-tracer.h", + "src/heap/heap-inl.h", + "src/heap/heap.cc", + "src/heap/heap.h", + "src/heap/incremental-marking-job.cc", + "src/heap/incremental-marking-job.h", + "src/heap/incremental-marking.cc", + "src/heap/incremental-marking.h", + "src/heap/mark-compact-inl.h", + "src/heap/mark-compact.cc", + "src/heap/mark-compact.h", + "src/heap/marking.h", + "src/heap/memory-reducer.cc", + "src/heap/memory-reducer.h", + "src/heap/object-stats.cc", + "src/heap/object-stats.h", + "src/heap/objects-visiting-inl.h", + "src/heap/objects-visiting.cc", + "src/heap/objects-visiting.h", + "src/heap/page-parallel-job.h", + "src/heap/remembered-set.cc", + "src/heap/remembered-set.h", + "src/heap/scavenge-job.cc", + "src/heap/scavenge-job.h", + "src/heap/scavenger-inl.h", + "src/heap/scavenger.cc", + "src/heap/scavenger.h", + "src/heap/slot-set.h", + "src/heap/spaces-inl.h", + "src/heap/spaces.cc", + "src/heap/spaces.h", + "src/heap/store-buffer.cc", + "src/heap/store-buffer.h", + "src/i18n.cc", + "src/i18n.h", + "src/ic/access-compiler.cc", + "src/ic/access-compiler.h", + "src/ic/call-optimization.cc", + "src/ic/call-optimization.h", + "src/ic/handler-compiler.cc", + "src/ic/handler-compiler.h", + "src/ic/ic-compiler.cc", + "src/ic/ic-compiler.h", + "src/ic/ic-inl.h", + "src/ic/ic-state.cc", + "src/ic/ic-state.h", + "src/ic/ic.cc", + "src/ic/ic.h", + "src/ic/stub-cache.cc", + "src/ic/stub-cache.h", + "src/icu_util.cc", + "src/icu_util.h", + "src/identity-map.cc", + "src/identity-map.h", + "src/interface-descriptors.cc", + "src/interface-descriptors.h", + "src/interpreter/bytecode-array-builder.cc", + "src/interpreter/bytecode-array-builder.h", + "src/interpreter/bytecode-array-iterator.cc", + "src/interpreter/bytecode-array-iterator.h", + "src/interpreter/bytecode-array-writer.cc", + "src/interpreter/bytecode-array-writer.h", + "src/interpreter/bytecode-dead-code-optimizer.cc", + "src/interpreter/bytecode-dead-code-optimizer.h", + "src/interpreter/bytecode-decoder.cc", + "src/interpreter/bytecode-decoder.h", + "src/interpreter/bytecode-flags.cc", + "src/interpreter/bytecode-flags.h", + "src/interpreter/bytecode-generator.cc", + "src/interpreter/bytecode-generator.h", + "src/interpreter/bytecode-label.cc", + "src/interpreter/bytecode-label.h", + "src/interpreter/bytecode-peephole-optimizer.cc", + "src/interpreter/bytecode-peephole-optimizer.h", + "src/interpreter/bytecode-peephole-table.h", + "src/interpreter/bytecode-pipeline.cc", + "src/interpreter/bytecode-pipeline.h", + "src/interpreter/bytecode-register-allocator.cc", + "src/interpreter/bytecode-register-allocator.h", + "src/interpreter/bytecode-register-optimizer.cc", + "src/interpreter/bytecode-register-optimizer.h", + "src/interpreter/bytecode-register.cc", + "src/interpreter/bytecode-register.h", + "src/interpreter/bytecode-traits.h", + "src/interpreter/bytecodes.cc", + "src/interpreter/bytecodes.h", + "src/interpreter/constant-array-builder.cc", + "src/interpreter/constant-array-builder.h", + "src/interpreter/control-flow-builders.cc", + "src/interpreter/control-flow-builders.h", + "src/interpreter/handler-table-builder.cc", + "src/interpreter/handler-table-builder.h", + "src/interpreter/interpreter-assembler.cc", + "src/interpreter/interpreter-assembler.h", + "src/interpreter/interpreter-intrinsics.cc", + "src/interpreter/interpreter-intrinsics.h", + "src/interpreter/interpreter.cc", + "src/interpreter/interpreter.h", + "src/isolate-inl.h", + "src/isolate.cc", + "src/isolate.h", + "src/json-parser.cc", + "src/json-parser.h", + "src/json-stringifier.cc", + "src/json-stringifier.h", + "src/keys.cc", + "src/keys.h", + "src/layout-descriptor-inl.h", + "src/layout-descriptor.cc", + "src/layout-descriptor.h", + "src/list-inl.h", + "src/list.h", + "src/log-inl.h", + "src/log-utils.cc", + "src/log-utils.h", + "src/log.cc", + "src/log.h", + "src/lookup.cc", + "src/lookup.h", + "src/machine-type.cc", + "src/machine-type.h", + "src/macro-assembler.h", + "src/messages.cc", + "src/messages.h", + "src/msan.h", + "src/objects-body-descriptors-inl.h", + "src/objects-body-descriptors.h", + "src/objects-debug.cc", + "src/objects-inl.h", + "src/objects-printer.cc", + "src/objects.cc", + "src/objects.h", + "src/ostreams.cc", + "src/ostreams.h", + "src/parsing/expression-classifier.h", + "src/parsing/func-name-inferrer.cc", + "src/parsing/func-name-inferrer.h", + "src/parsing/parameter-initializer-rewriter.cc", + "src/parsing/parameter-initializer-rewriter.h", + "src/parsing/parse-info.cc", + "src/parsing/parse-info.h", + "src/parsing/parser-base.h", + "src/parsing/parser.cc", + "src/parsing/parser.h", + "src/parsing/pattern-rewriter.cc", + "src/parsing/preparse-data-format.h", + "src/parsing/preparse-data.cc", + "src/parsing/preparse-data.h", + "src/parsing/preparser.cc", + "src/parsing/preparser.h", + "src/parsing/rewriter.cc", + "src/parsing/rewriter.h", + "src/parsing/scanner-character-streams.cc", + "src/parsing/scanner-character-streams.h", + "src/parsing/scanner.cc", + "src/parsing/scanner.h", + "src/parsing/token.cc", + "src/parsing/token.h", + "src/pending-compilation-error-handler.cc", + "src/pending-compilation-error-handler.h", + "src/perf-jit.cc", + "src/perf-jit.h", + "src/profiler/allocation-tracker.cc", + "src/profiler/allocation-tracker.h", + "src/profiler/circular-queue-inl.h", + "src/profiler/circular-queue.h", + "src/profiler/cpu-profiler-inl.h", + "src/profiler/cpu-profiler.cc", + "src/profiler/cpu-profiler.h", + "src/profiler/heap-profiler.cc", + "src/profiler/heap-profiler.h", + "src/profiler/heap-snapshot-generator-inl.h", + "src/profiler/heap-snapshot-generator.cc", + "src/profiler/heap-snapshot-generator.h", + "src/profiler/profile-generator-inl.h", + "src/profiler/profile-generator.cc", + "src/profiler/profile-generator.h", + "src/profiler/profiler-listener.cc", + "src/profiler/profiler-listener.h", + "src/profiler/sampling-heap-profiler.cc", + "src/profiler/sampling-heap-profiler.h", + "src/profiler/strings-storage.cc", + "src/profiler/strings-storage.h", + "src/profiler/tick-sample.cc", + "src/profiler/tick-sample.h", + "src/profiler/unbound-queue-inl.h", + "src/profiler/unbound-queue.h", + "src/property-descriptor.cc", + "src/property-descriptor.h", + "src/property-details.h", + "src/property.cc", + "src/property.h", + "src/prototype.h", + "src/regexp/bytecodes-irregexp.h", + "src/regexp/interpreter-irregexp.cc", + "src/regexp/interpreter-irregexp.h", + "src/regexp/jsregexp-inl.h", + "src/regexp/jsregexp.cc", + "src/regexp/jsregexp.h", + "src/regexp/regexp-ast.cc", + "src/regexp/regexp-ast.h", + "src/regexp/regexp-macro-assembler-irregexp-inl.h", + "src/regexp/regexp-macro-assembler-irregexp.cc", + "src/regexp/regexp-macro-assembler-irregexp.h", + "src/regexp/regexp-macro-assembler-tracer.cc", + "src/regexp/regexp-macro-assembler-tracer.h", + "src/regexp/regexp-macro-assembler.cc", + "src/regexp/regexp-macro-assembler.h", + "src/regexp/regexp-parser.cc", + "src/regexp/regexp-parser.h", + "src/regexp/regexp-stack.cc", + "src/regexp/regexp-stack.h", + "src/register-configuration.cc", + "src/register-configuration.h", + "src/runtime-profiler.cc", + "src/runtime-profiler.h", + "src/runtime/runtime-array.cc", + "src/runtime/runtime-atomics.cc", + "src/runtime/runtime-classes.cc", + "src/runtime/runtime-collections.cc", + "src/runtime/runtime-compiler.cc", + "src/runtime/runtime-date.cc", + "src/runtime/runtime-debug.cc", + "src/runtime/runtime-error.cc", + "src/runtime/runtime-forin.cc", + "src/runtime/runtime-function.cc", + "src/runtime/runtime-futex.cc", + "src/runtime/runtime-generator.cc", + "src/runtime/runtime-i18n.cc", + "src/runtime/runtime-internal.cc", + "src/runtime/runtime-interpreter.cc", + "src/runtime/runtime-literals.cc", + "src/runtime/runtime-liveedit.cc", + "src/runtime/runtime-maths.cc", + "src/runtime/runtime-numbers.cc", + "src/runtime/runtime-object.cc", + "src/runtime/runtime-operators.cc", + "src/runtime/runtime-proxy.cc", + "src/runtime/runtime-regexp.cc", + "src/runtime/runtime-scopes.cc", + "src/runtime/runtime-simd.cc", + "src/runtime/runtime-strings.cc", + "src/runtime/runtime-symbol.cc", + "src/runtime/runtime-test.cc", + "src/runtime/runtime-typedarray.cc", + "src/runtime/runtime-utils.h", + "src/runtime/runtime-wasm.cc", + "src/runtime/runtime.cc", + "src/runtime/runtime.h", + "src/safepoint-table.cc", + "src/safepoint-table.h", + "src/signature.h", + "src/simulator.h", + "src/small-pointer-list.h", + "src/snapshot/code-serializer.cc", + "src/snapshot/code-serializer.h", + "src/snapshot/deserializer.cc", + "src/snapshot/deserializer.h", + "src/snapshot/natives-common.cc", + "src/snapshot/natives.h", + "src/snapshot/partial-serializer.cc", + "src/snapshot/partial-serializer.h", + "src/snapshot/serializer-common.cc", + "src/snapshot/serializer-common.h", + "src/snapshot/serializer.cc", + "src/snapshot/serializer.h", + "src/snapshot/snapshot-common.cc", + "src/snapshot/snapshot-source-sink.cc", + "src/snapshot/snapshot-source-sink.h", + "src/snapshot/snapshot.h", + "src/snapshot/startup-serializer.cc", + "src/snapshot/startup-serializer.h", + "src/source-position-table.cc", + "src/source-position-table.h", + "src/source-position.h", + "src/splay-tree-inl.h", + "src/splay-tree.h", + "src/startup-data-util.cc", + "src/startup-data-util.h", + "src/string-builder.cc", + "src/string-builder.h", + "src/string-search.h", + "src/string-stream.cc", + "src/string-stream.h", + "src/strtod.cc", + "src/strtod.h", + "src/tracing/trace-event.cc", + "src/tracing/trace-event.h", + "src/transitions-inl.h", + "src/transitions.cc", + "src/transitions.h", + "src/type-cache.cc", + "src/type-cache.h", + "src/type-feedback-vector-inl.h", + "src/type-feedback-vector.cc", + "src/type-feedback-vector.h", + "src/type-info.cc", + "src/type-info.h", + "src/types.cc", + "src/types.h", + "src/unicode-cache-inl.h", + "src/unicode-cache.h", + "src/unicode-decoder.cc", + "src/unicode-decoder.h", + "src/unicode-inl.h", + "src/unicode.cc", + "src/unicode.h", + "src/uri.cc", + "src/uri.h", + "src/utils-inl.h", + "src/utils.cc", + "src/utils.h", + "src/v8.cc", + "src/v8.h", + "src/v8memory.h", + "src/v8threads.cc", + "src/v8threads.h", + "src/value-serializer.cc", + "src/value-serializer.h", + "src/version.cc", + "src/version.h", + "src/vm-state-inl.h", + "src/vm-state.h", + "src/wasm/ast-decoder.cc", + "src/wasm/ast-decoder.h", + "src/wasm/decoder.h", + "src/wasm/encoder.cc", + "src/wasm/encoder.h", + "src/wasm/leb-helper.h", + "src/wasm/module-decoder.cc", + "src/wasm/module-decoder.h", + "src/wasm/switch-logic.cc", + "src/wasm/switch-logic.h", + "src/wasm/wasm-debug.cc", + "src/wasm/wasm-debug.h", + "src/wasm/wasm-external-refs.cc", + "src/wasm/wasm-external-refs.h", + "src/wasm/wasm-function-name-table.cc", + "src/wasm/wasm-function-name-table.h", + "src/wasm/wasm-interpreter.cc", + "src/wasm/wasm-interpreter.h", + "src/wasm/wasm-js.cc", + "src/wasm/wasm-js.h", + "src/wasm/wasm-macro-gen.h", + "src/wasm/wasm-module.cc", + "src/wasm/wasm-module.h", + "src/wasm/wasm-opcodes.cc", + "src/wasm/wasm-opcodes.h", + "src/wasm/wasm-result.cc", + "src/wasm/wasm-result.h", + "src/zone-allocator.h", + "src/zone-containers.h", + "src/zone.cc", + "src/zone.h", + ] + + if (v8_current_cpu == "x86") { + sources += [ + "src/builtins/ia32/builtins-ia32.cc", + "src/compiler/ia32/code-generator-ia32.cc", + "src/compiler/ia32/instruction-codes-ia32.h", + "src/compiler/ia32/instruction-scheduler-ia32.cc", + "src/compiler/ia32/instruction-selector-ia32.cc", + "src/crankshaft/ia32/lithium-codegen-ia32.cc", + "src/crankshaft/ia32/lithium-codegen-ia32.h", + "src/crankshaft/ia32/lithium-gap-resolver-ia32.cc", + "src/crankshaft/ia32/lithium-gap-resolver-ia32.h", + "src/crankshaft/ia32/lithium-ia32.cc", + "src/crankshaft/ia32/lithium-ia32.h", + "src/debug/ia32/debug-ia32.cc", + "src/full-codegen/ia32/full-codegen-ia32.cc", + "src/ia32/assembler-ia32-inl.h", + "src/ia32/assembler-ia32.cc", + "src/ia32/assembler-ia32.h", + "src/ia32/code-stubs-ia32.cc", + "src/ia32/code-stubs-ia32.h", + "src/ia32/codegen-ia32.cc", + "src/ia32/codegen-ia32.h", + "src/ia32/cpu-ia32.cc", + "src/ia32/deoptimizer-ia32.cc", + "src/ia32/disasm-ia32.cc", + "src/ia32/frames-ia32.cc", + "src/ia32/frames-ia32.h", + "src/ia32/interface-descriptors-ia32.cc", + "src/ia32/macro-assembler-ia32.cc", + "src/ia32/macro-assembler-ia32.h", + "src/ic/ia32/access-compiler-ia32.cc", + "src/ic/ia32/handler-compiler-ia32.cc", + "src/ic/ia32/ic-compiler-ia32.cc", + "src/ic/ia32/ic-ia32.cc", + "src/ic/ia32/stub-cache-ia32.cc", + "src/regexp/ia32/regexp-macro-assembler-ia32.cc", + "src/regexp/ia32/regexp-macro-assembler-ia32.h", + ] + } else if (v8_current_cpu == "x64") { + sources += [ + "src/builtins/x64/builtins-x64.cc", + "src/compiler/x64/code-generator-x64.cc", + "src/compiler/x64/instruction-codes-x64.h", + "src/compiler/x64/instruction-scheduler-x64.cc", + "src/compiler/x64/instruction-selector-x64.cc", + "src/compiler/x64/unwinding-info-writer-x64.cc", + "src/compiler/x64/unwinding-info-writer-x64.h", + "src/crankshaft/x64/lithium-codegen-x64.cc", + "src/crankshaft/x64/lithium-codegen-x64.h", + "src/crankshaft/x64/lithium-gap-resolver-x64.cc", + "src/crankshaft/x64/lithium-gap-resolver-x64.h", + "src/crankshaft/x64/lithium-x64.cc", + "src/crankshaft/x64/lithium-x64.h", + "src/debug/x64/debug-x64.cc", + "src/full-codegen/x64/full-codegen-x64.cc", + "src/ic/x64/access-compiler-x64.cc", + "src/ic/x64/handler-compiler-x64.cc", + "src/ic/x64/ic-compiler-x64.cc", + "src/ic/x64/ic-x64.cc", + "src/ic/x64/stub-cache-x64.cc", + "src/regexp/x64/regexp-macro-assembler-x64.cc", + "src/regexp/x64/regexp-macro-assembler-x64.h", + "src/x64/assembler-x64-inl.h", + "src/x64/assembler-x64.cc", + "src/x64/assembler-x64.h", + "src/x64/code-stubs-x64.cc", + "src/x64/code-stubs-x64.h", + "src/x64/codegen-x64.cc", + "src/x64/codegen-x64.h", + "src/x64/cpu-x64.cc", + "src/x64/deoptimizer-x64.cc", + "src/x64/disasm-x64.cc", + "src/x64/eh-frame-x64.cc", + "src/x64/frames-x64.cc", + "src/x64/frames-x64.h", + "src/x64/interface-descriptors-x64.cc", + "src/x64/macro-assembler-x64.cc", + "src/x64/macro-assembler-x64.h", + ] + } else if (v8_current_cpu == "arm") { + sources += [ + "src/arm/assembler-arm-inl.h", + "src/arm/assembler-arm.cc", + "src/arm/assembler-arm.h", + "src/arm/code-stubs-arm.cc", + "src/arm/code-stubs-arm.h", + "src/arm/codegen-arm.cc", + "src/arm/codegen-arm.h", + "src/arm/constants-arm.cc", + "src/arm/constants-arm.h", + "src/arm/cpu-arm.cc", + "src/arm/deoptimizer-arm.cc", + "src/arm/disasm-arm.cc", + "src/arm/eh-frame-arm.cc", + "src/arm/frames-arm.cc", + "src/arm/frames-arm.h", + "src/arm/interface-descriptors-arm.cc", + "src/arm/interface-descriptors-arm.h", + "src/arm/macro-assembler-arm.cc", + "src/arm/macro-assembler-arm.h", + "src/arm/simulator-arm.cc", + "src/arm/simulator-arm.h", + "src/builtins/arm/builtins-arm.cc", + "src/compiler/arm/code-generator-arm.cc", + "src/compiler/arm/instruction-codes-arm.h", + "src/compiler/arm/instruction-scheduler-arm.cc", + "src/compiler/arm/instruction-selector-arm.cc", + "src/compiler/arm/unwinding-info-writer-arm.cc", + "src/compiler/arm/unwinding-info-writer-arm.h", + "src/crankshaft/arm/lithium-arm.cc", + "src/crankshaft/arm/lithium-arm.h", + "src/crankshaft/arm/lithium-codegen-arm.cc", + "src/crankshaft/arm/lithium-codegen-arm.h", + "src/crankshaft/arm/lithium-gap-resolver-arm.cc", + "src/crankshaft/arm/lithium-gap-resolver-arm.h", + "src/debug/arm/debug-arm.cc", + "src/full-codegen/arm/full-codegen-arm.cc", + "src/ic/arm/access-compiler-arm.cc", + "src/ic/arm/handler-compiler-arm.cc", + "src/ic/arm/ic-arm.cc", + "src/ic/arm/ic-compiler-arm.cc", + "src/ic/arm/stub-cache-arm.cc", + "src/regexp/arm/regexp-macro-assembler-arm.cc", + "src/regexp/arm/regexp-macro-assembler-arm.h", + ] + } else if (v8_current_cpu == "arm64") { + sources += [ + "src/arm64/assembler-arm64-inl.h", + "src/arm64/assembler-arm64.cc", + "src/arm64/assembler-arm64.h", + "src/arm64/code-stubs-arm64.cc", + "src/arm64/code-stubs-arm64.h", + "src/arm64/codegen-arm64.cc", + "src/arm64/codegen-arm64.h", + "src/arm64/constants-arm64.h", + "src/arm64/cpu-arm64.cc", + "src/arm64/decoder-arm64-inl.h", + "src/arm64/decoder-arm64.cc", + "src/arm64/decoder-arm64.h", + "src/arm64/deoptimizer-arm64.cc", + "src/arm64/disasm-arm64.cc", + "src/arm64/disasm-arm64.h", + "src/arm64/eh-frame-arm64.cc", + "src/arm64/frames-arm64.cc", + "src/arm64/frames-arm64.h", + "src/arm64/instructions-arm64.cc", + "src/arm64/instructions-arm64.h", + "src/arm64/instrument-arm64.cc", + "src/arm64/instrument-arm64.h", + "src/arm64/interface-descriptors-arm64.cc", + "src/arm64/interface-descriptors-arm64.h", + "src/arm64/macro-assembler-arm64-inl.h", + "src/arm64/macro-assembler-arm64.cc", + "src/arm64/macro-assembler-arm64.h", + "src/arm64/simulator-arm64.cc", + "src/arm64/simulator-arm64.h", + "src/arm64/utils-arm64.cc", + "src/arm64/utils-arm64.h", + "src/builtins/arm64/builtins-arm64.cc", + "src/compiler/arm64/code-generator-arm64.cc", + "src/compiler/arm64/instruction-codes-arm64.h", + "src/compiler/arm64/instruction-scheduler-arm64.cc", + "src/compiler/arm64/instruction-selector-arm64.cc", + "src/compiler/arm64/unwinding-info-writer-arm64.cc", + "src/compiler/arm64/unwinding-info-writer-arm64.h", + "src/crankshaft/arm64/delayed-masm-arm64-inl.h", + "src/crankshaft/arm64/delayed-masm-arm64.cc", + "src/crankshaft/arm64/delayed-masm-arm64.h", + "src/crankshaft/arm64/lithium-arm64.cc", + "src/crankshaft/arm64/lithium-arm64.h", + "src/crankshaft/arm64/lithium-codegen-arm64.cc", + "src/crankshaft/arm64/lithium-codegen-arm64.h", + "src/crankshaft/arm64/lithium-gap-resolver-arm64.cc", + "src/crankshaft/arm64/lithium-gap-resolver-arm64.h", + "src/debug/arm64/debug-arm64.cc", + "src/full-codegen/arm64/full-codegen-arm64.cc", + "src/ic/arm64/access-compiler-arm64.cc", + "src/ic/arm64/handler-compiler-arm64.cc", + "src/ic/arm64/ic-arm64.cc", + "src/ic/arm64/ic-compiler-arm64.cc", + "src/ic/arm64/stub-cache-arm64.cc", + "src/regexp/arm64/regexp-macro-assembler-arm64.cc", + "src/regexp/arm64/regexp-macro-assembler-arm64.h", + ] + } else if (v8_current_cpu == "mipsel") { + sources += [ + "src/builtins/mips/builtins-mips.cc", + "src/compiler/mips/code-generator-mips.cc", + "src/compiler/mips/instruction-codes-mips.h", + "src/compiler/mips/instruction-scheduler-mips.cc", + "src/compiler/mips/instruction-selector-mips.cc", + "src/crankshaft/mips/lithium-codegen-mips.cc", + "src/crankshaft/mips/lithium-codegen-mips.h", + "src/crankshaft/mips/lithium-gap-resolver-mips.cc", + "src/crankshaft/mips/lithium-gap-resolver-mips.h", + "src/crankshaft/mips/lithium-mips.cc", + "src/crankshaft/mips/lithium-mips.h", + "src/debug/mips/debug-mips.cc", + "src/full-codegen/mips/full-codegen-mips.cc", + "src/ic/mips/access-compiler-mips.cc", + "src/ic/mips/handler-compiler-mips.cc", + "src/ic/mips/ic-compiler-mips.cc", + "src/ic/mips/ic-mips.cc", + "src/ic/mips/stub-cache-mips.cc", + "src/mips/assembler-mips-inl.h", + "src/mips/assembler-mips.cc", + "src/mips/assembler-mips.h", + "src/mips/code-stubs-mips.cc", + "src/mips/code-stubs-mips.h", + "src/mips/codegen-mips.cc", + "src/mips/codegen-mips.h", + "src/mips/constants-mips.cc", + "src/mips/constants-mips.h", + "src/mips/cpu-mips.cc", + "src/mips/deoptimizer-mips.cc", + "src/mips/disasm-mips.cc", + "src/mips/frames-mips.cc", + "src/mips/frames-mips.h", + "src/mips/interface-descriptors-mips.cc", + "src/mips/macro-assembler-mips.cc", + "src/mips/macro-assembler-mips.h", + "src/mips/simulator-mips.cc", + "src/mips/simulator-mips.h", + "src/regexp/mips/regexp-macro-assembler-mips.cc", + "src/regexp/mips/regexp-macro-assembler-mips.h", + ] + } else if (v8_current_cpu == "mips64el") { + sources += [ + "src/builtins/mips64/builtins-mips64.cc", + "src/compiler/mips64/code-generator-mips64.cc", + "src/compiler/mips64/instruction-codes-mips64.h", + "src/compiler/mips64/instruction-scheduler-mips64.cc", + "src/compiler/mips64/instruction-selector-mips64.cc", + "src/crankshaft/mips64/lithium-codegen-mips64.cc", + "src/crankshaft/mips64/lithium-codegen-mips64.h", + "src/crankshaft/mips64/lithium-gap-resolver-mips64.cc", + "src/crankshaft/mips64/lithium-gap-resolver-mips64.h", + "src/crankshaft/mips64/lithium-mips64.cc", + "src/crankshaft/mips64/lithium-mips64.h", + "src/debug/mips64/debug-mips64.cc", + "src/full-codegen/mips64/full-codegen-mips64.cc", + "src/ic/mips64/access-compiler-mips64.cc", + "src/ic/mips64/handler-compiler-mips64.cc", + "src/ic/mips64/ic-compiler-mips64.cc", + "src/ic/mips64/ic-mips64.cc", + "src/ic/mips64/stub-cache-mips64.cc", + "src/mips64/assembler-mips64-inl.h", + "src/mips64/assembler-mips64.cc", + "src/mips64/assembler-mips64.h", + "src/mips64/code-stubs-mips64.cc", + "src/mips64/code-stubs-mips64.h", + "src/mips64/codegen-mips64.cc", + "src/mips64/codegen-mips64.h", + "src/mips64/constants-mips64.cc", + "src/mips64/constants-mips64.h", + "src/mips64/cpu-mips64.cc", + "src/mips64/deoptimizer-mips64.cc", + "src/mips64/disasm-mips64.cc", + "src/mips64/frames-mips64.cc", + "src/mips64/frames-mips64.h", + "src/mips64/interface-descriptors-mips64.cc", + "src/mips64/macro-assembler-mips64.cc", + "src/mips64/macro-assembler-mips64.h", + "src/mips64/simulator-mips64.cc", + "src/mips64/simulator-mips64.h", + "src/regexp/mips64/regexp-macro-assembler-mips64.cc", + "src/regexp/mips64/regexp-macro-assembler-mips64.h", + ] + } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") { + sources += [ + "src/builtins/s390/builtins-s390.cc", + "src/compiler/s390/code-generator-s390.cc", + "src/compiler/s390/instruction-codes-s390.h", + "src/compiler/s390/instruction-scheduler-s390.cc", + "src/compiler/s390/instruction-selector-s390.cc", + "src/crankshaft/s390/lithium-codegen-s390.cc", + "src/crankshaft/s390/lithium-codegen-s390.h", + "src/crankshaft/s390/lithium-gap-resolver-s390.cc", + "src/crankshaft/s390/lithium-gap-resolver-s390.h", + "src/crankshaft/s390/lithium-s390.cc", + "src/crankshaft/s390/lithium-s390.h", + "src/debug/s390/debug-s390.cc", + "src/full-codegen/s390/full-codegen-s390.cc", + "src/ic/s390/access-compiler-s390.cc", + "src/ic/s390/handler-compiler-s390.cc", + "src/ic/s390/ic-compiler-s390.cc", + "src/ic/s390/ic-s390.cc", + "src/ic/s390/stub-cache-s390.cc", + "src/regexp/s390/regexp-macro-assembler-s390.cc", + "src/regexp/s390/regexp-macro-assembler-s390.h", + "src/s390/assembler-s390-inl.h", + "src/s390/assembler-s390.cc", + "src/s390/assembler-s390.h", + "src/s390/code-stubs-s390.cc", + "src/s390/code-stubs-s390.h", + "src/s390/codegen-s390.cc", + "src/s390/codegen-s390.h", + "src/s390/constants-s390.cc", + "src/s390/constants-s390.h", + "src/s390/cpu-s390.cc", + "src/s390/deoptimizer-s390.cc", + "src/s390/disasm-s390.cc", + "src/s390/frames-s390.cc", + "src/s390/frames-s390.h", + "src/s390/interface-descriptors-s390.cc", + "src/s390/macro-assembler-s390.cc", + "src/s390/macro-assembler-s390.h", + "src/s390/simulator-s390.cc", + "src/s390/simulator-s390.h", + ] + } + + configs = [ ":internal_config" ] + + defines = [] + deps = [ + ":v8_libbase", + ":v8_libsampler", + ] + + sources += [ v8_generated_peephole_source ] + deps += [ ":run_mkpeephole" ] + + if (is_win) { + # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. + cflags = [ "/wd4267" ] + } + + if (v8_enable_i18n_support) { + deps += [ "//third_party/icu" ] + if (is_win) { + deps += [ "//third_party/icu:icudata" ] + } + } else { + sources -= [ + "src/i18n.cc", + "src/i18n.h", + ] + } + + if (v8_postmortem_support) { + sources += [ "$target_gen_dir/debug-support.cc" ] + deps += [ ":postmortem-metadata" ] + } +} + +v8_source_set("v8_libbase") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + sources = [ + "src/base/accounting-allocator.cc", + "src/base/accounting-allocator.h", + "src/base/adapters.h", + "src/base/atomic-utils.h", + "src/base/atomicops.h", + "src/base/atomicops_internals_arm64_gcc.h", + "src/base/atomicops_internals_arm_gcc.h", + "src/base/atomicops_internals_atomicword_compat.h", + "src/base/atomicops_internals_mac.h", + "src/base/atomicops_internals_mips64_gcc.h", + "src/base/atomicops_internals_mips_gcc.h", + "src/base/atomicops_internals_s390_gcc.h", + "src/base/atomicops_internals_tsan.h", + "src/base/atomicops_internals_x86_gcc.cc", + "src/base/atomicops_internals_x86_gcc.h", + "src/base/atomicops_internals_x86_msvc.h", + "src/base/bits.cc", + "src/base/bits.h", + "src/base/build_config.h", + "src/base/cpu.cc", + "src/base/cpu.h", + "src/base/debug/stack_trace.cc", + "src/base/debug/stack_trace.h", + "src/base/division-by-constant.cc", + "src/base/division-by-constant.h", + "src/base/file-utils.cc", + "src/base/file-utils.h", + "src/base/flags.h", + "src/base/format-macros.h", + "src/base/free_deleter.h", + "src/base/functional.cc", + "src/base/functional.h", + "src/base/hashmap.h", + "src/base/ieee754.cc", + "src/base/ieee754.h", + "src/base/iterator.h", + "src/base/lazy-instance.h", + "src/base/logging.cc", + "src/base/logging.h", + "src/base/macros.h", + "src/base/once.cc", + "src/base/once.h", + "src/base/platform/condition-variable.cc", + "src/base/platform/condition-variable.h", + "src/base/platform/elapsed-timer.h", + "src/base/platform/mutex.cc", + "src/base/platform/mutex.h", + "src/base/platform/platform.h", + "src/base/platform/semaphore.cc", + "src/base/platform/semaphore.h", + "src/base/platform/time.cc", + "src/base/platform/time.h", + "src/base/safe_conversions.h", + "src/base/safe_conversions_impl.h", + "src/base/safe_math.h", + "src/base/safe_math_impl.h", + "src/base/sys-info.cc", + "src/base/sys-info.h", + "src/base/utils/random-number-generator.cc", + "src/base/utils/random-number-generator.h", + ] + + configs = [ ":internal_config_base" ] + + defines = [] + + if (is_posix) { + sources += [ "src/base/platform/platform-posix.cc" ] + } + + if (is_linux) { + sources += [ + "src/base/debug/stack_trace_posix.cc", + "src/base/platform/platform-linux.cc", + ] + + libs = [ + "dl", + "rt", + ] + } else if (is_android) { + if (current_toolchain == host_toolchain) { + libs = [ + "dl", + "rt", + ] + if (host_os == "mac") { + sources += [ + "src/base/debug/stack_trace_posix.cc", + "src/base/platform/platform-macos.cc", + ] + } else { + sources += [ + "src/base/debug/stack_trace_posix.cc", + "src/base/platform/platform-linux.cc", + ] + } + } else { + sources += [ + "src/base/debug/stack_trace_android.cc", + "src/base/platform/platform-linux.cc", + ] + } + } else if (is_mac) { + sources += [ + "src/base/debug/stack_trace_posix.cc", + "src/base/platform/platform-macos.cc", + ] + } else if (is_win) { + # TODO(jochen): Add support for cygwin. + sources += [ + "src/base/debug/stack_trace_win.cc", + "src/base/platform/platform-win32.cc", + "src/base/win32-headers.h", + ] + + defines += [ "_CRT_RAND_S" ] # for rand_s() + + libs = [ + "dbghelp.lib", + "shlwapi.lib", + "winmm.lib", + "ws2_32.lib", + ] + } + + # TODO(jochen): Add support for qnx, freebsd, openbsd, netbsd, and solaris. +} + +v8_source_set("v8_libplatform") { + sources = [ + "//base/trace_event/common/trace_event_common.h", + "include/libplatform/libplatform.h", + "include/libplatform/v8-tracing.h", + "src/libplatform/default-platform.cc", + "src/libplatform/default-platform.h", + "src/libplatform/task-queue.cc", + "src/libplatform/task-queue.h", + "src/libplatform/tracing/trace-buffer.cc", + "src/libplatform/tracing/trace-buffer.h", + "src/libplatform/tracing/trace-config.cc", + "src/libplatform/tracing/trace-object.cc", + "src/libplatform/tracing/trace-writer.cc", + "src/libplatform/tracing/trace-writer.h", + "src/libplatform/tracing/tracing-controller.cc", + "src/libplatform/worker-thread.cc", + "src/libplatform/worker-thread.h", + ] + + configs = [ ":internal_config_base" ] + + public_configs = [ ":libplatform_config" ] + + deps = [ + ":v8_libbase", + ] +} + +v8_source_set("v8_libsampler") { + sources = [ + "src/libsampler/sampler.cc", + "src/libsampler/sampler.h", + ] + + configs = [ ":internal_config_base" ] + + public_configs = [ ":libsampler_config" ] + + deps = [ + ":v8_libbase", + ] +} + +v8_source_set("fuzzer_support") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + sources = [ + "test/fuzzer/fuzzer-support.cc", + "test/fuzzer/fuzzer-support.h", + ] + + configs = [ ":internal_config_base" ] + + deps = [ + ":v8_maybe_snapshot", + ] + + public_deps = [ + ":v8_libplatform", + ] +} + +v8_source_set("simple_fuzzer") { + sources = [ + "test/fuzzer/fuzzer.cc", + ] + + configs = [ ":internal_config_base" ] +} + +############################################################################### +# Executables +# + +if (current_toolchain == v8_snapshot_toolchain) { + v8_executable("mksnapshot") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + sources = [ + "src/snapshot/mksnapshot.cc", + ] + + configs = [ ":internal_config" ] + + deps = [ + ":v8_base", + ":v8_libplatform", + ":v8_nosnapshot", + "//build/config/sanitizers:deps", + "//build/win:default_exe_manifest", + ] + } +} + +v8_executable("mkpeephole") { + # mkpeephole needs to be built for the build host so the peephole lookup + # table can built during build. The table depends on the properties of + # bytecodes that are described in bytecodes.{cc,h}. + visibility = [ ":*" ] # Only targets in this file can depend on this. + + sources = [ + "src/interpreter/bytecode-peephole-optimizer.h", + "src/interpreter/bytecodes.cc", + "src/interpreter/bytecodes.h", + "src/interpreter/mkpeephole.cc", + ] + + configs = [ + ":external_config", + ":internal_config", + ] + + deps = [ + ":v8_libbase", + "//build/config/sanitizers:deps", + "//build/win:default_exe_manifest", + ] +} + +############################################################################### +# Public targets +# + +want_v8_shell = + (current_toolchain == host_toolchain && v8_toolset_for_shell == "host") || + (current_toolchain == v8_snapshot_toolchain && + v8_toolset_for_shell == "host") || + (current_toolchain != host_toolchain && v8_toolset_for_shell == "target") + +group("gn_all") { + testonly = true + + deps = [ + ":d8", + ":v8_hello_world", + ":v8_parser_shell", + ":v8_sample_process", + ":v8_simple_json_fuzzer", + ":v8_simple_parser_fuzzer", + ":v8_simple_regexp_fuzzer", + ":v8_simple_wasm_asmjs_fuzzer", + ":v8_simple_wasm_fuzzer", + "test:gn_all", + "tools:gn_all", + ] + + if (want_v8_shell) { + deps += [ ":v8_shell" ] + } + + if (v8_test_isolation_mode != "noop") { + deps += [ ":d8_run" ] + } +} + +if (is_component_build) { + v8_component("v8") { + sources = [ + "src/v8dll-main.cc", + ] + + deps = [ + ":v8_dump_build_config", + ] + + public_deps = [ + ":v8_base", + ":v8_maybe_snapshot", + ] + + configs = [ ":internal_config" ] + + public_configs = [ ":external_config" ] + } +} else { + group("v8") { + deps = [ + ":v8_dump_build_config", + ] + + public_deps = [ + ":v8_base", + ":v8_maybe_snapshot", + ] + public_configs = [ ":external_config" ] + } +} + +v8_executable("d8") { + sources = [ + "src/d8.cc", + "src/d8.h", + ] + + configs = [ + # Note: don't use :internal_config here because this target will get + # the :external_config applied to it by virtue of depending on :v8, and + # you can't have both applied to the same target. + ":internal_config_base", + ] + + deps = [ + ":d8_js2c", + ":v8", + ":v8_libplatform", + "//build/config/sanitizers:deps", + "//build/win:default_exe_manifest", + ] + + # TODO(jochen): Add support for vtunejit. + + if (is_posix) { + sources += [ "src/d8-posix.cc" ] + } else if (is_win) { + sources += [ "src/d8-windows.cc" ] + } + + if (!is_component_build) { + sources += [ "$target_gen_dir/d8-js.cc" ] + } + if (v8_enable_i18n_support) { + deps += [ "//third_party/icu" ] + } +} + +v8_isolate_run("d8") { + deps = [ + ":d8", + ] + + isolate = "//src/d8.isolate" +} + +v8_executable("v8_hello_world") { + sources = [ + "samples/hello-world.cc", + ] + + configs = [ + # Note: don't use :internal_config here because this target will get + # the :external_config applied to it by virtue of depending on :v8, and + # you can't have both applied to the same target. + ":internal_config_base", + ] + + deps = [ + ":v8", + ":v8_libplatform", + "//build/config/sanitizers:deps", + "//build/win:default_exe_manifest", + ] + + if (v8_enable_i18n_support) { + deps += [ "//third_party/icu" ] + } +} + +v8_executable("v8_sample_process") { + sources = [ + "samples/process.cc", + ] + + configs = [ + # Note: don't use :internal_config here because this target will get + # the :external_config applied to it by virtue of depending on :v8, and + # you can't have both applied to the same target. + ":internal_config_base", + ] + + deps = [ + ":v8", + ":v8_libplatform", + "//build/config/sanitizers:deps", + "//build/win:default_exe_manifest", + ] + + if (v8_enable_i18n_support) { + deps += [ "//third_party/icu" ] + } +} + +v8_executable("v8_parser_shell") { + sources = [ + "tools/parser-shell.cc", + "tools/shell-utils.h", + ] + + configs = [ + ":external_config", + ":internal_config_base", + ] + + deps = [ + ":v8_libplatform", + "//build/config/sanitizers:deps", + "//build/win:default_exe_manifest", + ] + + if (is_component_build) { + # v8_parser_shell can't be built against a shared library, so we + # need to depend on the underlying static target in that case. + deps += [ ":v8_maybe_snapshot" ] + } else { + deps += [ ":v8" ] + } + + if (v8_enable_i18n_support) { + deps += [ "//third_party/icu" ] + } + + if (is_win) { + # Suppress warnings about importing locally defined symbols. + if (is_component_build) { + ldflags = [ + "/ignore:4049", + "/ignore:4217", + ] + } + } +} + +if (want_v8_shell) { + v8_executable("v8_shell") { + sources = [ + "samples/shell.cc", + ] + + configs = [ + # Note: don't use :internal_config here because this target will get + # the :external_config applied to it by virtue of depending on :v8, and + # you can't have both applied to the same target. + ":internal_config_base", + ] + + deps = [ + ":v8", + ":v8_libplatform", + "//build/config/sanitizers:deps", + "//build/win:default_exe_manifest", + ] + + if (v8_enable_i18n_support) { + deps += [ "//third_party/icu" ] + } + } +} + +template("v8_fuzzer") { + name = target_name + forward_variables_from(invoker, "*") + v8_executable("v8_simple_" + name) { + deps = [ + ":" + name, + ":simple_fuzzer", + "//build/win:default_exe_manifest", + ] + + configs = [ ":external_config" ] + } +} + +v8_source_set("json_fuzzer") { + sources = [ + "test/fuzzer/json.cc", + ] + + deps = [ + ":fuzzer_support", + ] + + configs = [ ":internal_config" ] +} + +v8_fuzzer("json_fuzzer") { +} + +v8_source_set("parser_fuzzer") { + sources = [ + "test/fuzzer/parser.cc", + ] + + deps = [ + ":fuzzer_support", + ] + + configs = [ ":internal_config" ] +} + +v8_fuzzer("parser_fuzzer") { +} + +v8_source_set("regexp_fuzzer") { + sources = [ + "test/fuzzer/regexp.cc", + ] + + deps = [ + ":fuzzer_support", + ] + + configs = [ ":internal_config" ] +} + +v8_fuzzer("regexp_fuzzer") { +} + +v8_source_set("wasm_fuzzer") { + sources = [ + "test/fuzzer/wasm.cc", + ] + + deps = [ + ":fuzzer_support", + ] + + configs = [ ":internal_config" ] +} + +v8_fuzzer("wasm_fuzzer") { +} + +v8_source_set("wasm_asmjs_fuzzer") { + sources = [ + "test/fuzzer/wasm-asmjs.cc", + ] + + deps = [ + ":fuzzer_support", + ] + + configs = [ ":internal_config" ] +} + +v8_fuzzer("wasm_asmjs_fuzzer") { +} diff --git a/samples/GN/android-rules.gni b/samples/GN/android-rules.gni new file mode 100644 index 0000000000..0f18914339 --- /dev/null +++ b/samples/GN/android-rules.gni @@ -0,0 +1,2781 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Do not add any imports to non-//build directories here. +# Some projects (e.g. V8) do not have non-build directories DEPS'ed in. +import("//build/config/android/config.gni") +import("//build/config/android/internal_rules.gni") +import("//build/config/compiler/compiler.gni") +import("//build/config/dcheck_always_on.gni") +import("//build/toolchain/toolchain.gni") + +assert(is_android) + +# Creates a dist directory for a native executable. +# +# Running a native executable on a device requires all the shared library +# dependencies of that executable. To make it easier to install and run such an +# executable, this will create a directory containing the native exe and all +# it's library dependencies. +# +# Note: It's usually better to package things as an APK than as a native +# executable. +# +# Variables +# dist_dir: Directory for the exe and libraries. Everything in this directory +# will be deleted before copying in the exe and libraries. +# binary: Path to (stripped) executable. +# extra_files: List of extra files to copy in (optional). +# +# Example +# create_native_executable_dist("foo_dist") { +# dist_dir = "$root_build_dir/foo_dist" +# binary = "$root_build_dir/foo" +# deps = [ ":the_thing_that_makes_foo" ] +# } +template("create_native_executable_dist") { + forward_variables_from(invoker, [ "testonly" ]) + + _libraries_list = "${target_gen_dir}/${target_name}_library_dependencies.list" + + _find_deps_target_name = "${target_name}__find_library_dependencies" + + # TODO(agrieve): Extract dependent libs from GN rather than readelf. + action(_find_deps_target_name) { + forward_variables_from(invoker, [ "deps" ]) + + script = "//build/android/gyp/write_ordered_libraries.py" + depfile = "$target_gen_dir/$target_name.d" + inputs = [ + invoker.binary, + android_readelf, + ] + outputs = [ + _libraries_list, + ] + rebased_binaries = rebase_path([ invoker.binary ], root_build_dir) + args = [ + "--depfile", + rebase_path(depfile, root_build_dir), + "--input-libraries=$rebased_binaries", + "--libraries-dir", + rebase_path(root_shlib_dir, root_build_dir), + "--output", + rebase_path(_libraries_list, root_build_dir), + "--readelf", + rebase_path(android_readelf, root_build_dir), + ] + } + + copy_ex(target_name) { + clear_dir = true + + inputs = [ + _libraries_list, + invoker.binary, + ] + + dest = invoker.dist_dir + data = [ + "${invoker.dist_dir}/", + ] + + _rebased_libraries_list = rebase_path(_libraries_list, root_build_dir) + _rebased_binaries_list = rebase_path([ invoker.binary ], root_build_dir) + args = [ + "--files=@FileArg($_rebased_libraries_list:lib_paths)", + "--files=$_rebased_binaries_list", + ] + if (defined(invoker.extra_files)) { + _rebased_extra_files = rebase_path(invoker.extra_files, root_build_dir) + args += [ "--files=$_rebased_extra_files" ] + } + + deps = [ + ":$_find_deps_target_name", + ] + if (defined(invoker.deps)) { + deps += invoker.deps + } + } +} + +# Writes a script to root_out_dir/bin that passes --output-directory to the +# wrapped script, in addition to forwarding arguments. Most / all of these +# wrappers should be made deps of //tools/android:android_tools. +# +# Variables +# target: Script to wrap. +# flag_name: Default is "--output-directory" +# +# Example +# wrapper_script("foo_wrapper") { +# target = "//pkg/foo.py" +# } +template("wrapper_script") { + action(target_name) { + _name = get_path_info(invoker.target, "name") + _output = "$root_out_dir/bin/$_name" + + script = "//build/android/gyp/create_tool_wrapper.py" + outputs = [ + _output, + ] + + # The target isn't actually used by the script, but it's nice to have GN + # check that it exists. + inputs = [ + invoker.target, + ] + args = [ + "--output", + rebase_path(_output, root_build_dir), + "--target", + rebase_path(invoker.target, root_build_dir), + "--output-directory", + rebase_path(root_out_dir, root_build_dir), + ] + if (defined(invoker.flag_name)) { + args += [ "--flag-name=${invoker.flag_name}" ] + } + } +} + +if (enable_java_templates) { + import("//build/config/sanitizers/sanitizers.gni") + import("//tools/grit/grit_rule.gni") + + # Declare a jni target + # + # This target generates the native jni bindings for a set of .java files. + # + # See base/android/jni_generator/jni_generator.py for more info about the + # format of generating JNI bindings. + # + # Variables + # sources: list of .java files to generate jni for + # jni_package: subdirectory path for generated bindings + # + # Example + # generate_jni("foo_jni") { + # sources = [ + # "android/java/src/org/chromium/foo/Foo.java", + # "android/java/src/org/chromium/foo/FooUtil.java", + # ] + # jni_package = "foo" + # } + template("generate_jni") { + set_sources_assignment_filter([]) + forward_variables_from(invoker, [ "testonly" ]) + + assert(defined(invoker.sources)) + assert(defined(invoker.jni_package)) + jni_package = invoker.jni_package + base_output_dir = "${target_gen_dir}/${target_name}" + package_output_dir = "${base_output_dir}/${jni_package}" + jni_output_dir = "${package_output_dir}/jni" + + jni_generator_include = + "//base/android/jni_generator/jni_generator_helper.h" + + foreach_target_name = "${target_name}__jni_gen" + action_foreach(foreach_target_name) { + script = "//base/android/jni_generator/jni_generator.py" + depfile = "$target_gen_dir/$target_name.{{source_name_part}}.d" + sources = invoker.sources + outputs = [ + "${jni_output_dir}/{{source_name_part}}_jni.h", + ] + + args = [ + "--depfile", + rebase_path(depfile, root_build_dir), + "--input_file={{source}}", + "--optimize_generation=1", + "--ptr_type=long", + "--output_dir", + rebase_path(jni_output_dir, root_build_dir), + "--includes", + rebase_path(jni_generator_include, jni_output_dir), + "--native_exports_optional", + ] + + if (enable_profiling) { + args += [ "--enable_profiling" ] + } + } + + config("jni_includes_${target_name}") { + # TODO(cjhopman): #includes should probably all be relative to + # base_output_dir. Remove that from this config once the includes are + # updated. + include_dirs = [ + base_output_dir, + package_output_dir, + ] + } + + group(target_name) { + forward_variables_from(invoker, + [ + "deps", + "public_deps", + "visibility", + ]) + if (!defined(public_deps)) { + public_deps = [] + } + public_deps += [ ":$foreach_target_name" ] + public_configs = [ ":jni_includes_${target_name}" ] + } + } + + # Declare a jni target for a prebuilt jar + # + # This target generates the native jni bindings for a set of classes in a .jar. + # + # See base/android/jni_generator/jni_generator.py for more info about the + # format of generating JNI bindings. + # + # Variables + # classes: list of .class files in the jar to generate jni for. These should + # include the full path to the .class file. + # jni_package: subdirectory path for generated bindings + # jar_file: the path to the .jar. If not provided, will default to the sdk's + # android.jar + # + # deps, public_deps: As normal + # + # Example + # generate_jar_jni("foo_jni") { + # classes = [ + # "android/view/Foo.class", + # ] + # jni_package = "foo" + # } + template("generate_jar_jni") { + set_sources_assignment_filter([]) + forward_variables_from(invoker, [ "testonly" ]) + + assert(defined(invoker.classes)) + assert(defined(invoker.jni_package)) + + if (defined(invoker.jar_file)) { + jar_file = invoker.jar_file + } else { + jar_file = android_sdk_jar + } + + jni_package = invoker.jni_package + base_output_dir = "${root_gen_dir}/${target_name}/${jni_package}" + jni_output_dir = "${base_output_dir}/jni" + + jni_generator_include = + "//base/android/jni_generator/jni_generator_helper.h" + + # TODO(cjhopman): make jni_generator.py support generating jni for multiple + # .class files from a .jar. + jni_actions = [] + foreach(class, invoker.classes) { + _classname_list = [] + _classname_list = process_file_template([ class ], "{{source_name_part}}") + classname = _classname_list[0] + jni_target_name = "${target_name}__jni_${classname}" + jni_actions += [ ":$jni_target_name" ] + action(jni_target_name) { + # The sources aren't compiled so don't check their dependencies. + check_includes = false + depfile = "$target_gen_dir/$target_name.d" + script = "//base/android/jni_generator/jni_generator.py" + sources = [ + jar_file, + ] + outputs = [ + "${jni_output_dir}/${classname}_jni.h", + ] + + args = [ + "--depfile", + rebase_path(depfile, root_build_dir), + "--jar_file", + rebase_path(jar_file, root_build_dir), + "--input_file", + class, + "--optimize_generation=1", + "--ptr_type=long", + "--output_dir", + rebase_path(jni_output_dir, root_build_dir), + "--includes", + rebase_path(jni_generator_include, jni_output_dir), + "--native_exports_optional", + ] + + if (enable_profiling) { + args += [ "--enable_profiling" ] + } + } + } + + config("jni_includes_${target_name}") { + include_dirs = [ base_output_dir ] + } + + group(target_name) { + public_deps = [] + forward_variables_from(invoker, + [ + "deps", + "public_deps", + "visibility", + ]) + public_deps += jni_actions + public_configs = [ ":jni_includes_${target_name}" ] + } + } + + # Declare a target for c-preprocessor-generated java files + # + # NOTE: For generating Java conterparts to enums prefer using the java_cpp_enum + # rule instead. + # + # This target generates java files using the host C pre-processor. Each file in + # sources will be compiled using the C pre-processor. If include_path is + # specified, it will be passed (with --I) to the pre-processor. + # + # This target will create a single .srcjar. Adding this target to an + # android_library target's srcjar_deps will make the generated java files be + # included in that library's final outputs. + # + # Variables + # sources: list of files to be processed by the C pre-processor. For each + # file in sources, there will be one .java file in the final .srcjar. For a + # file named FooBar.template, a java file will be created with name + # FooBar.java. + # inputs: additional compile-time dependencies. Any files + # `#include`-ed in the templates should be listed here. + # package_name: this will be the subdirectory for each .java file in the + # .srcjar. + # + # Example + # java_cpp_template("foo_generated_enum") { + # sources = [ + # "android/java/templates/Foo.template", + # ] + # inputs = [ + # "android/java/templates/native_foo_header.h", + # ] + # + # package_name = "org/chromium/base/library_loader" + # include_path = "android/java/templates" + # } + template("java_cpp_template") { + set_sources_assignment_filter([]) + forward_variables_from(invoker, [ "testonly" ]) + + _include_path = "//" + if (defined(invoker.include_path)) { + _include_path = invoker.include_path + } + + _apply_gcc_target_name = "${target_name}__apply_gcc" + _base_gen_dir = "${target_gen_dir}/${target_name}/java_cpp_template" + + action_foreach(_apply_gcc_target_name) { + forward_variables_from(invoker, + [ + "deps", + "public_deps", + "data_deps", + ]) + script = "//build/android/gyp/gcc_preprocess.py" + if (defined(invoker.inputs)) { + inputs = invoker.inputs + [] + } + depfile = + "${target_gen_dir}/${invoker.target_name}_{{source_name_part}}.d" + + sources = invoker.sources + + outputs = [ + "$_base_gen_dir/${invoker.package_name}/{{source_name_part}}.java", + ] + + args = [ + "--depfile", + rebase_path(depfile, root_build_dir), + "--include-path", + rebase_path(_include_path, root_build_dir), + "--output", + rebase_path(outputs[0], root_build_dir), + "--template={{source}}", + ] + + if (defined(invoker.defines)) { + foreach(def, invoker.defines) { + args += [ + "--defines", + def, + ] + } + } + } + + # Filter out .d files. + set_sources_assignment_filter([ "*.d" ]) + sources = get_target_outputs(":$_apply_gcc_target_name") + + zip(target_name) { + forward_variables_from(invoker, [ "visibility" ]) + inputs = sources + output = "${target_gen_dir}/${target_name}.srcjar" + base_dir = _base_gen_dir + deps = [ + ":$_apply_gcc_target_name", + ] + } + } + + # Declare a target for generating Java classes from C++ enums. + # + # This target generates Java files from C++ enums using a script. + # + # This target will create a single .srcjar. Adding this target to an + # android_library target's srcjar_deps will make the generated java files be + # included in that library's final outputs. + # + # Variables + # sources: list of files to be processed by the script. For each annotated + # enum contained in the sources files the script will generate a .java + # file with the same name as the name of the enum. + # + # Example + # java_cpp_enum("foo_generated_enum") { + # sources = [ + # "src/native_foo_header.h", + # ] + # } + template("java_cpp_enum") { + action(target_name) { + # The sources aren't compiled so don't check their dependencies. + check_includes = false + set_sources_assignment_filter([]) + + assert(defined(invoker.sources)) + forward_variables_from(invoker, + [ + "sources", + "testonly", + "visibility", + ]) + + script = "//build/android/gyp/java_cpp_enum.py" + depfile = "$target_gen_dir/$target_name.d" + + _srcjar_path = "${target_gen_dir}/${target_name}.srcjar" + _rebased_srcjar_path = rebase_path(_srcjar_path, root_build_dir) + _rebased_sources = rebase_path(invoker.sources, root_build_dir) + + args = [ + "--depfile", + rebase_path(depfile, root_build_dir), + "--srcjar=$_rebased_srcjar_path", + ] + _rebased_sources + outputs = [ + _srcjar_path, + ] + } + } + + # Declare a target for processing a Jinja template. + # + # Variables + # input: The template file to be processed. + # output: Where to save the result. + # variables: (Optional) A list of variables to make available to the template + # processing environment, e.g. ["name=foo", "color=red"]. + # + # Example + # jinja_template("chrome_public_manifest") { + # input = "java/AndroidManifest.xml" + # output = "$target_gen_dir/AndroidManifest.xml" + # } + template("jinja_template") { + set_sources_assignment_filter([]) + forward_variables_from(invoker, [ "testonly" ]) + + assert(defined(invoker.input)) + assert(defined(invoker.output)) + + action(target_name) { + forward_variables_from(invoker, + [ + "visibility", + "deps", + ]) + + sources = [ + invoker.input, + ] + script = "//build/android/gyp/jinja_template.py" + depfile = "$target_gen_dir/$target_name.d" + + outputs = [ + invoker.output, + ] + + args = [ + "--loader-base-dir", + rebase_path("//", root_build_dir), + "--inputs", + rebase_path(invoker.input, root_build_dir), + "--output", + rebase_path(invoker.output, root_build_dir), + "--depfile", + rebase_path(depfile, root_build_dir), + ] + if (defined(invoker.variables)) { + variables = invoker.variables + args += [ "--variables=${variables}" ] + } + } + } + + # Declare a target for processing Android resources as Jinja templates. + # + # This takes an Android resource directory where each resource is a Jinja + # template, processes each template, then packages the results in a zip file + # which can be consumed by an android resources, library, or apk target. + # + # If this target is included in the deps of an android resources/library/apk, + # the resources will be included with that target. + # + # Variables + # resources: The list of resources files to process. + # res_dir: The resource directory containing the resources. + # variables: (Optional) A list of variables to make available to the template + # processing environment, e.g. ["name=foo", "color=red"]. + # + # Example + # jinja_template_resources("chrome_public_template_resources") { + # res_dir = "res_template" + # resources = ["res_template/xml/syncable.xml"] + # variables = ["color=red"] + # } + template("jinja_template_resources") { + set_sources_assignment_filter([]) + forward_variables_from(invoker, [ "testonly" ]) + + assert(defined(invoker.resources)) + assert(defined(invoker.res_dir)) + + _base_path = "$target_gen_dir/$target_name" + _resources_zip = _base_path + ".resources.zip" + _build_config = _base_path + ".build_config" + + write_build_config("${target_name}__build_config") { + build_config = _build_config + resources_zip = _resources_zip + type = "android_resources" + if (defined(invoker.deps)) { + possible_config_deps = invoker.deps + } + } + + action("${target_name}__template") { + forward_variables_from(invoker, [ "deps" ]) + sources = invoker.resources + script = "//build/android/gyp/jinja_template.py" + depfile = "$target_gen_dir/$target_name.d" + + outputs = [ + _resources_zip, + ] + + rebased_resources = rebase_path(invoker.resources, root_build_dir) + args = [ + "--inputs=${rebased_resources}", + "--inputs-base-dir", + rebase_path(invoker.res_dir, root_build_dir), + "--outputs-zip", + rebase_path(_resources_zip, root_build_dir), + "--depfile", + rebase_path(depfile, root_build_dir), + ] + if (defined(invoker.variables)) { + variables = invoker.variables + args += [ "--variables=${variables}" ] + } + } + + group(target_name) { + public_deps = [ + ":${target_name}__build_config", + ":${target_name}__template", + ] + } + } + + # Declare an Android resources target + # + # This creates a resources zip file that will be used when building an Android + # library or apk and included into a final apk. + # + # To include these resources in a library/apk, this target should be listed in + # the library's deps. A library/apk will also include any resources used by its + # own dependencies. + # + # Variables + # deps: Specifies the dependencies of this target. Any Android resources + # listed in deps will be included by libraries/apks that depend on this + # target. + # resource_dirs: List of directories containing resources for this target. + # generated_resource_dirs: List of directories containing resources for this + # target which are *generated* by a dependency. |generated_resource_files| + # must be specified if |generated_resource_dirs| is specified. + # generated_resource_files: List of all files in |generated_resource_dirs|. + # |generated_resource_dirs| must be specified in |generated_resource_files| + # is specified. + # android_manifest: AndroidManifest.xml for this target. Defaults to + # //build/android/AndroidManifest.xml. + # android_manifest_dep: Target that generates AndroidManifest (if applicable) + # custom_package: java package for generated .java files. + # v14_skip: If true, don't run v14 resource generator on this. Defaults to + # false. (see build/android/gyp/generate_v14_compatible_resources.py) + # shared_resources: If true make a resource package that can be loaded by a + # different application at runtime to access the package's resources. + # app_as_shared_lib: If true make a resource package that can be loaded as + # both shared_resources and normal application. + + # Example: + # android_resources("foo_resources") { + # deps = [":foo_strings_grd"] + # resource_dirs = ["res"] + # custom_package = "org.chromium.foo" + # } + # + # android_resources("foo_resources_overrides") { + # deps = [":foo_resources"] + # resource_dirs = ["res_overrides"] + # } + template("android_resources") { + set_sources_assignment_filter([]) + forward_variables_from(invoker, [ "testonly" ]) + + assert(defined(invoker.resource_dirs)) + + base_path = "$target_gen_dir/$target_name" + zip_path = base_path + ".resources.zip" + srcjar_path = base_path + ".srcjar" + r_text_path = base_path + "_R.txt" + build_config = base_path + ".build_config" + + build_config_target_name = "${target_name}__build_config" + process_resources_target_name = "${target_name}__process_resources" + final_target_name = target_name + + write_build_config(build_config_target_name) { + type = "android_resources" + forward_variables_from(invoker, + [ + "android_manifest", + "custom_package", + ]) + resource_dirs = [] + if (defined(invoker.resource_dirs)) { + resource_dirs += invoker.resource_dirs + } + if (defined(invoker.generated_resource_dirs)) { + resource_dirs += invoker.generated_resource_dirs + } + + if (defined(invoker.deps)) { + possible_config_deps = invoker.deps + } + if (defined(invoker.android_manifest_dep)) { + deps = [ + invoker.android_manifest_dep, + ] + } + + # No package means resources override their deps. + if (defined(custom_package) || defined(android_manifest)) { + r_text = r_text_path + } else { + assert(defined(invoker.deps), + "Must specify deps when custom_package is omitted.") + } + + resources_zip = zip_path + srcjar = srcjar_path + } + + process_resources(process_resources_target_name) { + forward_variables_from(invoker, + [ + "app_as_shared_lib", + "android_manifest", + "custom_package", + "deps", + "generated_resource_dirs", + "generated_resource_files", + "resource_dirs", + "shared_resources", + "v14_skip", + ]) + if (!defined(deps)) { + deps = [] + } + deps += [ ":$build_config_target_name" ] + if (defined(invoker.android_manifest_dep)) { + deps += [ invoker.android_manifest_dep ] + } + + # Always generate R.onResourcesLoaded() method, it is required for + # compiling ResourceRewriter, there is no side effect because the + # generated R.class isn't used in final apk. + shared_resources = true + if (!defined(android_manifest)) { + android_manifest = "//build/android/AndroidManifest.xml" + } + } + + group(final_target_name) { + forward_variables_from(invoker, [ "visibility" ]) + public_deps = [ + ":${target_name}__process_resources", + ] + } + } + + # Declare an Android assets target. + # + # Defines a set of files to include as assets in a dependent apk. + # + # To include these assets in an apk, this target should be listed in + # the apk's deps, or in the deps of a library target used by an apk. + # + # Variables + # deps: Specifies the dependencies of this target. Any Android assets + # listed in deps will be included by libraries/apks that depend on this + # target. + # sources: List of files to include as assets. + # renaming_sources: List of files to include as assets and be renamed. + # renaming_destinations: List of asset paths for files in renaming_sources. + # disable_compression: Whether to disable compression for files that are + # known to be compressable (default: false). + # + # Example: + # android_assets("content_shell_assets") { + # deps = [ + # ":generates_foo", + # ":other_assets", + # ] + # sources = [ + # "//path/asset1.png", + # "//path/asset2.png", + # "$target_gen_dir/foo.dat", + # ] + # } + # + # android_assets("overriding_content_shell_assets") { + # deps = [ ":content_shell_assets" ] + # # Override foo.dat from content_shell_assets. + # sources = [ "//custom/foo.dat" ] + # renaming_sources = [ "//path/asset2.png" ] + # renaming_destinations = [ "renamed/asset2.png" ] + # } + template("android_assets") { + set_sources_assignment_filter([]) + forward_variables_from(invoker, [ "testonly" ]) + + _build_config = "$target_gen_dir/$target_name.build_config" + _build_config_target_name = "${target_name}__build_config" + + write_build_config(_build_config_target_name) { + type = "android_assets" + build_config = _build_config + + forward_variables_from(invoker, [ "disable_compression" ]) + + if (defined(invoker.deps)) { + possible_config_deps = invoker.deps + } + + if (defined(invoker.sources)) { + asset_sources = invoker.sources + } + if (defined(invoker.renaming_sources)) { + assert(defined(invoker.renaming_destinations)) + _source_count = 0 + foreach(_, invoker.renaming_sources) { + _source_count += 1 + } + _dest_count = 0 + foreach(_, invoker.renaming_destinations) { + _dest_count += 1 + } + assert( + _source_count == _dest_count, + "android_assets() renaming_sources.length != renaming_destinations.length") + asset_renaming_sources = invoker.renaming_sources + asset_renaming_destinations = invoker.renaming_destinations + } + } + + group(target_name) { + forward_variables_from(invoker, + [ + "deps", + "visibility", + ]) + public_deps = [ + ":$_build_config_target_name", + ] + } + } + + # Declare a group() that supports forwarding java dependency information. + # + # Example + # java_group("conditional_deps") { + # if (enable_foo) { + # deps = [":foo_java"] + # } + # } + template("java_group") { + forward_variables_from(invoker, [ "testonly" ]) + write_build_config("${target_name}__build_config") { + type = "group" + build_config = "$target_gen_dir/${invoker.target_name}.build_config" + if (defined(invoker.deps)) { + possible_config_deps = invoker.deps + } + } + group(target_name) { + forward_variables_from(invoker, "*") + if (!defined(deps)) { + deps = [] + } + deps += [ ":${target_name}__build_config" ] + } + } + + # Declare a target that generates localized strings.xml from a .grd file. + # + # If this target is included in the deps of an android resources/library/apk, + # the strings.xml will be included with that target. + # + # Variables + # deps: Specifies the dependencies of this target. + # grd_file: Path to the .grd file to generate strings.xml from. + # outputs: Expected grit outputs (see grit rule). + # + # Example + # java_strings_grd("foo_strings_grd") { + # grd_file = "foo_strings.grd" + # } + template("java_strings_grd") { + set_sources_assignment_filter([]) + forward_variables_from(invoker, [ "testonly" ]) + + base_path = "$target_gen_dir/$target_name" + resources_zip = base_path + ".resources.zip" + build_config = base_path + ".build_config" + + write_build_config("${target_name}__build_config") { + type = "android_resources" + } + + # Put grit files into this subdirectory of target_gen_dir. + extra_output_path = target_name + "_grit_output" + + grit_target_name = "${target_name}__grit" + grit_output_dir = "$target_gen_dir/$extra_output_path" + grit(grit_target_name) { + forward_variables_from(invoker, [ "deps" ]) + grit_flags = [ + "-E", + "ANDROID_JAVA_TAGGED_ONLY=false", + ] + output_dir = grit_output_dir + resource_ids = "" + source = invoker.grd_file + outputs = invoker.outputs + } + + # This needs to get outputs from grit's internal target, not the final + # source_set. + generate_strings_outputs = get_target_outputs(":${grit_target_name}_grit") + + zip("${target_name}__zip") { + base_dir = grit_output_dir + inputs = generate_strings_outputs + output = resources_zip + deps = [ + ":$grit_target_name", + ] + } + + group(target_name) { + public_deps = [ + ":${target_name}__build_config", + ":${target_name}__zip", + ] + } + } + + # Declare a target that packages strings.xml generated from a grd file. + # + # If this target is included in the deps of an android resources/library/apk, + # the strings.xml will be included with that target. + # + # Variables + # grit_output_dir: directory containing grit-generated files. + # generated_files: list of android resource files to package. + # + # Example + # java_strings_grd_prebuilt("foo_strings_grd") { + # grit_output_dir = "$root_gen_dir/foo/grit" + # generated_files = [ + # "values/strings.xml" + # ] + # } + template("java_strings_grd_prebuilt") { + set_sources_assignment_filter([]) + forward_variables_from(invoker, [ "testonly" ]) + + base_path = "$target_gen_dir/$target_name" + resources_zip = base_path + ".resources.zip" + build_config = base_path + ".build_config" + + build_config_target_name = "${target_name}__build_config" + zip_target_name = "${target_name}__zip" + final_target_name = target_name + + write_build_config(build_config_target_name) { + type = "android_resources" + } + + zip(zip_target_name) { + visibility = [ ":$final_target_name" ] + + base_dir = invoker.grit_output_dir + inputs = rebase_path(invoker.generated_files, ".", base_dir) + output = resources_zip + deps = [ + ":$build_config_target_name", + ] + if (defined(invoker.deps)) { + deps += invoker.deps + } + } + + group(final_target_name) { + forward_variables_from(invoker, [ "visibility" ]) + public_deps = [ + ":$zip_target_name", + ] + } + } + + # Declare a Java executable target + # + # This target creates an executable from java code and libraries. The executable + # will be in the output folder's /bin/ directory. + # + # Variables + # deps: Specifies the dependencies of this target. Java targets in this list + # will be included in the executable (and the javac classpath). + # java_files: List of .java files included in this library. + # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars + # will be added to java_files and be included in this library. + # srcjars: List of srcjars to be included in this library, together with the + # ones obtained from srcjar_deps. + # bypass_platform_checks: Disables checks about cross-platform (Java/Android) + # dependencies for this target. This will allow depending on an + # android_library target, for example. + # chromium_code: If true, extra analysis warning/errors will be enabled. + # enable_errorprone: If true, enables the errorprone compiler. + # enable_incremental_javac_override: Overrides the + # global enable_incremental_javac. + # main_class: When specified, a wrapper script is created within + # $root_build_dir/bin to launch the binary with the given class as the + # entrypoint. + # wrapper_script_args: List of additional arguments for the wrapper script. + # + # data_deps, testonly + # + # Example + # java_binary("foo") { + # java_files = [ "org/chromium/foo/FooMain.java" ] + # deps = [ ":bar_java" ] + # main_class = "org.chromium.foo.FooMain" + # } + template("java_binary") { + set_sources_assignment_filter([]) + + java_library_impl(target_name) { + forward_variables_from(invoker, "*") + supports_android = false + main_class = invoker.main_class + is_java_binary = true + } + } + + # Declare a Junit executable target + # + # This target creates an executable from java code for running as a junit test + # suite. The executable will be in the output folder's /bin/ directory. + # + # Variables + # deps: Specifies the dependencies of this target. Java targets in this list + # will be included in the executable (and the javac classpath). + # + # java_files: List of .java files included in this library. + # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars + # will be added to java_files and be included in this library. + # srcjars: List of srcjars to be included in this library, together with the + # ones obtained from srcjar_deps. + # + # chromium_code: If true, extra analysis warning/errors will be enabled. + # + # Example + # junit_binary("foo") { + # java_files = [ "org/chromium/foo/FooTest.java" ] + # deps = [ ":bar_java" ] + # } + template("junit_binary") { + set_sources_assignment_filter([]) + testonly = true + + _java_binary_target_name = "${target_name}__java_binary" + _test_runner_target_name = "${target_name}__test_runner_script" + + test_runner_script(_test_runner_target_name) { + test_name = invoker.target_name + test_suite = invoker.target_name + test_type = "junit" + ignore_all_data_deps = true + } + + java_binary(_java_binary_target_name) { + deps = [] + output_name = invoker.target_name + forward_variables_from(invoker, "*") + testonly = true + bypass_platform_checks = true + main_class = "org.chromium.testing.local.JunitTestMain" + wrapper_script_name = "helper/$target_name" + deps += [ + "//testing/android/junit:junit_test_support", + "//third_party/junit", + "//third_party/mockito:mockito_java", + "//third_party/robolectric:robolectric_all_java", + ] + } + group(target_name) { + public_deps = [ + ":$_java_binary_target_name", + ":$_test_runner_target_name", + ] + } + } + + # Declare a java library target + # + # Variables + # deps: Specifies the dependencies of this target. Java targets in this list + # will be added to the javac classpath. + # + # java_files: List of .java files included in this library. + # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars + # will be added to java_files and be included in this library. + # srcjars: List of srcjars to be included in this library, together with the + # ones obtained from srcjar_deps. + # + # input_jars_paths: A list of paths to the jars that should be included + # in the classpath. These are in addition to library .jars that + # appear in deps. + # + # chromium_code: If true, extra analysis warning/errors will be enabled. + # enable_errorprone: If true, enables the errorprone compiler. + # enable_incremental_javac_override: Overrides the global + # enable_incremental_javac. + # + # jar_excluded_patterns: List of patterns of .class files to exclude from the + # final jar. + # + # output_name: File name for the output .jar (not including extension). + # Defaults to the input .jar file name. + # + # proguard_preprocess: If true, proguard preprocessing will be run. This can + # be used to remove unwanted parts of the library. + # proguard_preprocess_config: Path to the proguard config for preprocessing. + # proguard_configs: List of proguard configs to use in final apk step for + # any apk that depends on this library. + # + # supports_android: If true, Android targets (android_library, android_apk) + # may depend on this target. Note: if true, this target must only use the + # subset of Java available on Android. + # bypass_platform_checks: Disables checks about cross-platform (Java/Android) + # dependencies for this target. This will allow depending on an + # android_library target, for example. + # + # additional_jar_files: Use to package additional files into the output jar. + # Pass a list of length-2 lists with format + # [ [ path_to_file, path_to_put_in_jar ] ] + # + # + # data_deps, testonly + # + # Example + # java_library("foo_java") { + # java_files = [ + # "org/chromium/foo/Foo.java", + # "org/chromium/foo/FooInterface.java", + # "org/chromium/foo/FooService.java", + # ] + # deps = [ + # ":bar_java" + # ] + # srcjar_deps = [ + # ":foo_generated_enum" + # ] + # jar_excluded_patterns = [ + # "*/FooService.class", "*/FooService\$*.class" + # ] + # } + template("java_library") { + set_sources_assignment_filter([]) + java_library_impl(target_name) { + forward_variables_from(invoker, "*") + } + } + + # Declare a java library target for a prebuilt jar + # + # Variables + # deps: Specifies the dependencies of this target. Java targets in this list + # will be added to the javac classpath. + # jar_path: Path to the prebuilt jar. + # jar_dep: Target that builds jar_path (optional). + # main_class: When specified, a wrapper script is created within + # $root_build_dir/bin to launch the binary with the given class as the + # entrypoint. + # output_name: File name for the output .jar (not including extension). + # Defaults to the input .jar file name. + # proguard_preprocess: If true, proguard preprocessing will be run. This can + # be used to remove unwanted parts of the library. + # proguard_preprocess_config: Path to the proguard config for preprocessing. + # proguard_configs: List of proguard configs to use in final apk step for + # any apk that depends on this library. + # supports_android: If true, Android targets (android_library, android_apk) + # may depend on this target. Note: if true, this target must only use the + # subset of Java available on Android. + # + # Example + # java_prebuilt("foo_java") { + # jar_path = "foo.jar" + # deps = [ + # ":foo_resources", + # ":bar_java" + # ] + # } + template("java_prebuilt") { + set_sources_assignment_filter([]) + java_prebuilt_impl(target_name) { + forward_variables_from(invoker, "*") + } + } + + # Declare an Android library target + # + # This target creates an Android library containing java code and Android + # resources. + # + # Variables + # deps: Specifies the dependencies of this target. Java targets in this list + # will be added to the javac classpath. Android resources in dependencies + # will be used when building this library. + # + # java_files: List of .java files included in this library. + # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars + # will be added to java_files and be included in this library. + # srcjars: List of srcjars to be included in this library, together with the + # ones obtained from srcjar_deps. + # + # input_jars_paths: A list of paths to the jars that should be included + # in the classpath. These are in addition to library .jars that + # appear in deps. + # + # chromium_code: If true, extra analysis warning/errors will be enabled. + # enable_errorprone: If true, enables the errorprone compiler. + # enable_incremental_javac_override: Overrides the global + # enable_incremental_javac. + # + # jar_excluded_patterns: List of patterns of .class files to exclude from the + # final jar. + # + # proguard_preprocess: If true, proguard preprocessing will be run. This can + # be used to remove unwanted parts of the library. + # proguard_preprocess_config: Path to the proguard config for preprocessing. + # proguard_configs: List of proguard configs to use in final apk step for + # any apk that depends on this library. + # + # output_name: File name for the output .jar (not including extension). + # Defaults to the input .jar file name. + # dex_path: If set, the resulting .dex.jar file will be placed under this + # path. + # + # alternative_android_sdk_ijar: if set, the given android_sdk_ijar file + # replaces the default android_sdk_ijar. + # + # alternative_android_sdk_ijar_dep: the target that generates + # alternative_android_sdk_ijar, must be set if alternative_android_sdk_ijar + # is used. + # + # emma_never_instrument: Disables EMMA Java code coverage for this target. + # + # Example + # android_library("foo_java") { + # java_files = [ + # "android/org/chromium/foo/Foo.java", + # "android/org/chromium/foo/FooInterface.java", + # "android/org/chromium/foo/FooService.java", + # ] + # deps = [ + # ":bar_java" + # ] + # srcjar_deps = [ + # ":foo_generated_enum" + # ] + # jar_excluded_patterns = [ + # "*/FooService.class", "*/FooService\$*.class" + # ] + # } + template("android_library") { + set_sources_assignment_filter([]) + assert(!defined(invoker.jar_path), + "android_library does not support a custom jar path") + + if (defined(invoker.alternative_android_sdk_ijar)) { + assert(defined(invoker.alternative_android_sdk_ijar_dep)) + } + + java_library_impl(target_name) { + forward_variables_from(invoker, "*") + + supports_android = true + requires_android = true + + if (!defined(jar_excluded_patterns)) { + jar_excluded_patterns = [] + } + jar_excluded_patterns += [ + "*/R.class", + "*/R\$*.class", + "*/Manifest.class", + "*/Manifest\$*.class", + ] + } + } + + # Declare a target that packages a set of Java dependencies into a standalone + # .dex.jar. + # + # Variables + # deps: specifies the dependencies of this target. Android libraries in deps + # will be packaged into the resulting .dex.jar file. + # dex_path: location at which the output file will be put + template("android_standalone_library") { + set_sources_assignment_filter([]) + deps_dex(target_name) { + forward_variables_from(invoker, + [ + "deps", + "dex_path", + "excluded_jars", + ]) + } + } + + # Declare an Android library target for a prebuilt jar + # + # This target creates an Android library containing java code and Android + # resources. + # + # Variables + # deps: Specifies the dependencies of this target. Java targets in this list + # will be added to the javac classpath. Android resources in dependencies + # will be used when building this library. + # jar_path: Path to the prebuilt jar. + # output_name: File name for the output .jar (not including extension). + # Defaults to the input .jar file name. + # proguard_preprocess: If true, proguard preprocessing will be run. This can + # be used to remove unwanted parts of the library. + # proguard_preprocess_config: Path to the proguard config for preprocessing. + # proguard_configs: List of proguard configs to use in final apk step for + # any apk that depends on this library. + # + # Example + # android_java_prebuilt("foo_java") { + # jar_path = "foo.jar" + # deps = [ + # ":foo_resources", + # ":bar_java" + # ] + # } + template("android_java_prebuilt") { + set_sources_assignment_filter([]) + java_prebuilt_impl(target_name) { + forward_variables_from(invoker, "*") + supports_android = true + requires_android = true + strip_resource_classes = true + } + } + + # Declare an Android apk target + # + # This target creates an Android APK containing java code, resources, assets, + # and (possibly) native libraries. + # + # Variables + # alternative_android_sdk_jar: The alternative android sdk jar used in + # proguard. + # android_aapt_path: Android aapt tool to replace default one to build + # resource. + # android_manifest: Path to AndroidManifest.xml. + # android_manifest_dep: Target that generates AndroidManifest (if applicable) + # chromium_code: If true, extra analysis warning/errors will be enabled. + # dist_ijar_path: Path to create "${target_name}_dist_ijar" target + # (used by instrumentation_test_apk). + # data_deps: List of dependencies needed at runtime. These will be built but + # won't change the generated .apk in any way (in fact they may be built + # after the .apk is). + # deps: List of dependencies. All Android java resources and libraries in the + # "transitive closure" of these dependencies will be included in the apk. + # Note: this "transitive closure" actually only includes such targets if + # they are depended on through android_library or android_resources targets + # (and so not through builtin targets like 'action', 'group', etc). + # install_script_name: Name of wrapper script (default=target_name). + # java_files: List of .java files to include in the apk. + # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars + # will be added to java_files and be included in this apk. + # apk_name: Name for final apk. + # final_apk_path: Path to final built apk. Default is + # $root_out_dir/apks/$apk_name.apk. Setting this will override apk_name. + # loadable_modules: List of paths to native libraries to include. Different + # from |shared_libraries| in that: + # * dependencies of this .so are not automatically included + # * ".cr.so" is never added + # * they are not side-loaded for _incremental targets. + # * load_library_from_apk, use_chromium_linker, + # and enable_relocation_packing do not apply + # Use this instead of shared_libraries when you are going to load the library + # conditionally, and only when shared_libraries doesn't work for you. + # shared_libraries: List shared_library targets to bundle. If these + # libraries depend on other shared_library targets, those dependencies will + # also be included in the apk (e.g. for is_component_build). + # secondary_abi_shared_libraries: secondary abi shared_library targets to + # bundle. If these libraries depend on other shared_library targets, those + # dependencies will also be included in the apk (e.g. for is_component_build). + # native_lib_placeholders: List of placeholder filenames to add to the apk + # (optional). + # apk_under_test: For an instrumentation test apk, this is the target of the + # tested apk. + # include_all_resources - If true include all resource IDs in all generated + # R.java files. + # testonly: Marks this target as "test-only". + # write_asset_list: Adds an extra file to the assets, which contains a list of + # all other asset files. + # requires_sdk_api_level_23: If defined and true, the apk is intended for + # installation only on Android M or later. In these releases the system + # linker does relocation unpacking, so we can enable it unconditionally. + # secondary_native_libs (deprecated): The path of native libraries for secondary + # app abi. + # run_findbugs_override: Forces run_findbugs on or off. If undefined, the + # default will use the build arg run_findbugs. + # proguard_jar_path: The path to proguard.jar you wish to use. If undefined, + # the proguard used will be the checked in one in //third_party/proguard. + # + # Example + # android_apk("foo_apk") { + # android_manifest = "AndroidManifest.xml" + # java_files = [ + # "android/org/chromium/foo/FooApplication.java", + # "android/org/chromium/foo/FooActivity.java", + # ] + # deps = [ + # ":foo_support_java" + # ":foo_resources" + # ] + # srcjar_deps = [ + # ":foo_generated_enum" + # ] + # shared_libraries = [ + # ":my_shared_lib", + # ] + # } + template("android_apk") { + set_sources_assignment_filter([]) + forward_variables_from(invoker, [ "testonly" ]) + + assert(defined(invoker.final_apk_path) || defined(invoker.apk_name)) + assert(defined(invoker.android_manifest)) + gen_dir = "$target_gen_dir/$target_name" + base_path = "$gen_dir/$target_name" + _build_config = "$target_gen_dir/$target_name.build_config" + resources_zip_path = "$base_path.resources.zip" + _all_resources_zip_path = "$base_path.resources.all.zip" + _jar_path = "$base_path.jar" + _lib_dex_path = "$base_path.dex.jar" + _rebased_lib_dex_path = rebase_path(_lib_dex_path, root_build_dir) + _template_name = target_name + + enable_multidex = + defined(invoker.enable_multidex) && invoker.enable_multidex + if (enable_multidex) { + final_dex_path = "$gen_dir/classes.dex.zip" + } else { + final_dex_path = "$gen_dir/classes.dex" + } + final_dex_target_name = "${_template_name}__final_dex" + + _final_apk_path = "" + if (defined(invoker.final_apk_path)) { + _final_apk_path = invoker.final_apk_path + } else if (defined(invoker.apk_name)) { + _final_apk_path = "$root_build_dir/apks/" + invoker.apk_name + ".apk" + } + _final_apk_path_no_ext_list = + process_file_template([ _final_apk_path ], + "{{source_dir}}/{{source_name_part}}") + _final_apk_path_no_ext = _final_apk_path_no_ext_list[0] + assert(_final_apk_path_no_ext != "") # Mark as used. + + _install_script_name = "install_$_template_name" + if (defined(invoker.install_script_name)) { + _install_script_name = invoker.install_script_name + } + _incremental_install_script_path = + "${root_out_dir}/bin/${_install_script_name}_incremental" + + _version_code = android_default_version_code + if (defined(invoker.version_code)) { + _version_code = invoker.version_code + } + + _version_name = android_default_version_name + if (defined(invoker.version_name)) { + _version_name = invoker.version_name + } + _keystore_path = android_keystore_path + _keystore_name = android_keystore_name + _keystore_password = android_keystore_password + + if (defined(invoker.keystore_path)) { + _keystore_path = invoker.keystore_path + _keystore_name = invoker.keystore_name + _keystore_password = invoker.keystore_password + } + + _srcjar_deps = [] + if (defined(invoker.srcjar_deps)) { + _srcjar_deps += invoker.srcjar_deps + } + + _use_chromium_linker = + defined(invoker.use_chromium_linker) && invoker.use_chromium_linker + _enable_relocation_packing = defined(invoker.enable_relocation_packing) && + invoker.enable_relocation_packing + _load_library_from_apk = + defined(invoker.load_library_from_apk) && invoker.load_library_from_apk + _requires_sdk_api_level_23 = defined(invoker.requires_sdk_api_level_23) && + invoker.requires_sdk_api_level_23 + + assert(_use_chromium_linker || true) # Mark as used. + assert(_requires_sdk_api_level_23 || true) + if (_enable_relocation_packing) { + assert(_use_chromium_linker || _requires_sdk_api_level_23, + "enable_relocation_packing requires either use_chromium_linker " + + "or requires_sdk_api_level_23") + } + if (_load_library_from_apk) { + assert(_use_chromium_linker || _requires_sdk_api_level_23, + "load_library_from_apk requires use_chromium_linker " + + "or requires_sdk_api_level_23") + } + + # The dependency that makes the chromium linker, if any is needed. + _native_libs_deps = [] + _shared_libraries_is_valid = + defined(invoker.shared_libraries) && invoker.shared_libraries != [] + _secondary_abi_native_libs_deps = [] + assert(_secondary_abi_native_libs_deps == []) # mark as used. + _secondary_abi_shared_libraries_is_valid = + defined(invoker.secondary_abi_shared_libraries) && + invoker.secondary_abi_shared_libraries != [] + + if (is_component_build || is_asan) { + if (_shared_libraries_is_valid) { + _native_libs_deps += [ "//build/android:cpplib_stripped" ] + } + if (_secondary_abi_shared_libraries_is_valid) { + _secondary_abi_native_libs_deps += [ "//build/android:cpplib_stripped($android_secondary_abi_toolchain)" ] + } + } + + if (_shared_libraries_is_valid) { + _native_libs_deps += invoker.shared_libraries + + # To determine the filenames of all dependent shared libraries, write the + # runtime deps of |shared_libraries| to a file during "gn gen". + # write_build_config.py will then grep this file for *.so to obtain the + # complete list. + _runtime_deps_file = + "$target_gen_dir/${_template_name}.native.runtimedeps" + group("${_template_name}__runtime_deps") { + deps = _native_libs_deps + write_runtime_deps = _runtime_deps_file + } + + _native_lib_version_rule = "" + if (defined(invoker.native_lib_version_rule)) { + _native_lib_version_rule = invoker.native_lib_version_rule + } + _native_lib_version_arg = "\"\"" + if (defined(invoker.native_lib_version_arg)) { + _native_lib_version_arg = invoker.native_lib_version_arg + } + } + + if (_secondary_abi_shared_libraries_is_valid) { + _secondary_abi_native_libs_deps += invoker.secondary_abi_shared_libraries + + # To determine the filenames of all dependent shared libraries, write the + # runtime deps of |shared_libraries| to a file during "gn gen". + # write_build_config.py will then grep this file for *.so to obtain the + # complete list. + _secondary_abi_runtime_deps_file = + "$target_gen_dir/${_template_name}.secondary.abi.native.runtimedeps" + group("${_template_name}_secondary_abi__runtime_deps") { + deps = _secondary_abi_native_libs_deps + write_runtime_deps = _secondary_abi_runtime_deps_file + } + } + + if (defined(invoker.deps)) { + set_sources_assignment_filter([ "*manifest*" ]) + sources = invoker.deps + set_sources_assignment_filter([]) + if (sources != invoker.deps) { + _bad_deps = invoker.deps - sources + assert( + false, + "Possible manifest-generating dep found in deps. Use android_manifest_dep for this instead. Found: $_bad_deps") + } + sources = [] + } + _android_manifest_deps = [] + if (defined(invoker.android_manifest_dep)) { + _android_manifest_deps = [ invoker.android_manifest_dep ] + } + _android_manifest = invoker.android_manifest + + _rebased_build_config = rebase_path(_build_config, root_build_dir) + _create_abi_split = + defined(invoker.create_abi_split) && invoker.create_abi_split + _create_density_splits = + defined(invoker.create_density_splits) && invoker.create_density_splits + _create_language_splits = + defined(invoker.language_splits) && invoker.language_splits != [] + + # Help GN understand that _create_abi_split is not unused (bug in GN). + assert(_create_abi_split || true) + + _proguard_enabled = + defined(invoker.proguard_enabled) && invoker.proguard_enabled + if (_proguard_enabled) { + _proguard_output_jar_path = "$base_path.proguard.jar" + } + + _emma_never_instrument = defined(invoker.testonly) && invoker.testonly + + build_config_target = "${_template_name}__build_config" + write_build_config(build_config_target) { + forward_variables_from(invoker, [ "apk_under_test" ]) + type = "android_apk" + jar_path = _jar_path + dex_path = final_dex_path + apk_path = _final_apk_path + incremental_apk_path = "${_final_apk_path_no_ext}_incremental.apk" + incremental_install_script_path = _incremental_install_script_path + resources_zip = resources_zip_path + build_config = _build_config + android_manifest = _android_manifest + + deps = _android_manifest_deps + + if (defined(invoker.deps)) { + possible_config_deps = invoker.deps + } + + # Added emma to the target's classpath via its .build_config. + if (emma_coverage && !_emma_never_instrument) { + possible_config_deps += + [ "//third_party/android_tools:emma_device_java" ] + } + + proguard_enabled = _proguard_enabled + if (_proguard_enabled) { + proguard_info = "$_proguard_output_jar_path.info" + } + + # Don't depend on the runtime_deps target in order to avoid having to + # build the native libraries just to create the .build_config file. + # The dep is unnecessary since the runtime_deps file is created by gn gen + # and the runtime_deps file is added to write_build_config.py's depfile. + if (_native_libs_deps != []) { + shared_libraries_runtime_deps_file = _runtime_deps_file + } + if (_secondary_abi_native_libs_deps != []) { + secondary_abi_shared_libraries_runtime_deps_file = + _secondary_abi_runtime_deps_file + } + } + + _final_deps = [] + + _generated_proguard_config = "$base_path.resources.proguard.txt" + process_resources_target = "${_template_name}__process_resources" + process_resources(process_resources_target) { + forward_variables_from(invoker, + [ + "alternative_android_sdk_jar", + "android_aapt_path", + "app_as_shared_lib", + "include_all_resources", + "shared_resources", + ]) + srcjar_path = "${target_gen_dir}/${target_name}.srcjar" + r_text_path = "${target_gen_dir}/${target_name}_R.txt" + android_manifest = _android_manifest + resource_dirs = [ "//build/android/ant/empty/res" ] + zip_path = resources_zip_path + all_resources_zip_path = _all_resources_zip_path + generate_constant_ids = true + proguard_file = _generated_proguard_config + + build_config = _build_config + deps = _android_manifest_deps + [ ":$build_config_target" ] + if (defined(invoker.deps)) { + deps += invoker.deps + } + } + _srcjar_deps += [ ":$process_resources_target" ] + + if (_native_libs_deps != []) { + _enable_chromium_linker_tests = false + if (defined(invoker.enable_chromium_linker_tests)) { + _enable_chromium_linker_tests = invoker.enable_chromium_linker_tests + } + _ordered_libraries_json = + "$target_gen_dir/$target_name.ordered_libararies.json" + _rebased_ordered_libraries_json = + rebase_path(_ordered_libraries_json, root_build_dir) + _ordered_libraries_target = "${_template_name}__write_ordered_libraries" + + # TODO(agrieve): Make GN write runtime deps in dependency order so as to + # not need this manual sorting step. + action(_ordered_libraries_target) { + script = "//build/android/gyp/write_ordered_libraries.py" + deps = _native_libs_deps + [ ":$build_config_target" ] + outputs = [ + _ordered_libraries_json, + ] + _rebased_android_readelf = rebase_path(android_readelf, root_build_dir) + args = [ + "--readelf=$_rebased_android_readelf", + "--output=$_rebased_ordered_libraries_json", + "--libraries-dir=.", + "--input-libraries=@FileArg($_rebased_build_config:native:libraries)", + ] + } + + java_cpp_template("${_template_name}__native_libraries_java") { + package_name = "org/chromium/base/library_loader" + sources = [ + "//base/android/java/templates/NativeLibraries.template", + ] + inputs = [ + _ordered_libraries_json, + ] + deps = [ + ":${_ordered_libraries_target}", + ] + if (_native_lib_version_rule != "") { + deps += [ _native_lib_version_rule ] + } + + defines = [ + "NATIVE_LIBRARIES_LIST=" + + "@FileArg($_rebased_ordered_libraries_json:java_libraries_list)", + "NATIVE_LIBRARIES_VERSION_NUMBER=$_native_lib_version_arg", + ] + if (_use_chromium_linker) { + defines += [ "ENABLE_CHROMIUM_LINKER" ] + } + if (_load_library_from_apk) { + defines += [ "ENABLE_CHROMIUM_LINKER_LIBRARY_IN_ZIP_FILE" ] + } + if (_enable_chromium_linker_tests) { + defines += [ "ENABLE_CHROMIUM_LINKER_TESTS" ] + } + } + _srcjar_deps += [ ":${_template_name}__native_libraries_java" ] + } + + if (!defined(invoker.apk_under_test)) { + java_cpp_template("${_template_name}__build_config_java") { + package_name = "org/chromium/base" + sources = [ + "//base/android/java/templates/BuildConfig.template", + ] + deps = [ + ":$build_config_target", + ] + + defines = [] + if (enable_multidex) { + defines += [ "ENABLE_MULTIDEX" ] + } + if (is_java_debug || dcheck_always_on) { + defines += [ "_DCHECK_IS_ON" ] + } + defines += [ + "COMPRESSED_LOCALE_LIST=" + + "@FileArg($_rebased_build_config:compressed_locales_java_list)", + "UNCOMPRESSED_LOCALE_LIST=" + + "@FileArg($_rebased_build_config:uncompressed_locales_java_list)", + ] + } + _srcjar_deps += [ ":${_template_name}__build_config_java" ] + } + + java_target = "${_template_name}__java" + java_library_impl(java_target) { + forward_variables_from(invoker, + [ + "chromium_code", + "java_files", + "run_findbugs_override", + ]) + supports_android = true + requires_android = true + override_build_config = _build_config + deps = _android_manifest_deps + [ ":$build_config_target" ] + + android_manifest = _android_manifest + srcjar_deps = _srcjar_deps + jar_path = _jar_path + dex_path = _lib_dex_path + emma_never_instrument = _emma_never_instrument + + if (defined(invoker.deps)) { + deps += invoker.deps + } + if (defined(invoker.apk_under_test)) { + deps += [ "${invoker.apk_under_test}__java" ] + } + if (emma_coverage && !_emma_never_instrument) { + deps += [ "//third_party/android_tools:emma_device_java" ] + } + } + + # TODO(cjhopman): This is only ever needed to calculate the list of tests to + # run. See build/android/pylib/instrumentation/test_jar.py. We should be + # able to just do that calculation at build time instead. + if (defined(invoker.dist_ijar_path)) { + _dist_ijar_path = invoker.dist_ijar_path + action("${_template_name}_dist_ijar") { + script = "//build/android/gyp/create_dist_jar.py" + depfile = "$target_gen_dir/$target_name.d" + inputs = [ + _build_config, + ] + outputs = [ + "${_dist_ijar_path}", + ] + data = [ + _dist_ijar_path, + ] + args = [ + "--depfile", + rebase_path(depfile, root_build_dir), + "--output", + rebase_path("${_dist_ijar_path}", root_build_dir), + "--inputs=@FileArg($_rebased_build_config:dist_jar:all_interface_jars)", + ] + deps = [ + ":$build_config_target", # Generates the build config file. + ":$java_target", # Generates the jar file. + ] + } + } + + if (_proguard_enabled) { + _proguard_configs = [ _generated_proguard_config ] + if (defined(invoker.proguard_configs)) { + _proguard_configs += invoker.proguard_configs + } + assert(_proguard_configs != []) # Mark as used. + _proguard_target = "${_template_name}__proguard" + proguard(_proguard_target) { + forward_variables_from(invoker, + [ + "alternative_android_sdk_jar", + "deps", + "proguard_jar_path", + ]) + if (!defined(deps)) { + deps = [] + } + deps += [ + ":$build_config_target", + ":$java_target", + ":$process_resources_target", + ] + inputs = [ + _build_config, + _jar_path, + ] + _proguard_configs + + output_jar_path = _proguard_output_jar_path + _rebased_proguard_configs = + rebase_path(_proguard_configs, root_build_dir) + args = [ + "--proguard-configs=$_rebased_proguard_configs", + "--proguard-configs=@FileArg($_rebased_build_config:proguard:lib_configs)", + "--input-paths=@FileArg($_rebased_build_config:proguard:input_paths)", + "--classpath=@FileArg($_rebased_build_config:proguard:lib_paths)", + ] + if (defined(invoker.apk_under_test)) { + deps += [ + "${invoker.apk_under_test}__build_config", + "${invoker.apk_under_test}__proguard", + ] + _apk_under_test_build_config = + get_label_info(invoker.apk_under_test, "target_gen_dir") + "/" + + get_label_info(invoker.apk_under_test, "name") + ".build_config" + _rebased_apk_under_test_build_config = + rebase_path(_apk_under_test_build_config, root_build_dir) + args += [ "--tested-apk-info=@FileArg($_rebased_apk_under_test_build_config:deps_info:proguard_info)" ] + } + } + _dex_sources = [ _proguard_output_jar_path ] + _dex_deps = [ ":$_proguard_target" ] + + _copy_proguard_mapping_target = "${_template_name}__copy_proguard_mapping" + copy(_copy_proguard_mapping_target) { + sources = [ + "$_proguard_output_jar_path.mapping", + ] + outputs = [ + "$_final_apk_path.mapping", + ] + deps = [ + ":$_proguard_target", + ] + } + } else { + if (enable_multidex) { + _dex_sources = [ _jar_path ] + } else { + _dex_sources = [ _lib_dex_path ] + } + _dex_deps = [ ":$java_target" ] + } + + dex("$final_dex_target_name") { + deps = _dex_deps + [ ":$build_config_target" ] + inputs = [ + _build_config, + ] + sources = _dex_sources + output = final_dex_path + + # All deps are already included in _dex_sources when proguard is used. + if (!_proguard_enabled) { + if (enable_multidex) { + _dex_arg_key = "${_rebased_build_config}:dist_jar:dependency_jars" + } else { + _dex_arg_key = + "${_rebased_build_config}:final_dex:dependency_dex_files" + } + args = [ "--inputs=@FileArg($_dex_arg_key)" ] + } + } + + _native_libs_file_arg_dep = ":$build_config_target" + _native_libs_file_arg = "@FileArg($_rebased_build_config:native:libraries)" + _secondary_abi_native_libs_file_arg_dep = ":$build_config_target" + _secondary_abi_native_libs_file_arg = + "@FileArg($_rebased_build_config:native:secondary_abi_libraries)" + assert(_secondary_abi_native_libs_file_arg != "" && + _secondary_abi_native_libs_file_arg_dep != "") # Mark as used. + + if (_native_libs_deps != [] && _enable_relocation_packing) { + _prepare_native_target_name = "${_template_name}__prepare_native" + _native_libs_json = "$gen_dir/packed-libs/filelist.json" + _rebased_native_libs_json = rebase_path(_native_libs_json, root_build_dir) + _native_libs_file_arg_dep = ":$_prepare_native_target_name" + _native_libs_file_arg = "@FileArg($_rebased_native_libs_json:files)" + + pack_relocation_section(_prepare_native_target_name) { + forward_variables_from(invoker, + [ + "deps", + "public_deps", + ]) + file_list_json = _native_libs_json + libraries_filearg = + "@FileArg(${_rebased_build_config}:native:libraries)" + inputs = [ + _build_config, + ] + + deps += _native_libs_deps + deps += [ ":$build_config_target" ] + } + if (_secondary_abi_native_libs_deps != []) { + _prepare_native_target_name = + "${_template_name}_secondary_abi__prepare_native" + _native_libs_json = + "$gen_dir/packed-libs/$android_secondary_abi_cpu/filelist.json" + _rebased_native_libs_json = + rebase_path(_native_libs_json, root_build_dir) + _secondary_abi_native_libs_file_arg_dep = + ":$_prepare_native_target_name" + _secondary_abi_native_libs_file_arg = + "@FileArg($_rebased_native_libs_json:files)" + + pack_relocation_section(_prepare_native_target_name) { + forward_variables_from(invoker, + [ + "deps", + "public_deps", + ]) + file_list_json = _native_libs_json + libraries_filearg = "@FileArg(${_rebased_build_config}:native:secondary_abi_libraries)" + inputs = [ + _build_config, + ] + + deps += _secondary_abi_native_libs_deps + deps += [ ":$build_config_target" ] + } + } + } + + _extra_native_libs = [] + _extra_native_libs_deps = [] + _extra_native_libs_even_when_incremental = [] + _extra_native_libs_even_when_incremental_deps = [] + assert(_extra_native_libs_even_when_incremental_deps == []) # Mark as used. + if (_native_libs_deps != []) { + # zipalign can't align gdb_server, don't pack gdbserver temporarily. + if (is_debug && (!defined(invoker.page_align_shared_libraries) || + !invoker.page_align_shared_libraries)) { + _extra_native_libs_even_when_incremental = [ android_gdbserver ] + } + + if (_use_chromium_linker) { + _extra_native_libs = + [ "$root_shlib_dir/libchromium_android_linker$shlib_extension" ] + _extra_native_libs_deps += + [ "//base/android/linker:chromium_android_linker" ] + } + } + if (defined(invoker.loadable_modules) && invoker.loadable_modules != []) { + _extra_native_libs_even_when_incremental += invoker.loadable_modules + } + + _final_deps += [ ":${_template_name}__create" ] + create_apk("${_template_name}__create") { + forward_variables_from(invoker, + [ + "alternative_android_sdk_jar", + "android_aapt_path", + "app_as_shared_lib", + "deps", + "extensions_to_not_compress", + "language_splits", + "page_align_shared_libraries", + "public_deps", + "secondary_native_libs", + "shared_resources", + "uncompress_shared_libraries", + "write_asset_list", + ]) + if (!defined(deps)) { + deps = [] + } + apk_path = _final_apk_path + android_manifest = _android_manifest + assets_build_config = _build_config + resources_zip = _all_resources_zip_path + dex_path = final_dex_path + load_library_from_apk = _load_library_from_apk + create_density_splits = _create_density_splits + emma_instrument = emma_coverage && !_emma_never_instrument + + if (!defined(extensions_to_not_compress)) { + # Allow icu data, v8 snapshots, and pak files to be loaded directly from + # the .apk. + # Note: These are actually suffix matches, not necessarily extensions. + extensions_to_not_compress = ".dat,.bin,.pak" + } + + version_code = _version_code + version_name = _version_name + + keystore_name = _keystore_name + keystore_path = _keystore_path + keystore_password = _keystore_password + + # Incremental apk does not use native libs nor final dex. + incremental_deps = deps + _android_manifest_deps + [ + ":$build_config_target", + ":$process_resources_target", + ] + + # This target generates the input file _all_resources_zip_path. + deps += _android_manifest_deps + [ + ":$build_config_target", + ":$process_resources_target", + ":$final_dex_target_name", + ] + + if ((_native_libs_deps != [] || + _extra_native_libs_even_when_incremental != []) && + !_create_abi_split) { + deps += _native_libs_deps + _extra_native_libs_deps + + _extra_native_libs_even_when_incremental_deps + + [ _native_libs_file_arg_dep ] + native_libs_filearg = _native_libs_file_arg + native_libs = _extra_native_libs + native_libs_even_when_incremental = + _extra_native_libs_even_when_incremental + } + + if (_secondary_abi_native_libs_deps != [] && !_create_abi_split) { + deps += _secondary_abi_native_libs_deps + + [ _secondary_abi_native_libs_file_arg_dep ] + secondary_abi_native_libs_filearg = _secondary_abi_native_libs_file_arg + } + + # Placeholders necessary for some older devices. + # http://crbug.com/395038 + forward_variables_from(invoker, [ "native_lib_placeholders" ]) + } + + if ((_native_libs_deps != [] || + _extra_native_libs_even_when_incremental != []) && _create_abi_split) { + _manifest_rule = + "${_template_name}__split_manifest_abi_${android_app_abi}" + generate_split_manifest(_manifest_rule) { + main_manifest = _android_manifest + out_manifest = + "$gen_dir/split-manifests/${android_app_abi}/AndroidManifest.xml" + split_name = "abi_${android_app_abi}" + deps = _android_manifest_deps + } + + _apk_rule = "${_template_name}__split_apk_abi_${android_app_abi}" + _final_deps += [ ":$_apk_rule" ] + + create_apk(_apk_rule) { + apk_path = "${_final_apk_path_no_ext}-abi-${android_app_abi}.apk" + base_path = "$gen_dir/$_apk_rule" + + manifest_outputs = get_target_outputs(":${_manifest_rule}") + android_manifest = manifest_outputs[1] + load_library_from_apk = _load_library_from_apk + + version_code = _version_code + version_name = _version_name + + keystore_name = _keystore_name + keystore_path = _keystore_path + keystore_password = _keystore_password + + # Placeholders necessary for some older devices. + # http://crbug.com/395038 + deps = [] + forward_variables_from(invoker, + [ + "alternative_android_sdk_jar", + "android_aapt_path", + "deps", + "native_lib_placeholders", + "public_deps", + ]) + + incremental_deps = + deps + _extra_native_libs_even_when_incremental_deps + + [ ":$_manifest_rule" ] + deps = [] + deps = incremental_deps + _native_libs_deps + _extra_native_libs_deps + + [ _native_libs_file_arg_dep ] + native_libs_filearg = _native_libs_file_arg + native_libs = _extra_native_libs + native_libs_even_when_incremental = + _extra_native_libs_even_when_incremental + } + } + + _create_incremental_script_rule_name = + "${_template_name}__incremental_script" + action(_create_incremental_script_rule_name) { + script = "//build/android/incremental_install/create_install_script.py" + depfile = "$target_gen_dir/$target_name.d" + deps = [ + _native_libs_file_arg_dep, + ] + + outputs = [ + _incremental_install_script_path, + ] + + _rebased_apk_path_no_ext = + rebase_path(_final_apk_path_no_ext, root_build_dir) + _rebased_incremental_install_script_path = + rebase_path(_incremental_install_script_path, root_build_dir) + _rebased_depfile = rebase_path(depfile, root_build_dir) + _dex_arg_key = "${_rebased_build_config}:final_dex:dependency_dex_files" + args = [ + "--apk-path=${_rebased_apk_path_no_ext}_incremental.apk", + "--script-output-path=$_rebased_incremental_install_script_path", + "--dex-file=$_rebased_lib_dex_path", + "--dex-file-list=@FileArg($_dex_arg_key)", + "--depfile=$_rebased_depfile", + ] + if (_proguard_enabled) { + args += [ "--show-proguard-warning" ] + } + if (defined(_native_libs_file_arg)) { + args += [ "--native-libs=$_native_libs_file_arg" ] + } + if (_extra_native_libs != []) { + # Don't pass in _extra_native_libs_even_when_incremental, since these are + # end up in the apk and are not side-loaded. + _rebased_extra_native_libs = + rebase_path(_extra_native_libs, root_build_dir) + args += [ "--native-libs=$_rebased_extra_native_libs" ] + } + if (_create_density_splits) { + args += [ "--split=${_rebased_apk_path_no_ext}-density-*.apk" ] + } + if (_create_language_splits) { + args += [ "--split=${_rebased_apk_path_no_ext}-language-*.apk" ] + } + if (_load_library_from_apk) { + args += [ "--dont-even-try=Incremental builds do not work with load_library_from_apk. Try setting is_component_build=true in your GN args." ] + } + } + + group(target_name) { + forward_variables_from(invoker, + [ + "data", + "data_deps", + ]) + public_deps = _final_deps + + # Make the proguard .mapping file easy to find by putting it beside the .apk. + if (_proguard_enabled) { + deps = [ + ":$_copy_proguard_mapping_target", + ] + } + } + group("${target_name}_incremental") { + forward_variables_from(invoker, + [ + "data", + "data_deps", + ]) + if (!defined(data_deps)) { + data_deps = [] + } + + # device/commands is used by the installer script to push files via .zip. + data_deps += [ "//build/android/pylib/device/commands" ] + + _native_libs_deps + _extra_native_libs_deps + + # Since the _incremental.apk does not include use .so nor .dex from the + # actual target, but instead loads them at runtime, we need to explicitly + # depend on them here. + public_deps = [ + ":${_create_incremental_script_rule_name}", + ":${_template_name}__create_incremental", + ":${java_target}", + ] + } + } + + # Declare an Android instrumentation test apk + # + # This target creates an Android instrumentation test apk. + # + # Variables + # android_manifest: Path to AndroidManifest.xml. + # data_deps: List of dependencies needed at runtime. These will be built but + # won't change the generated .apk in any way (in fact they may be built + # after the .apk is). + # deps: List of dependencies. All Android java resources and libraries in the + # "transitive closure" of these dependencies will be included in the apk. + # Note: this "transitive closure" actually only includes such targets if + # they are depended on through android_library or android_resources targets + # (and so not through builtin targets like 'action', 'group', etc). + # java_files: List of .java files to include in the apk. + # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars + # will be added to java_files and be included in this apk. + # apk_name: Name for final apk. + # final_apk_path: Path to final built apk. Default is + # $root_out_dir/apks/$apk_name.apk. Setting this will override apk_name. + # shared_libraries: List shared_library targets to bundle. If these + # libraries depend on other shared_library targets, those dependencies will + # also be included in the apk (e.g. for is_component_build). + # apk_under_test: The apk being tested. + # + # Example + # instrumentation_test_apk("foo_test_apk") { + # android_manifest = "AndroidManifest.xml" + # apk_name = "FooTest" + # apk_under_test = "Foo" + # java_files = [ + # "android/org/chromium/foo/FooTestCase.java", + # "android/org/chromium/foo/FooExampleTest.java", + # ] + # deps = [ + # ":foo_test_support_java" + # ] + # } + template("instrumentation_test_apk") { + assert(defined(invoker.apk_name)) + testonly = true + _apk_target_name = "${target_name}__apk" + _test_runner_target_name = "${target_name}__test_runner_script" + _install_script_name = "install_$target_name" + _dist_ijar_path = + "$root_build_dir/test.lib.java/" + invoker.apk_name + ".jar" + + test_runner_script(_test_runner_target_name) { + forward_variables_from(invoker, + [ + "additional_apks", + "apk_under_test", + "data", + "data_deps", + "deps", + "ignore_all_data_deps", + "public_deps", + ]) + test_name = invoker.target_name + test_type = "instrumentation" + apk_target = ":$_apk_target_name" + test_jar = _dist_ijar_path + } + + test_runner_script("${_test_runner_target_name}_incremental") { + forward_variables_from(invoker, + [ + "additional_apks", + "apk_under_test", + "data", + "data_deps", + "deps", + "ignore_all_data_deps", + "public_deps", + ]) + test_name = "${invoker.target_name}_incremental" + test_type = "instrumentation" + apk_target = ":$_apk_target_name" + test_jar = _dist_ijar_path + incremental_install = true + } + + android_apk(_apk_target_name) { + deps = [] + data_deps = [] + forward_variables_from(invoker, "*") + install_script_name = _install_script_name + deps += [ "//testing/android/broker:broker_java" ] + data_deps += [ + "//build/android/pylib/device/commands", + "//tools/android/forwarder2", + "//tools/android/md5sum", + ] + if (defined(invoker.additional_apks)) { + data_deps += invoker.additional_apks + } + + if (defined(invoker.proguard_enabled) && invoker.proguard_enabled) { + # When ProGuard is on, we use ProGuard to combine the under test java + # code and the test java code. This is to allow us to apply all ProGuard + # optimizations that we ship with, but not have them break tests. The + # apk under test will still have the same resources, assets, and + # manifest, all of which are the ones used in the tests. + if (!defined(invoker.proguard_configs)) { + proguard_configs = [] + } + proguard_configs += [ "//testing/android/proguard_for_test.flags" ] + } + + dist_ijar_path = _dist_ijar_path + if (defined(invoker.run_findbugs_override)) { + # Only allow findbugs when there are java files. + run_findbugs_override = + invoker.run_findbugs_override && defined(invoker.java_files) + } + } + + group(target_name) { + public_deps = [ + ":$_apk_target_name", + ":$_test_runner_target_name", + + # Required by test runner to enumerate test list. + ":${_apk_target_name}_dist_ijar", + ] + if (defined(invoker.apk_under_test)) { + public_deps += [ invoker.apk_under_test ] + } + } + + # TODO: Delete once recipes no longer use this target. + group("${target_name}_run") { + public_deps = [ + ":${invoker.target_name}", + ] + } + group("${target_name}_incremental") { + public_deps = [ + ":${_apk_target_name}_dist_ijar", + ":${_apk_target_name}_incremental", + ":${_test_runner_target_name}_incremental", + ] + if (defined(invoker.apk_under_test)) { + public_deps += [ "${invoker.apk_under_test}_incremental" ] + } + } + } + + # Declare an Android gtest apk + # + # This target creates an Android apk for running gtest-based unittests. + # + # Variables + # deps: Specifies the dependencies of this target. These will be passed to + # the underlying android_apk invocation and should include the java and + # resource dependencies of the apk. + # shared_library: shared_library target that contains the unit tests. + # apk_name: The name of the produced apk. If unspecified, it uses the name + # of the shared_library target suffixed with "_apk" + # use_default_launcher: Whether the default activity (NativeUnitTestActivity) + # should be used for launching tests. + # use_native_activity: Test implements ANativeActivity_onCreate(). + # + # Example + # unittest_apk("foo_unittests_apk") { + # deps = [ ":foo_java", ":foo_resources" ] + # shared_library = ":foo_unittests" + # } + template("unittest_apk") { + _use_native_activity = + defined(invoker.use_native_activity) && invoker.use_native_activity + _android_manifest = "$target_gen_dir/$target_name/AndroidManifest.xml" + assert(invoker.shared_library != "") + + # This trivial assert is needed in case android_manifest is defined, + # as otherwise _use_native_activity and _android_manifest would not be used. + assert(_use_native_activity != "" && _android_manifest != "") + + if (!defined(invoker.android_manifest)) { + jinja_template("${target_name}_manifest") { + _native_library_name = get_label_info(invoker.shared_library, "name") + input = "//testing/android/native_test/java/AndroidManifest.xml.jinja2" + output = _android_manifest + variables = [ + "is_component_build=${is_component_build}", + "native_library_name=${_native_library_name}", + "use_native_activity=${_use_native_activity}", + ] + } + } + + android_apk(target_name) { + set_sources_assignment_filter([]) + data_deps = [] + deps = [] + forward_variables_from(invoker, "*") + testonly = true + + assert(!defined(invoker.proguard_enabled) || !invoker.proguard_enabled || + invoker.proguard_configs != []) + + if (!defined(apk_name)) { + apk_name = get_label_info(invoker.shared_library, "name") + } + + if (!defined(android_manifest)) { + android_manifest_dep = ":${target_name}_manifest" + android_manifest = _android_manifest + } + + final_apk_path = "$root_build_dir/${apk_name}_apk/${apk_name}-debug.apk" + + if (!defined(use_default_launcher) || use_default_launcher) { + deps += [ "//testing/android/native_test:native_test_java" ] + } + shared_libraries = [ invoker.shared_library ] + deps += [ + "//base:base_java", + "//testing/android/appurify_support:appurify_support_java", + "//testing/android/reporter:reporter_java", + ] + data_deps += [ + "//build/android/pylib/device/commands", + "//tools/android/md5sum", + ] + if (host_os == "linux") { + data_deps += [ "//tools/android/forwarder2" ] + } + } + } + + # Generate .java files from .aidl files. + # + # This target will store the .java files in a srcjar and should be included in + # an android_library or android_apk's srcjar_deps. + # + # Variables + # sources: Paths to .aidl files to compile. + # import_include: Path to directory containing .java files imported by the + # .aidl files. + # interface_file: Preprocessed aidl file to import. + # + # Example + # android_aidl("foo_aidl") { + # import_include = "java/src" + # sources = [ + # "java/src/com/foo/bar/FooBarService.aidl", + # "java/src/com/foo/bar/FooBarServiceCallback.aidl", + # ] + # } + template("android_aidl") { + set_sources_assignment_filter([]) + forward_variables_from(invoker, [ "testonly" ]) + + srcjar_path = "${target_gen_dir}/${target_name}.srcjar" + aidl_path = "${android_sdk_build_tools}/aidl" + framework_aidl = "$android_sdk/framework.aidl" + + action(target_name) { + script = "//build/android/gyp/aidl.py" + sources = invoker.sources + + imports = [ framework_aidl ] + if (defined(invoker.interface_file)) { + assert(invoker.interface_file != "") + imports += [ invoker.interface_file ] + } + + inputs = [ aidl_path ] + imports + + depfile = "${target_gen_dir}/${target_name}.d" + outputs = [ + srcjar_path, + ] + rebased_imports = rebase_path(imports, root_build_dir) + args = [ + "--depfile", + rebase_path(depfile, root_build_dir), + "--aidl-path", + rebase_path(aidl_path, root_build_dir), + "--imports=$rebased_imports", + "--srcjar", + rebase_path(srcjar_path, root_build_dir), + ] + if (defined(invoker.import_include) && invoker.import_include != "") { + # TODO(cjhopman): aidl supports creating a depfile. We should be able to + # switch to constructing a depfile for the overall action from that + # instead of having all the .java files in the include paths as inputs. + rebased_import_includes = + rebase_path([ invoker.import_include ], root_build_dir) + args += [ "--includes=$rebased_import_includes" ] + + _java_files_build_rel = + exec_script("//build/android/gyp/find.py", + rebase_path([ invoker.import_include ], root_build_dir), + "list lines") + _java_files = rebase_path(_java_files_build_rel, ".", root_build_dir) + inputs += _java_files + } + args += rebase_path(sources, root_build_dir) + } + } + + # Compile a protocol buffer to java. + # + # This generates java files from protocol buffers and creates an Android library + # containing the classes. + # + # Variables + # sources: Paths to .proto files to compile. + # proto_path: Root directory of .proto files. + # + # Example: + # proto_java_library("foo_proto_java") { + # proto_path = "src/foo" + # sources = [ "$proto_path/foo.proto" ] + # } + template("proto_java_library") { + set_sources_assignment_filter([]) + forward_variables_from(invoker, [ "testonly" ]) + _protoc_dep = + "//third_party/android_protobuf:android_protoc($host_toolchain)" + _protoc_out_dir = get_label_info(_protoc_dep, "root_out_dir") + _protoc_bin = "$_protoc_out_dir/android_protoc" + _proto_path = invoker.proto_path + + _template_name = target_name + + action("${_template_name}__protoc_java") { + srcjar_path = "$target_gen_dir/$target_name.srcjar" + script = "//build/protoc_java.py" + + deps = [ + _protoc_dep, + ] + if (defined(invoker.deps)) { + deps += invoker.deps + } + + sources = invoker.sources + depfile = "$target_gen_dir/$target_name.d" + outputs = [ + srcjar_path, + ] + args = [ + "--depfile", + rebase_path(depfile, root_build_dir), + "--protoc", + rebase_path(_protoc_bin, root_build_dir), + "--proto-path", + rebase_path(_proto_path, root_build_dir), + "--srcjar", + rebase_path(srcjar_path, root_build_dir), + ] + rebase_path(sources, root_build_dir) + } + + android_library(target_name) { + chromium_code = false + java_files = [] + srcjar_deps = [ ":${_template_name}__protoc_java" ] + deps = [ + "//third_party/android_protobuf:protobuf_nano_javalib", + ] + } + } + + # Declare an Android library target for a prebuilt AAR. + # + # This target creates an Android library containing java code and Android + # resources. For libraries without resources, it will not generate + # corresponding android_resources targets. + # + # Variables + # aar_path: Path to the AAR. + # proguard_configs: List of proguard configs to use in final apk step for + # any apk that depends on this library. + # ignore_aidl: Whether to ignore .aidl files found with the .aar. + # ignore_assets: Whether to ignore assets found in the .aar. + # ignore_manifest: Whether to ignore merging of AndroidManifest.xml. + # ignore_native_libraries: Whether to ignore .so files found in the .aar. + # TODO(jbudorick@): remove this arguments after crbug.com/522043 is fixed. + # requires_android: Whether this target can only be used for compiling Android related targets. + # + # Example + # android_aar_prebuilt("foo_java") { + # aar_path = "foo.aar" + # } + template("android_aar_prebuilt") { + _output_path = "${target_gen_dir}/${target_name}" + _unpack_target_name = "${target_name}__unpack_aar" + _ignore_aidl = defined(invoker.ignore_aidl) && invoker.ignore_aidl + _ignore_assets = defined(invoker.ignore_assets) && invoker.ignore_assets + _ignore_manifest = + defined(invoker.ignore_manifest) && invoker.ignore_manifest + _ignore_native_libraries = defined(invoker.ignore_native_libraries) && + invoker.ignore_native_libraries + + # Scan the AAR file and determine the resources and jar files. + # Some libraries might not have resources; others might have two jars. + _scanned_files = + exec_script("//build/android/gyp/aar.py", + [ + "--input-file", + rebase_path(invoker.aar_path, root_build_dir), + "--list", + ], + "scope") + + assert(_ignore_aidl || _scanned_files.aidl == [], + "android_aar_prebuilt() aidl not yet supported." + + " Implement or use ignore_aidl = true." + + " http://crbug.com/644439") + assert(_ignore_assets || _scanned_files.assets == [], + "android_aar_prebuilt() assets not yet supported." + + " Implement or use ignore_assets = true." + + " http://crbug.com/643966") + assert(_ignore_native_libraries || !_scanned_files.has_native_libraries, + "android_aar_prebuilt() with .so files is not supported." + + " Use ignore_native_libraries = true to silence this error.") + assert(_ignore_manifest || _scanned_files.is_manifest_empty, + "android_aar_prebuilt() manifest merging not yet supported and" + + " non-trivial AndroidManifest.xml detected." + + " Implement or use ignore_manifest = true." + + " http://crbug.com/643967") + assert(_scanned_files.has_classes_jar || _scanned_files.subjars == []) + + action(_unpack_target_name) { + script = "//build/android/gyp/aar.py" # Unzips the AAR + args = [ + "--input-file", + rebase_path(invoker.aar_path, root_build_dir), + "--output-dir", + rebase_path(_output_path, root_build_dir), + "--extract", + ] + inputs = [ + invoker.aar_path, + ] + outputs = [ + "${_output_path}/AndroidManifest.xml", + ] + + if (_scanned_files.resources != []) { + outputs += [ "${_output_path}/R.txt" ] + outputs += get_path_info( + rebase_path(_scanned_files.resources, "", _output_path), + "abspath") + } + if (_scanned_files.has_classes_jar) { + outputs += [ "${_output_path}/classes.jar" ] + } + outputs += + get_path_info(rebase_path(_scanned_files.subjars, "", _output_path), + "abspath") + if (_scanned_files.has_proguard_flags) { + outputs += [ "${_output_path}/proguard.txt" ] + } + } + + # Create the android_resources target for resources. + if (_scanned_files.resources != []) { + _res_target_name = "${target_name}__res" + android_resources(_res_target_name) { + forward_variables_from(invoker, [ "deps" ]) + if (!defined(deps)) { + deps = [] + } + deps += [ ":$_unpack_target_name" ] + resource_dirs = [] + generated_resource_dirs = [ "${_output_path}/res" ] + generated_resource_files = + rebase_path(_scanned_files.resources, "", _output_path) + android_manifest_dep = ":$_unpack_target_name" + android_manifest = "${_output_path}/AndroidManifest.xml" + v14_skip = true + } + } + + # Create android_java_prebuilt target for extra jars within jars/. + _subjar_targets = [] + foreach(_tuple, _scanned_files.subjar_tuples) { + _current_target = "${target_name}__subjar_${_tuple[0]}" + _subjar_targets += [ ":$_current_target" ] + java_prebuilt(_current_target) { + forward_variables_from(invoker, + [ + "jar_excluded_patterns", + "requires_android", + ]) + deps = [ + ":$_unpack_target_name", + ] + if (!defined(requires_android)) { + requires_android = true + } + supports_android = true + jar_path = "$_output_path/${_tuple[1]}" + _base_output_name = get_path_info(jar_path, "name") + output_name = "${invoker.target_name}-$_base_output_name" + } + } + + # Create android_java_prebuilt target for classes.jar. + if (_scanned_files.has_classes_jar) { + _jar_target_name = "${target_name}__classes" + java_prebuilt(_jar_target_name) { + forward_variables_from(invoker, + [ + "deps", + "input_jars_paths", + "jar_excluded_patterns", + "proguard_configs", + "requires_android", + ]) + if (!defined(deps)) { + deps = [] + } + deps += _subjar_targets + [ ":$_unpack_target_name" ] + if (defined(_res_target_name)) { + deps += [ ":$_res_target_name" ] + } + if (!defined(requires_android)) { + requires_android = true + } + supports_android = true + jar_path = "$_output_path/classes.jar" + output_name = invoker.target_name + + if (_scanned_files.has_proguard_flags) { + if (!defined(proguard_configs)) { + proguard_configs = [] + } + proguard_configs += [ "$_output_path/proguard.txt" ] + } + } + } + + java_group(target_name) { + deps = [] + if (defined(_jar_target_name)) { + deps += [ ":$_jar_target_name" ] + + # Although subjars are meant to be private, we add them as deps here + # because in practice they seem to contain classes required to be in the + # classpath. + deps += _subjar_targets + } + if (defined(_res_target_name)) { + deps += [ ":$_res_target_name" ] + } + } + } +} diff --git a/samples/GN/clang.gni b/samples/GN/clang.gni new file mode 100644 index 0000000000..7026f65207 --- /dev/null +++ b/samples/GN/clang.gni @@ -0,0 +1,13 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/toolchain/toolchain.gni") + +declare_args() { + # Indicates if the build should use the Chrome-specific plugins for enforcing + # coding guidelines, etc. Only used when compiling with Clang. + clang_use_chrome_plugins = is_clang && !is_nacl && !use_xcode_clang + + clang_base_path = "//third_party/llvm-build/Release+Asserts" +} diff --git a/samples/GN/filenames/.gn b/samples/GN/filenames/.gn new file mode 100644 index 0000000000..c80980ea09 --- /dev/null +++ b/samples/GN/filenames/.gn @@ -0,0 +1,25 @@ +# This file is used by the GN meta build system to find the root of the source +# tree and to set startup options. For documentation on the values set in this +# file, run "gn help dotfile" at the command line. + +import("//build/dotfile_settings.gni") + +# The location of the build configuration file. +buildconfig = "//build/config/BUILDCONFIG.gn" + +# The secondary source root is a parallel directory tree where +# GN build files are placed when they can not be placed directly +# in the source tree, e.g. for third party source trees. +secondary_source = "//build/secondary/" + +# These are the targets to check headers for by default. The files in targets +# matching these patterns (see "gn help label_pattern" for format) will have +# their includes checked for proper dependencies when you run either +# "gn check" or "gn gen --check". +check_targets = [] + +# These are the list of GN files that run exec_script. This whitelist exists +# to force additional review for new uses of exec_script, which is strongly +# discouraged except for gypi_to_gn calls. +exec_script_whitelist = + build_dotfile_settings.exec_script_whitelist + [ "//test/test262/BUILD.gn" ] diff --git a/samples/GN/gcc_toolchain.gni b/samples/GN/gcc_toolchain.gni new file mode 100644 index 0000000000..7ee2b6ad25 --- /dev/null +++ b/samples/GN/gcc_toolchain.gni @@ -0,0 +1,503 @@ +# Copyright (c) 2013 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/android/config.gni") +import("//build/config/clang/clang.gni") +import("//build/config/nacl/config.gni") +import("//build/config/sanitizers/sanitizers.gni") +import("//build/config/v8_target_cpu.gni") +import("//build/toolchain/cc_wrapper.gni") +import("//build/toolchain/goma.gni") +import("//build/toolchain/toolchain.gni") + +# This template defines a toolchain for something that works like gcc +# (including clang). +# +# It requires the following variables specifying the executables to run: +# - ar +# - cc +# - cxx +# - ld +# +# Optional parameters that control the tools: +# +# - extra_cflags +# Extra flags to be appended when compiling C files (but not C++ files). +# - extra_cppflags +# Extra flags to be appended when compiling both C and C++ files. "CPP" +# stands for "C PreProcessor" in this context, although it can be +# used for non-preprocessor flags as well. Not to be confused with +# "CXX" (which follows). +# - extra_cxxflags +# Extra flags to be appended when compiling C++ files (but not C files). +# - extra_ldflags +# Extra flags to be appended when linking +# +# - libs_section_prefix +# - libs_section_postfix +# The contents of these strings, if specified, will be placed around +# the libs section of the linker line. It allows one to inject libraries +# at the beginning and end for all targets in a toolchain. +# - solink_libs_section_prefix +# - solink_libs_section_postfix +# Same as libs_section_{pre,post}fix except used for solink instead of link. +# - link_outputs +# The content of this array, if specified, will be added to the list of +# outputs from the link command. This can be useful in conjunction with +# the post_link parameter. +# - post_link +# The content of this string, if specified, will be run as a separate +# command following the the link command. +# - deps +# Just forwarded to the toolchain definition. +# - executable_extension +# If this string is specified it will be used for the file extension +# for an executable, rather than using no extension; targets will +# still be able to override the extension using the output_extension +# variable. +# - rebuild_define +# The contents of this string, if specified, will be passed as a #define +# to the toolchain. It can be used to force recompiles whenever a +# toolchain is updated. +# - shlib_extension +# If this string is specified it will be used for the file extension +# for a shared library, rather than default value specified in +# toolchain.gni +# - strip +# Location of the strip executable. When specified, strip will be run on +# all shared libraries and executables as they are built. The pre-stripped +# artifacts will be put in lib.unstripped/ and exe.unstripped/. +template("gcc_toolchain") { + toolchain(target_name) { + assert(defined(invoker.ar), "gcc_toolchain() must specify a \"ar\" value") + assert(defined(invoker.cc), "gcc_toolchain() must specify a \"cc\" value") + assert(defined(invoker.cxx), "gcc_toolchain() must specify a \"cxx\" value") + assert(defined(invoker.ld), "gcc_toolchain() must specify a \"ld\" value") + + # This define changes when the toolchain changes, forcing a rebuild. + # Nothing should ever use this define. + if (defined(invoker.rebuild_define)) { + rebuild_string = "-D" + invoker.rebuild_define + " " + } else { + rebuild_string = "" + } + + # GN's syntax can't handle more than one scope dereference at once, like + # "invoker.toolchain_args.foo", so make a temporary to hold the toolchain + # args so we can do "invoker_toolchain_args.foo". + assert(defined(invoker.toolchain_args), + "Toolchains must specify toolchain_args") + invoker_toolchain_args = invoker.toolchain_args + assert(defined(invoker_toolchain_args.current_cpu), + "toolchain_args must specify a current_cpu") + assert(defined(invoker_toolchain_args.current_os), + "toolchain_args must specify a current_os") + + # When invoking this toolchain not as the default one, these args will be + # passed to the build. They are ignored when this is the default toolchain. + toolchain_args = { + # Populate toolchain args from the invoker. + forward_variables_from(invoker_toolchain_args, "*") + + # The host toolchain value computed by the default toolchain's setup + # needs to be passed through unchanged to all secondary toolchains to + # ensure that it's always the same, regardless of the values that may be + # set on those toolchains. + host_toolchain = host_toolchain + + if (!defined(invoker_toolchain_args.v8_current_cpu)) { + v8_current_cpu = invoker_toolchain_args.current_cpu + } + } + + # When the invoker has explicitly overridden use_goma or cc_wrapper in the + # toolchain args, use those values, otherwise default to the global one. + # This works because the only reasonable override that toolchains might + # supply for these values are to force-disable them. + if (defined(toolchain_args.use_goma)) { + toolchain_uses_goma = toolchain_args.use_goma + } else { + toolchain_uses_goma = use_goma + } + if (defined(toolchain_args.cc_wrapper)) { + toolchain_cc_wrapper = toolchain_args.cc_wrapper + } else { + toolchain_cc_wrapper = cc_wrapper + } + + # Compute the compiler prefix. + if (toolchain_uses_goma) { + assert(toolchain_cc_wrapper == "", + "Goma and cc_wrapper can't be used together.") + compiler_prefix = "$goma_dir/gomacc " + } else if (toolchain_cc_wrapper != "") { + compiler_prefix = toolchain_cc_wrapper + " " + } else { + compiler_prefix = "" + } + + cc = compiler_prefix + invoker.cc + cxx = compiler_prefix + invoker.cxx + ar = invoker.ar + ld = invoker.ld + if (defined(invoker.readelf)) { + readelf = invoker.readelf + } else { + readelf = "readelf" + } + if (defined(invoker.nm)) { + nm = invoker.nm + } else { + nm = "nm" + } + + if (defined(invoker.shlib_extension)) { + default_shlib_extension = invoker.shlib_extension + } else { + default_shlib_extension = shlib_extension + } + + if (defined(invoker.executable_extension)) { + default_executable_extension = invoker.executable_extension + } else { + default_executable_extension = "" + } + + # Bring these into our scope for string interpolation with default values. + if (defined(invoker.libs_section_prefix)) { + libs_section_prefix = invoker.libs_section_prefix + } else { + libs_section_prefix = "" + } + + if (defined(invoker.libs_section_postfix)) { + libs_section_postfix = invoker.libs_section_postfix + } else { + libs_section_postfix = "" + } + + if (defined(invoker.solink_libs_section_prefix)) { + solink_libs_section_prefix = invoker.solink_libs_section_prefix + } else { + solink_libs_section_prefix = "" + } + + if (defined(invoker.solink_libs_section_postfix)) { + solink_libs_section_postfix = invoker.solink_libs_section_postfix + } else { + solink_libs_section_postfix = "" + } + + if (defined(invoker.extra_cflags) && invoker.extra_cflags != "") { + extra_cflags = " " + invoker.extra_cflags + } else { + extra_cflags = "" + } + + if (defined(invoker.extra_cppflags) && invoker.extra_cppflags != "") { + extra_cppflags = " " + invoker.extra_cppflags + } else { + extra_cppflags = "" + } + + if (defined(invoker.extra_cxxflags) && invoker.extra_cxxflags != "") { + extra_cxxflags = " " + invoker.extra_cxxflags + } else { + extra_cxxflags = "" + } + + if (defined(invoker.extra_ldflags) && invoker.extra_ldflags != "") { + extra_ldflags = " " + invoker.extra_ldflags + } else { + extra_ldflags = "" + } + + # These library switches can apply to all tools below. + lib_switch = "-l" + lib_dir_switch = "-L" + + # Object files go in this directory. + object_subdir = "{{target_out_dir}}/{{label_name}}" + + tool("cc") { + depfile = "{{output}}.d" + command = "$cc -MMD -MF $depfile ${rebuild_string}{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}}${extra_cppflags}${extra_cflags} -c {{source}} -o {{output}}" + depsformat = "gcc" + description = "CC {{output}}" + outputs = [ + # The whitelist file is also an output, but ninja does not + # currently support multiple outputs for tool("cc"). + "$object_subdir/{{source_name_part}}.o", + ] + if (enable_resource_whitelist_generation) { + compile_wrapper = + rebase_path("//build/toolchain/gcc_compile_wrapper.py", + root_build_dir) + command = "$python_path \"$compile_wrapper\" --resource-whitelist=\"{{output}}.whitelist\" $command" + } + } + + tool("cxx") { + depfile = "{{output}}.d" + command = "$cxx -MMD -MF $depfile ${rebuild_string}{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}}${extra_cppflags}${extra_cxxflags} -c {{source}} -o {{output}}" + depsformat = "gcc" + description = "CXX {{output}}" + outputs = [ + # The whitelist file is also an output, but ninja does not + # currently support multiple outputs for tool("cxx"). + "$object_subdir/{{source_name_part}}.o", + ] + if (enable_resource_whitelist_generation) { + compile_wrapper = + rebase_path("//build/toolchain/gcc_compile_wrapper.py", + root_build_dir) + command = "$python_path \"$compile_wrapper\" --resource-whitelist=\"{{output}}.whitelist\" $command" + } + } + + tool("asm") { + # For GCC we can just use the C compiler to compile assembly. + depfile = "{{output}}.d" + command = "$cc -MMD -MF $depfile ${rebuild_string}{{defines}} {{include_dirs}} {{asmflags}} -c {{source}} -o {{output}}" + depsformat = "gcc" + description = "ASM {{output}}" + outputs = [ + "$object_subdir/{{source_name_part}}.o", + ] + } + + tool("alink") { + rspfile = "{{output}}.rsp" + whitelist_flag = " " + if (enable_resource_whitelist_generation) { + whitelist_flag = " --resource-whitelist=\"{{output}}.whitelist\"" + } + + # This needs a Python script to avoid using simple sh features in this + # command, in case the host does not use a POSIX shell (e.g. compiling + # POSIX-like toolchains such as NaCl on Windows). + ar_wrapper = + rebase_path("//build/toolchain/gcc_ar_wrapper.py", root_build_dir) + command = "$python_path \"$ar_wrapper\"$whitelist_flag --output={{output}} --ar=\"$ar\" {{arflags}} rcsD @\"$rspfile\"" + description = "AR {{output}}" + rspfile_content = "{{inputs}}" + outputs = [ + "{{output_dir}}/{{target_output_name}}{{output_extension}}", + ] + + # Shared libraries go in the target out directory by default so we can + # generate different targets with the same name and not have them collide. + default_output_dir = "{{target_out_dir}}" + default_output_extension = ".a" + output_prefix = "lib" + } + + tool("solink") { + soname = "{{target_output_name}}{{output_extension}}" # e.g. "libfoo.so". + sofile = "{{output_dir}}/$soname" # Possibly including toolchain dir. + rspfile = sofile + ".rsp" + pool = "//build/toolchain:link_pool($default_toolchain)" + whitelist_flag = " " + if (enable_resource_whitelist_generation) { + whitelist_file = "$sofile.whitelist" + whitelist_flag = " --resource-whitelist=\"$whitelist_file\"" + } + + if (defined(invoker.strip)) { + unstripped_sofile = "{{root_out_dir}}/lib.unstripped/$soname" + } else { + unstripped_sofile = sofile + } + + # These variables are not built into GN but are helpers that + # implement (1) linking to produce a .so, (2) extracting the symbols + # from that file (3) if the extracted list differs from the existing + # .TOC file, overwrite it, otherwise, don't change it. + tocfile = sofile + ".TOC" + + link_command = "$ld -shared {{ldflags}}${extra_ldflags} -o \"$unstripped_sofile\" -Wl,-soname=\"$soname\" @\"$rspfile\"" + + assert(defined(readelf), "to solink you must have a readelf") + assert(defined(nm), "to solink you must have an nm") + strip_switch = "" + if (defined(invoker.strip)) { + strip_switch = "--strip=${invoker.strip}" + } + + # This needs a Python script to avoid using a complex shell command + # requiring sh control structures, pipelines, and POSIX utilities. + # The host might not have a POSIX shell and utilities (e.g. Windows). + solink_wrapper = rebase_path("//build/toolchain/gcc_solink_wrapper.py") + command = "$python_path \"$solink_wrapper\" --readelf=\"$readelf\" --nm=\"$nm\" $strip_switch --sofile=\"$unstripped_sofile\" --tocfile=\"$tocfile\" --output=\"$sofile\"$whitelist_flag -- $link_command" + + rspfile_content = "-Wl,--whole-archive {{inputs}} {{solibs}} -Wl,--no-whole-archive $solink_libs_section_prefix {{libs}} $solink_libs_section_postfix" + + description = "SOLINK $sofile" + + # Use this for {{output_extension}} expansions unless a target manually + # overrides it (in which case {{output_extension}} will be what the target + # specifies). + default_output_extension = default_shlib_extension + + default_output_dir = "{{root_out_dir}}" + if (shlib_subdir != ".") { + default_output_dir += "/$shlib_subdir" + } + + output_prefix = "lib" + + # Since the above commands only updates the .TOC file when it changes, ask + # Ninja to check if the timestamp actually changed to know if downstream + # dependencies should be recompiled. + restat = true + + # Tell GN about the output files. It will link to the sofile but use the + # tocfile for dependency management. + outputs = [ + sofile, + tocfile, + ] + if (enable_resource_whitelist_generation) { + outputs += [ whitelist_file ] + } + if (sofile != unstripped_sofile) { + outputs += [ unstripped_sofile ] + } + link_output = sofile + depend_output = tocfile + } + + tool("solink_module") { + soname = "{{target_output_name}}{{output_extension}}" # e.g. "libfoo.so". + sofile = "{{output_dir}}/$soname" + rspfile = sofile + ".rsp" + pool = "//build/toolchain:link_pool($default_toolchain)" + + if (defined(invoker.strip)) { + unstripped_sofile = "{{root_out_dir}}/lib.unstripped/$soname" + } else { + unstripped_sofile = sofile + } + + command = "$ld -shared {{ldflags}}${extra_ldflags} -o \"$unstripped_sofile\" -Wl,-soname=\"$soname\" @\"$rspfile\"" + + if (defined(invoker.strip)) { + strip_command = "${invoker.strip} --strip-unneeded -o \"$sofile\" \"$unstripped_sofile\"" + command += " && " + strip_command + } + rspfile_content = "-Wl,--whole-archive {{inputs}} {{solibs}} -Wl,--no-whole-archive $solink_libs_section_prefix {{libs}} $solink_libs_section_postfix" + + description = "SOLINK_MODULE $sofile" + + # Use this for {{output_extension}} expansions unless a target manually + # overrides it (in which case {{output_extension}} will be what the target + # specifies). + if (defined(invoker.loadable_module_extension)) { + default_output_extension = invoker.loadable_module_extension + } else { + default_output_extension = default_shlib_extension + } + + default_output_dir = "{{root_out_dir}}" + if (shlib_subdir != ".") { + default_output_dir += "/$shlib_subdir" + } + + output_prefix = "lib" + + outputs = [ + sofile, + ] + if (sofile != unstripped_sofile) { + outputs += [ unstripped_sofile ] + } + } + + tool("link") { + exename = "{{target_output_name}}{{output_extension}}" + outfile = "{{output_dir}}/$exename" + rspfile = "$outfile.rsp" + unstripped_outfile = outfile + pool = "//build/toolchain:link_pool($default_toolchain)" + + # Use this for {{output_extension}} expansions unless a target manually + # overrides it (in which case {{output_extension}} will be what the target + # specifies). + default_output_extension = default_executable_extension + + default_output_dir = "{{root_out_dir}}" + + if (defined(invoker.strip)) { + unstripped_outfile = "{{root_out_dir}}/exe.unstripped/$exename" + } + + command = "$ld {{ldflags}}${extra_ldflags} -o \"$unstripped_outfile\" -Wl,--start-group @\"$rspfile\" {{solibs}} -Wl,--end-group $libs_section_prefix {{libs}} $libs_section_postfix" + if (defined(invoker.strip)) { + link_wrapper = + rebase_path("//build/toolchain/gcc_link_wrapper.py", root_build_dir) + command = "$python_path \"$link_wrapper\" --strip=\"${invoker.strip}\" --unstripped-file=\"$unstripped_outfile\" --output=\"$outfile\" -- $command" + } + description = "LINK $outfile" + rspfile_content = "{{inputs}}" + outputs = [ + outfile, + ] + if (outfile != unstripped_outfile) { + outputs += [ unstripped_outfile ] + } + if (defined(invoker.link_outputs)) { + outputs += invoker.link_outputs + } + } + + # These two are really entirely generic, but have to be repeated in + # each toolchain because GN doesn't allow a template to be used here. + # See //build/toolchain/toolchain.gni for details. + tool("stamp") { + command = stamp_command + description = stamp_description + } + tool("copy") { + command = copy_command + description = copy_description + } + + forward_variables_from(invoker, [ "deps" ]) + } +} + +# This is a shorthand for gcc_toolchain instances based on the Chromium-built +# version of Clang. Only the toolchain_cpu and toolchain_os variables need to +# be specified by the invoker, and optionally toolprefix if it's a +# cross-compile case. Note that for a cross-compile case this toolchain +# requires a config to pass the appropriate -target option, or else it will +# actually just be doing a native compile. The invoker can optionally override +# use_gold too. +template("clang_toolchain") { + if (defined(invoker.toolprefix)) { + toolprefix = invoker.toolprefix + } else { + toolprefix = "" + } + + gcc_toolchain(target_name) { + prefix = rebase_path("$clang_base_path/bin", root_build_dir) + cc = "$prefix/clang" + cxx = "$prefix/clang++" + ld = cxx + + readelf = "${toolprefix}readelf" + ar = "${toolprefix}ar" + nm = "${toolprefix}nm" + + forward_variables_from(invoker, [ "strip" ]) + + toolchain_args = { + if (defined(invoker.toolchain_args)) { + forward_variables_from(invoker.toolchain_args, "*") + } + is_clang = true + } + } +} diff --git a/samples/GN/icu.gn b/samples/GN/icu.gn new file mode 100644 index 0000000000..f3734b7a01 --- /dev/null +++ b/samples/GN/icu.gn @@ -0,0 +1,235 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/linux/pkg_config.gni") +import("//build/shim_headers.gni") + +group("icu") { + public_deps = [ + ":icui18n", + ":icuuc", + ] +} + +config("icu_config") { + defines = [ + "USING_SYSTEM_ICU=1", + "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC", + ] +} + +pkg_config("system_icui18n") { + packages = [ "icu-i18n" ] +} + +pkg_config("system_icuuc") { + packages = [ "icu-uc" ] +} + +source_set("icui18n") { + deps = [ + ":icui18n_shim", + ] + public_configs = [ + ":icu_config", + ":system_icui18n", + ] +} + +source_set("icuuc") { + deps = [ + ":icuuc_shim", + ] + public_configs = [ + ":icu_config", + ":system_icuuc", + ] +} + +shim_headers("icui18n_shim") { + root_path = "source/i18n" + headers = [ + # This list can easily be updated using the command below: + # find third_party/icu/source/i18n/unicode \ + # -iname '*.h' -printf '"%p",\n' | \ + # sed -e 's|third_party/icu/i18n/common/||' | sort -u + "unicode/alphaindex.h", + "unicode/basictz.h", + "unicode/calendar.h", + "unicode/choicfmt.h", + "unicode/coleitr.h", + "unicode/coll.h", + "unicode/compactdecimalformat.h", + "unicode/curramt.h", + "unicode/currpinf.h", + "unicode/currunit.h", + "unicode/datefmt.h", + "unicode/dcfmtsym.h", + "unicode/decimfmt.h", + "unicode/dtfmtsym.h", + "unicode/dtitvfmt.h", + "unicode/dtitvinf.h", + "unicode/dtptngen.h", + "unicode/dtrule.h", + "unicode/fieldpos.h", + "unicode/fmtable.h", + "unicode/format.h", + "unicode/fpositer.h", + "unicode/gender.h", + "unicode/gregocal.h", + "unicode/locdspnm.h", + "unicode/measfmt.h", + "unicode/measunit.h", + "unicode/measure.h", + "unicode/msgfmt.h", + "unicode/numfmt.h", + "unicode/numsys.h", + "unicode/plurfmt.h", + "unicode/plurrule.h", + "unicode/rbnf.h", + "unicode/rbtz.h", + "unicode/regex.h", + "unicode/region.h", + "unicode/reldatefmt.h", + "unicode/scientificnumberformatter.h", + "unicode/search.h", + "unicode/selfmt.h", + "unicode/simpletz.h", + "unicode/smpdtfmt.h", + "unicode/sortkey.h", + "unicode/stsearch.h", + "unicode/tblcoll.h", + "unicode/timezone.h", + "unicode/tmunit.h", + "unicode/tmutamt.h", + "unicode/tmutfmt.h", + "unicode/translit.h", + "unicode/tzfmt.h", + "unicode/tznames.h", + "unicode/tzrule.h", + "unicode/tztrans.h", + "unicode/ucal.h", + "unicode/ucol.h", + "unicode/ucoleitr.h", + "unicode/ucsdet.h", + "unicode/ucurr.h", + "unicode/udat.h", + "unicode/udateintervalformat.h", + "unicode/udatpg.h", + "unicode/udisplaycontext.h", + "unicode/ufieldpositer.h", + "unicode/uformattable.h", + "unicode/ugender.h", + "unicode/uldnames.h", + "unicode/ulocdata.h", + "unicode/umsg.h", + "unicode/unirepl.h", + "unicode/unum.h", + "unicode/unumsys.h", + "unicode/upluralrules.h", + "unicode/uregex.h", + "unicode/uregion.h", + "unicode/usearch.h", + "unicode/uspoof.h", + "unicode/utmscale.h", + "unicode/utrans.h", + "unicode/vtzone.h", + ] +} + +shim_headers("icuuc_shim") { + root_path = "source/common" + headers = [ + # This list can easily be updated using the command below: + # find third_party/icu/source/common/unicode \ + # -iname '*.h' -printf '"%p",\n' | \ + # sed -e 's|third_party/icu/source/common/||' | sort -u + "unicode/appendable.h", + "unicode/brkiter.h", + "unicode/bytestream.h", + "unicode/bytestrie.h", + "unicode/bytestriebuilder.h", + "unicode/caniter.h", + "unicode/chariter.h", + "unicode/dbbi.h", + "unicode/docmain.h", + "unicode/dtintrv.h", + "unicode/enumset.h", + "unicode/errorcode.h", + "unicode/filteredbrk.h", + "unicode/icudataver.h", + "unicode/icuplug.h", + "unicode/idna.h", + "unicode/listformatter.h", + "unicode/localpointer.h", + "unicode/locid.h", + "unicode/messagepattern.h", + "unicode/normalizer2.h", + "unicode/normlzr.h", + "unicode/parseerr.h", + "unicode/parsepos.h", + "unicode/platform.h", + "unicode/ptypes.h", + "unicode/putil.h", + "unicode/rbbi.h", + "unicode/rep.h", + "unicode/resbund.h", + "unicode/schriter.h", + "unicode/std_string.h", + "unicode/strenum.h", + "unicode/stringpiece.h", + "unicode/stringtriebuilder.h", + "unicode/symtable.h", + "unicode/ubidi.h", + "unicode/ubrk.h", + "unicode/ucasemap.h", + "unicode/ucat.h", + "unicode/uchar.h", + "unicode/ucharstrie.h", + "unicode/ucharstriebuilder.h", + "unicode/uchriter.h", + "unicode/uclean.h", + "unicode/ucnv.h", + "unicode/ucnv_cb.h", + "unicode/ucnv_err.h", + "unicode/ucnvsel.h", + "unicode/uconfig.h", + "unicode/udata.h", + "unicode/uenum.h", + "unicode/uidna.h", + "unicode/uiter.h", + "unicode/ulistformatter.h", + "unicode/uloc.h", + "unicode/umachine.h", + "unicode/umisc.h", + "unicode/unifilt.h", + "unicode/unifunct.h", + "unicode/unimatch.h", + "unicode/uniset.h", + "unicode/unistr.h", + "unicode/unorm.h", + "unicode/unorm2.h", + "unicode/uobject.h", + "unicode/urename.h", + "unicode/urep.h", + "unicode/ures.h", + "unicode/uscript.h", + "unicode/uset.h", + "unicode/usetiter.h", + "unicode/ushape.h", + "unicode/usprep.h", + "unicode/ustring.h", + "unicode/ustringtrie.h", + "unicode/utext.h", + "unicode/utf.h", + "unicode/utf16.h", + "unicode/utf32.h", + "unicode/utf8.h", + "unicode/utf_old.h", + "unicode/utrace.h", + "unicode/utypes.h", + "unicode/uvernum.h", + "unicode/uversion.h", + ] +} diff --git a/samples/GN/internal_rules.gni b/samples/GN/internal_rules.gni new file mode 100644 index 0000000000..27b736f36a --- /dev/null +++ b/samples/GN/internal_rules.gni @@ -0,0 +1,2788 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Do not add any imports to non-//build directories here. +# Some projects (e.g. V8) do not have non-build directories DEPS'ed in. +import("//build_overrides/build.gni") +import("//build/config/android/config.gni") +import("//build/config/dcheck_always_on.gni") +import("//build/config/sanitizers/sanitizers.gni") + +assert(is_android) + +# These identify targets that have .build_config files (except for android_apk, +# java_binary, resource_rewriter, since we never need to depend on these). +_java_target_whitelist = [ + "*:*_java", + "*:*_javalib", + "*:*_java_*", # e.g. java_test_support + "*:java", + "*:junit", + "*:junit_*", + "*:*_junit_*", + "*:*javatests", + "*:*_assets", + "*android*:assets", + "*:*_apk_*resources", + "*android*:resources", + "*:*_resources", + "*:*_grd", + "*:*locale_paks", + + # TODO(agrieve): Rename targets below to match above patterns. + "*android_webview/glue:glue", + "//build/android/rezip:rezip", + "//chrome/test/android/cast_emulator:cast_emulator", +] + +# Targets that match the whitelist but are not actually java targets. +_java_target_blacklist = [ + "//chrome:packed_resources", + "//remoting/android:remoting_android_raw_resources", + "*:*_unpack_aar", +] + +# Write the target's .build_config file. This is a json file that contains a +# dictionary of information about how to build this target (things that +# require knowledge about this target's dependencies and cannot be calculated +# at gn-time). There is a special syntax to add a value in that dictionary to +# an action/action_foreachs args: +# --python-arg=@FileArg($rebased_build_config_path:key0:key1) +# At runtime, such an arg will be replaced by the value in the build_config. +# See build/android/gyp/write_build_config.py and +# build/android/gyp/util/build_utils.py:ExpandFileArgs +template("write_build_config") { + type = invoker.type + _is_prebuilt_binary = + defined(invoker.is_prebuilt_binary) && invoker.is_prebuilt_binary + + # Don't need to enforce naming scheme for these targets since we never + # consider them in dependency chains. + if (!_is_prebuilt_binary && type != "android_apk" && type != "java_binary" && + type != "resource_rewriter") { + set_sources_assignment_filter(_java_target_whitelist) + _parent_invoker = invoker.invoker + _target_label = + get_label_info(":${_parent_invoker.target_name}", "label_no_toolchain") + sources = [ + _target_label, + ] + if (sources != []) { + set_sources_assignment_filter(_java_target_blacklist) + sources = [] + sources = [ + _target_label, + ] + if (sources != []) { + assert(false, "Invalid java target name: $_target_label") + } + } + sources = [] + } + + action(target_name) { + set_sources_assignment_filter([]) + build_config = invoker.build_config + + assert(type == "android_apk" || type == "java_library" || + type == "android_resources" || type == "deps_dex" || + type == "android_assets" || type == "resource_rewriter" || + type == "java_binary" || type == "group" || type == "java_prebuilt") + + forward_variables_from(invoker, + [ + "deps", + "testonly", + ]) + if (!defined(deps)) { + deps = [] + } + + script = "//build/android/gyp/write_build_config.py" + depfile = "$target_gen_dir/$target_name.d" + inputs = [] + + _deps_configs = [] + if (defined(invoker.possible_config_deps)) { + foreach(_possible_dep, invoker.possible_config_deps) { + set_sources_assignment_filter(_java_target_whitelist) + _target_label = get_label_info(_possible_dep, "label_no_toolchain") + sources = [ + _target_label, + ] + if (sources == []) { + set_sources_assignment_filter(_java_target_blacklist) + sources = [] + sources = [ + _target_label, + ] + if (sources != []) { + deps += [ "${_target_label}__build_config" ] + _dep_gen_dir = get_label_info(_possible_dep, "target_gen_dir") + _dep_name = get_label_info(_possible_dep, "name") + _deps_configs += [ "$_dep_gen_dir/$_dep_name.build_config" ] + } + } + sources = [] + } + set_sources_assignment_filter([]) + } + _rebased_deps_configs = rebase_path(_deps_configs, root_build_dir) + + outputs = [ + build_config, + ] + + args = [ + "--type", + type, + "--depfile", + rebase_path(depfile, root_build_dir), + "--deps-configs=$_rebased_deps_configs", + "--build-config", + rebase_path(build_config, root_build_dir), + ] + + is_java = type == "java_library" || type == "java_binary" || + type == "java_prebuilt" + is_apk = type == "android_apk" + is_android_assets = type == "android_assets" + is_android_resources = type == "android_resources" + is_deps_dex = type == "deps_dex" + is_group = type == "group" + + supports_android = is_apk || is_android_assets || is_android_resources || + is_deps_dex || is_group || + (is_java && defined(invoker.supports_android) && + invoker.supports_android) + requires_android = + is_apk || is_android_assets || is_android_resources || is_deps_dex || + (is_java && defined(invoker.requires_android) && + invoker.requires_android) + + assert(!requires_android || supports_android, + "requires_android requires" + " supports_android") + + # Mark these variables as used. + assert(is_java || true) + assert(is_apk || true) + assert(is_android_resources || true) + assert(is_deps_dex || true) + assert(is_group || true) + + if (is_java || is_apk) { + args += [ + "--jar-path", + rebase_path(invoker.jar_path, root_build_dir), + ] + } + + if (is_apk || is_deps_dex || (is_java && supports_android)) { + args += [ + "--dex-path", + rebase_path(invoker.dex_path, root_build_dir), + ] + } + if (supports_android) { + args += [ "--supports-android" ] + } + if (requires_android) { + args += [ "--requires-android" ] + } + if (defined(invoker.bypass_platform_checks) && + invoker.bypass_platform_checks) { + args += [ "--bypass-platform-checks" ] + } + + if (defined(invoker.apk_under_test)) { + deps += [ "${invoker.apk_under_test}__build_config" ] + apk_under_test_gen_dir = + get_label_info(invoker.apk_under_test, "target_gen_dir") + apk_under_test_name = get_label_info(invoker.apk_under_test, "name") + apk_under_test_config = + "$apk_under_test_gen_dir/$apk_under_test_name.build_config" + args += [ + "--tested-apk-config", + rebase_path(apk_under_test_config, root_build_dir), + ] + } + + if (is_android_assets) { + if (defined(invoker.asset_sources)) { + _rebased_asset_sources = + rebase_path(invoker.asset_sources, root_build_dir) + args += [ "--asset-sources=$_rebased_asset_sources" ] + } + if (defined(invoker.asset_renaming_sources)) { + _rebased_asset_renaming_sources = + rebase_path(invoker.asset_renaming_sources, root_build_dir) + args += [ "--asset-renaming-sources=$_rebased_asset_renaming_sources" ] + + # These are zip paths, so no need to rebase. + args += [ "--asset-renaming-destinations=${invoker.asset_renaming_destinations}" ] + } + if (defined(invoker.disable_compression) && invoker.disable_compression) { + args += [ "--disable-asset-compression" ] + } + } + + if (is_android_resources || is_apk) { + assert(defined(invoker.resources_zip)) + args += [ + "--resources-zip", + rebase_path(invoker.resources_zip, root_build_dir), + ] + if (defined(invoker.android_manifest)) { + inputs += [ invoker.android_manifest ] + args += [ + "--android-manifest", + rebase_path(invoker.android_manifest, root_build_dir), + ] + } else { + assert(!is_apk, "apk build configs require an android_manifest") + } + if (defined(invoker.custom_package)) { + args += [ + "--package-name", + invoker.custom_package, + ] + } + if (defined(invoker.r_text)) { + args += [ + "--r-text", + rebase_path(invoker.r_text, root_build_dir), + ] + } + } + + if (is_android_resources && defined(invoker.resource_dirs)) { + resource_dirs = rebase_path(invoker.resource_dirs, root_build_dir) + args += [ "--resource-dirs=$resource_dirs" ] + } + + if (is_apk) { + if (defined(invoker.shared_libraries_runtime_deps_file)) { + # Don't list shared_libraries_runtime_deps_file as an input in order to + # avoid having to depend on the runtime_deps target. See comment in + # rules.gni for why we do this. + args += [ + "--shared-libraries-runtime-deps", + rebase_path(invoker.shared_libraries_runtime_deps_file, + root_build_dir), + ] + } + + if (defined(invoker.secondary_abi_shared_libraries_runtime_deps_file)) { + # Don't list secondary_abi_shared_libraries_runtime_deps_file as an + # input in order to avoid having to depend on the runtime_deps target. + # See comment in rules.gni for why we do this. + args += [ + "--secondary-abi-shared-libraries-runtime-deps", + rebase_path(invoker.secondary_abi_shared_libraries_runtime_deps_file, + root_build_dir), + ] + } + + if (defined(invoker.proguard_enabled) && invoker.proguard_enabled) { + args += [ + "--proguard-enabled", + "--proguard-info", + rebase_path(invoker.proguard_info, root_build_dir), + ] + } + + if (defined(invoker.apk_path)) { + _rebased_apk_path = rebase_path(invoker.apk_path, root_build_dir) + _rebased_incremental_apk_path = + rebase_path(invoker.incremental_apk_path, root_build_dir) + _rebased_incremental_install_script_path = + rebase_path(invoker.incremental_install_script_path, root_build_dir) + args += [ "--apk-path=$_rebased_apk_path" ] + args += [ "--incremental-apk-path=$_rebased_incremental_apk_path" ] + args += [ "--incremental-install-script-path=$_rebased_incremental_install_script_path" ] + } + } + + if (defined(invoker.java_sources_file)) { + args += [ + "--java-sources-file", + rebase_path(invoker.java_sources_file, root_build_dir), + ] + } + if (defined(invoker.srcjar)) { + args += [ + "--srcjar", + rebase_path(invoker.srcjar, root_build_dir), + ] + } + if (defined(invoker.bundled_srcjars)) { + _rebased_bundled_srcjars = + rebase_path(invoker.bundled_srcjars, root_build_dir) + args += [ "--bundled-srcjars=$_rebased_bundled_srcjars" ] + } + if (defined(invoker.input_jars_paths)) { + _rebased_input_jars_paths = + rebase_path(invoker.input_jars_paths, root_build_dir) + args += [ "--extra-classpath-jars=$_rebased_input_jars_paths" ] + } + if (defined(invoker.proguard_configs)) { + _rebased_proguard_configs = + rebase_path(invoker.proguard_configs, root_build_dir) + args += [ "--proguard-configs=$_rebased_proguard_configs" ] + } + if (defined(invoker.gradle_treat_as_prebuilt) && + invoker.gradle_treat_as_prebuilt) { + args += [ "--gradle-treat-as-prebuilt" ] + } + if (defined(invoker.main_class)) { + args += [ + "--main-class", + invoker.main_class, + ] + } + if (current_toolchain != default_toolchain) { + # This has to be a built-time error rather than a GN assert because many + # packages have a mix of java and non-java targets. For example, the + # following would fail even though nothing depends on :bar(//baz): + # + # shared_library("foo") { + # } + # + # android_library("bar") { + # deps = [ ":foo(//baz)" ] + # assert(current_toolchain == default_toolchain) + # } + _msg = [ + "Tried to build an Android target in a non-default toolchain.", + "target: " + get_label_info(":$target_name", "label_with_toolchain"), + "default_toolchain: $default_toolchain", + ] + args += [ "--fail=$_msg" ] + } + } +} + +template("copy_ex") { + set_sources_assignment_filter([]) + action(target_name) { + forward_variables_from(invoker, + [ + "data", + "deps", + "inputs", + "sources", + "testonly", + "visibility", + ]) + if (!defined(sources)) { + sources = [] + } + script = "//build/android/gyp/copy_ex.py" + depfile = "$target_gen_dir/$target_name.d" + + _stamp_file = "$target_gen_dir/$target_name.stamp" + outputs = [ + _stamp_file, + ] + + args = [ + "--depfile", + rebase_path(depfile, root_build_dir), + "--stamp", + rebase_path(_stamp_file, root_build_dir), + "--dest", + rebase_path(invoker.dest, root_build_dir), + ] + rebased_sources = rebase_path(sources, root_build_dir) + args += [ "--files=$rebased_sources" ] + + if (defined(invoker.clear_dir) && invoker.clear_dir) { + args += [ "--clear" ] + } + + if (defined(invoker.args)) { + args += invoker.args + } + + if (defined(invoker.renaming_sources) && + defined(invoker.renaming_destinations)) { + sources += invoker.renaming_sources + rebased_renaming_sources = + rebase_path(invoker.renaming_sources, root_build_dir) + args += [ "--renaming-sources=$rebased_renaming_sources" ] + + renaming_destinations = invoker.renaming_destinations + args += [ "--renaming-destinations=$renaming_destinations" ] + } + } +} + +# Generates a script in the build bin directory which runs the test +# target using the test runner script in build/android/test_runner.py. +template("test_runner_script") { + testonly = true + _test_name = invoker.test_name + _test_type = invoker.test_type + _incremental_install = + defined(invoker.incremental_install) && invoker.incremental_install + + _runtime_deps = + !defined(invoker.ignore_all_data_deps) || !invoker.ignore_all_data_deps + + if (_runtime_deps) { + # This runtime_deps file is used at runtime and thus cannot go in + # target_gen_dir. + _target_dir_name = get_label_info(":$target_name", "dir") + _runtime_deps_file = + "$root_out_dir/gen.runtime/$_target_dir_name/$target_name.runtime_deps" + _runtime_deps_target = "${target_name}__write_deps" + group(_runtime_deps_target) { + forward_variables_from(invoker, + [ + "data", + "data_deps", + "deps", + "public_deps", + ]) + write_runtime_deps = _runtime_deps_file + } + } + + action(target_name) { + forward_variables_from(invoker, + [ + "data_deps", + "deps", + ]) + if (!defined(deps)) { + deps = [] + } + if (!defined(data_deps)) { + data_deps = [] + } + + script = "//build/android/gyp/create_test_runner_script.py" + depfile = "$target_gen_dir/$target_name.d" + + data_deps += [ "//build/android:test_runner_py" ] + data = [] + + test_runner_args = [ + _test_type, + "--output-directory", + rebase_path(root_build_dir, root_build_dir), + ] + + if (_runtime_deps) { + deps += [ ":$_runtime_deps_target" ] + data += [ _runtime_deps_file ] + test_runner_args += [ + "--runtime-deps-path", + rebase_path(_runtime_deps_file, root_build_dir), + ] + } + + # apk_target is not used for native executable tests + # (e.g. breakpad_unittests). + if (defined(invoker.apk_target)) { + assert(!defined(invoker.executable_dist_dir)) + deps += [ "${invoker.apk_target}__build_config" ] + _apk_build_config = + get_label_info(invoker.apk_target, "target_gen_dir") + "/" + + get_label_info(invoker.apk_target, "name") + ".build_config" + _rebased_apk_build_config = rebase_path(_apk_build_config, root_build_dir) + assert(_rebased_apk_build_config != "") # Mark as used. + } else if (_test_type == "gtest") { + assert( + defined(invoker.executable_dist_dir), + "Must define either apk_target or executable_dist_dir for test_runner_script()") + test_runner_args += [ + "--executable-dist-dir", + rebase_path(invoker.executable_dist_dir, root_build_dir), + ] + } + + if (_test_type == "gtest") { + assert(defined(invoker.test_suite)) + test_runner_args += [ + "--suite", + invoker.test_suite, + ] + } else if (_test_type == "instrumentation") { + _test_apk = "@FileArg($_rebased_apk_build_config:deps_info:apk_path)" + if (_incremental_install) { + _test_apk = "@FileArg($_rebased_apk_build_config:deps_info:incremental_apk_path)" + } + test_runner_args += [ + "--test-apk=$_test_apk", + "--test-jar", + rebase_path(invoker.test_jar, root_build_dir), + ] + if (defined(invoker.apk_under_test)) { + deps += [ "${invoker.apk_under_test}__build_config" ] + _apk_under_test_build_config = + get_label_info(invoker.apk_under_test, "target_gen_dir") + "/" + + get_label_info(invoker.apk_under_test, "name") + ".build_config" + _rebased_apk_under_test_build_config = + rebase_path(_apk_under_test_build_config, root_build_dir) + _apk_under_test = + "@FileArg($_rebased_apk_under_test_build_config:deps_info:apk_path)" + if (_incremental_install) { + _apk_under_test = "@FileArg($_rebased_apk_under_test_build_config:deps_info:incremental_apk_path)" + } + test_runner_args += [ "--apk-under-test=$_apk_under_test" ] + } + if (emma_coverage) { + # Set a default coverage output directory (can be overridden by user + # passing the same flag). + test_runner_args += [ + "--coverage-dir", + rebase_path("$root_out_dir/coverage", root_build_dir), + ] + } + } else if (_test_type == "junit") { + assert(defined(invoker.test_suite)) + test_runner_args += [ + "--test-suite", + invoker.test_suite, + ] + } else { + assert(false, "Invalid test type: $_test_type.") + } + + if (defined(invoker.additional_apks)) { + foreach(additional_apk, invoker.additional_apks) { + deps += [ "${additional_apk}__build_config" ] + _build_config = get_label_info(additional_apk, "target_gen_dir") + "/" + + get_label_info(additional_apk, "name") + ".build_config" + _rebased_build_config = rebase_path(_build_config, root_build_dir) + test_runner_args += [ + "--additional-apk", + "@FileArg($_rebased_build_config:deps_info:apk_path)", + ] + } + } + if (defined(invoker.shard_timeout)) { + test_runner_args += [ "--shard-timeout=${invoker.shard_timeout}" ] + } + if (_incremental_install) { + test_runner_args += [ + "--test-apk-incremental-install-script", + "@FileArg($_rebased_apk_build_config:deps_info:incremental_install_script_path)", + ] + if (defined(invoker.apk_under_test)) { + test_runner_args += [ + "--apk-under-test-incremental-install-script", + "@FileArg($_rebased_apk_under_test_build_config:deps_info:incremental_install_script_path)", + ] + } + test_runner_args += [ "--fast-local-dev" ] + } + if (is_asan) { + test_runner_args += [ "--tool=asan" ] + } + + generated_script = "$root_build_dir/bin/run_${_test_name}" + outputs = [ + generated_script, + ] + data += [ generated_script ] + + args = [ + "--depfile", + rebase_path(depfile, root_build_dir), + "--script-output-path", + rebase_path(generated_script, root_build_dir), + ] + if (defined(android_test_runner_script)) { + args += [ + "--test-runner-path", + android_test_runner_script, + ] + } + + args += test_runner_args + } +} + +if (enable_java_templates) { + import("//build/config/zip.gni") + import("//third_party/ijar/ijar.gni") + import("//third_party/android_platform/config.gni") + + rebased_android_sdk = rebase_path(android_sdk, root_build_dir) + rebased_android_sdk_build_tools = + rebase_path(android_sdk_build_tools, root_build_dir) + + android_sdk_jar = "$android_sdk/android.jar" + rebased_android_sdk_jar = rebase_path(android_sdk_jar, root_build_dir) + android_default_aapt_path = "$rebased_android_sdk_build_tools/aapt" + + android_configuration_name = "Release" + if (is_debug) { + android_configuration_name = "Debug" + } + + template("android_lint") { + action(target_name) { + forward_variables_from(invoker, + [ + "deps", + "data_deps", + "public_deps", + "testonly", + ]) + if (!defined(deps)) { + deps = [] + } + + if (!defined(lint_suppressions_file)) { + lint_suppressions_file = "//build/android/lint/suppressions.xml" + } + + _cache_dir = "$root_build_dir/android_lint_cache" + _result_path = "$target_gen_dir/$target_name/result.xml" + _config_path = "$target_gen_dir/$target_name/config.xml" + _suppressions_file = lint_suppressions_file + _platform_xml_path = + "${android_sdk_root}/platform-tools/api/api-versions.xml" + _rebased_lint_android_sdk_root = + rebase_path(lint_android_sdk_root, root_build_dir) + + script = "//build/android/gyp/lint.py" + depfile = "$target_gen_dir/$target_name.d" + inputs = [ + _platform_xml_path, + _suppressions_file, + invoker.android_manifest, + ] + + outputs = [ + _result_path, + _config_path, + ] + + args = [ + "--lint-path=$_rebased_lint_android_sdk_root/tools/lint", + "--cache-dir", + rebase_path(_cache_dir, root_build_dir), + "--platform-xml-path", + rebase_path(_platform_xml_path, root_build_dir), + "--android-sdk-version=${lint_android_sdk_version}", + "--depfile", + rebase_path(depfile, root_build_dir), + "--config-path", + rebase_path(_suppressions_file, root_build_dir), + "--manifest-path", + rebase_path(invoker.android_manifest, root_build_dir), + "--product-dir=.", + "--processed-config-path", + rebase_path(_config_path, root_build_dir), + "--result-path", + rebase_path(_result_path, root_build_dir), + "--enable", + ] + + if (defined(invoker.create_cache) && invoker.create_cache) { + args += [ + "--create-cache", + "--silent", + ] + } else { + inputs += invoker.java_files + inputs += [ + invoker.jar_path, + invoker.build_config, + ] + if (invoker.java_files != []) { + inputs += [ invoker.java_sources_file ] + _rebased_java_sources_file = + rebase_path(invoker.java_sources_file, root_build_dir) + args += [ "--java-sources-file=$_rebased_java_sources_file" ] + } + deps += [ "//build/android:prepare_android_lint_cache" ] + + _rebased_build_config = + rebase_path(invoker.build_config, root_build_dir) + args += [ + "--jar-path", + rebase_path(invoker.jar_path, root_build_dir), + "--classpath=@FileArg($_rebased_build_config:javac:interface_classpath)", + "--resource-sources=@FileArg($_rebased_build_config:deps_info:owned_resources_dirs)", + "--resource-sources=@FileArg($_rebased_build_config:deps_info:owned_resources_zips)", + "--can-fail-build", + ] + } + } + } + + template("proguard") { + action(target_name) { + set_sources_assignment_filter([]) + forward_variables_from(invoker, + [ + "deps", + "data_deps", + "public_deps", + "testonly", + ]) + script = "//build/android/gyp/proguard.py" + if (defined(invoker.proguard_jar_path)) { + _proguard_jar_path = invoker.proguard_jar_path + } else { + _proguard_jar_path = "//third_party/proguard/lib/proguard.jar" + } + _output_jar_path = invoker.output_jar_path + inputs = [ + _proguard_jar_path, + ] + if (defined(invoker.alternative_android_sdk_jar)) { + inputs += [ invoker.alternative_android_sdk_jar ] + _rebased_android_sdk_jar = + rebase_path(invoker.alternative_android_sdk_jar) + } else { + inputs += [ android_sdk_jar ] + _rebased_android_sdk_jar = rebased_android_sdk_jar + } + if (defined(invoker.inputs)) { + inputs += invoker.inputs + } + depfile = "${target_gen_dir}/${target_name}.d" + outputs = [ + _output_jar_path, + "$_output_jar_path.dump", + "$_output_jar_path.seeds", + "$_output_jar_path.mapping", + "$_output_jar_path.usage", + ] + args = [ + "--depfile", + rebase_path(depfile, root_build_dir), + "--proguard-path", + rebase_path(_proguard_jar_path, root_build_dir), + "--output-path", + rebase_path(_output_jar_path, root_build_dir), + "--classpath", + _rebased_android_sdk_jar, + ] + if (proguard_verbose) { + args += [ "--verbose" ] + } + if (defined(invoker.args)) { + args += invoker.args + } + if (defined(invoker.proguard_jar_path)) { + # We assume that if we are using a different ProGuard, this new version + # can handle the 'dangerous' optimizaions. + args += [ "--enable-dangerous-optimizations" ] + } + } + } + + template("findbugs") { + action(target_name) { + forward_variables_from(invoker, + [ + "deps", + "testonly", + ]) + script = "//build/android/findbugs_diff.py" + depfile = "$target_gen_dir/$target_name.d" + _result_path = "$target_gen_dir/$target_name/result.xml" + _exclusions_file = "//build/android/findbugs_filter/findbugs_exclude.xml" + + _rebased_build_config = rebase_path(invoker.build_config, root_build_dir) + + inputs = [ + "//build/android/pylib/utils/findbugs.py", + _exclusions_file, + invoker.jar_path, + invoker.build_config, + ] + + outputs = [ + _result_path, + ] + + args = [ + "--depfile", + rebase_path(depfile, root_build_dir), + "--exclude", + rebase_path(_exclusions_file, root_build_dir), + "--auxclasspath-gyp", + "@FileArg($_rebased_build_config:javac:classpath)", + "--output-file", + rebase_path(_result_path, root_build_dir), + rebase_path(invoker.jar_path, root_build_dir), + ] + + if (findbugs_verbose) { + args += [ "-vv" ] + } + } + } + + # Generates a script in the build bin directory to run a java binary. + # + # Variables + # main_class: The class containing the program entry point. + # jar_path: The path to the jar to run. + # script_name: Name of the script to generate. + # build_config: Path to .build_config for the jar (contains classpath). + # wrapper_script_args: List of extra arguments to pass to the executable. + # + template("java_binary_script") { + set_sources_assignment_filter([]) + forward_variables_from(invoker, [ "testonly" ]) + + _main_class = invoker.main_class + _build_config = invoker.build_config + _jar_path = invoker.jar_path + _script_name = invoker.script_name + + action(target_name) { + script = "//build/android/gyp/create_java_binary_script.py" + depfile = "$target_gen_dir/$_script_name.d" + java_script = "$root_build_dir/bin/$_script_name" + inputs = [ + _build_config, + ] + outputs = [ + java_script, + ] + forward_variables_from(invoker, [ "deps" ]) + _rebased_build_config = rebase_path(_build_config, root_build_dir) + args = [ + "--depfile", + rebase_path(depfile, root_build_dir), + "--output", + rebase_path(java_script, root_build_dir), + "--classpath=@FileArg($_rebased_build_config:deps_info:java:full_classpath)", + "--jar-path", + rebase_path(_jar_path, root_build_dir), + "--main-class", + _main_class, + ] + if (emma_coverage) { + args += [ + "--classpath", + rebase_path("//third_party/android_tools/sdk/tools/lib/emma.jar", + root_build_dir), + ] + args += [ "--noverify" ] + } + if (defined(invoker.wrapper_script_args)) { + args += [ "--" ] + invoker.wrapper_script_args + } + if (defined(invoker.bootclasspath)) { + args += [ + "--bootclasspath", + rebase_path(invoker.bootclasspath, root_build_dir), + ] + } + } + } + + template("dex") { + set_sources_assignment_filter([]) + + _enable_multidex = + defined(invoker.enable_multidex) && invoker.enable_multidex + + if (_enable_multidex) { + _main_dex_list_path = invoker.output + ".main_dex_list" + _main_dex_list_target_name = "${target_name}__main_dex_list" + action(_main_dex_list_target_name) { + forward_variables_from(invoker, + [ + "deps", + "inputs", + "sources", + "testonly", + ]) + + script = "//build/android/gyp/main_dex_list.py" + depfile = "$target_gen_dir/$target_name.d" + + main_dex_rules = "//build/android/main_dex_classes.flags" + + if (!defined(inputs)) { + inputs = [] + } + inputs += [ main_dex_rules ] + + outputs = [ + _main_dex_list_path, + ] + + args = [ + "--depfile", + rebase_path(depfile, root_build_dir), + "--android-sdk-tools", + rebased_android_sdk_build_tools, + "--main-dex-list-path", + rebase_path(_main_dex_list_path, root_build_dir), + "--main-dex-rules-path", + rebase_path(main_dex_rules, root_build_dir), + ] + + if (defined(invoker.args)) { + args += invoker.args + } + + if (defined(invoker.sources)) { + args += rebase_path(invoker.sources, root_build_dir) + } + } + } + + assert(defined(invoker.output)) + action(target_name) { + forward_variables_from(invoker, + [ + "deps", + "inputs", + "sources", + "testonly", + ]) + script = "//build/android/gyp/dex.py" + depfile = "$target_gen_dir/$target_name.d" + outputs = [ + invoker.output, + ] + + rebased_output = rebase_path(invoker.output, root_build_dir) + + args = [ + "--depfile", + rebase_path(depfile, root_build_dir), + "--android-sdk-tools", + rebased_android_sdk_build_tools, + "--dex-path", + rebased_output, + ] + + if (enable_incremental_dx) { + args += [ "--incremental" ] + } + + # EMMA requires --no-locals. + if (emma_coverage) { + args += [ "--no-locals=1" ] + } + + if (_enable_multidex) { + args += [ + "--multi-dex", + "--main-dex-list-path", + rebase_path(_main_dex_list_path, root_build_dir), + ] + deps += [ ":${_main_dex_list_target_name}" ] + inputs += [ _main_dex_list_path ] + } + + if (defined(invoker.args)) { + args += invoker.args + } + + if (defined(invoker.sources)) { + args += rebase_path(invoker.sources, root_build_dir) + } + } + } + + template("process_java_prebuilt") { + set_sources_assignment_filter([]) + forward_variables_from(invoker, [ "testonly" ]) + + assert(invoker.build_config != "") + _build_config = invoker.build_config + _rebased_build_config = rebase_path(_build_config, root_build_dir) + assert(_rebased_build_config != "" || true) # Mark used. + + _input_jar_path = invoker.input_jar_path + _output_jar_path = invoker.output_jar_path + + _jar_excluded_patterns = [] + if (defined(invoker.jar_excluded_patterns)) { + _jar_excluded_patterns = invoker.jar_excluded_patterns + } + _strip_resource_classes = defined(invoker.strip_resource_classes) && + invoker.strip_resource_classes + _filter_jar = _jar_excluded_patterns != [] || _strip_resource_classes + + _proguard_preprocess = + defined(invoker.proguard_preprocess) && invoker.proguard_preprocess + + _enable_assert = + defined(invoker.supports_android) && invoker.supports_android && + (is_java_debug || dcheck_always_on) + + _retrolambda = defined(invoker.supports_android) && + invoker.supports_android && use_java8 + + _deps = [] + _previous_output_jar = _input_jar_path + + if (_filter_jar) { + _filter_target = "${target_name}__filter" + _filter_input_jar = _previous_output_jar + _filter_output_jar = "$target_out_dir/$target_name-filtered.jar" + + action(_filter_target) { + script = "//build/android/gyp/jar.py" + deps = _deps + if (defined(invoker.deps)) { + deps += invoker.deps + } + if (defined(invoker.public_deps)) { + public_deps = invoker.public_deps + } + inputs = [ + _build_config, + _filter_input_jar, + ] + outputs = [ + _filter_output_jar, + ] + args = [ + "--input-jar", + rebase_path(_filter_input_jar, root_build_dir), + "--jar-path", + rebase_path(_filter_output_jar, root_build_dir), + "--excluded-classes=$_jar_excluded_patterns", + ] + if (_strip_resource_classes) { + args += [ "--strip-resource-classes-for=@FileArg($_rebased_build_config:javac:resource_packages)" ] + } + } + + _deps = [] + _deps = [ ":$_filter_target" ] + _previous_output_jar = _filter_output_jar + } + + if (_proguard_preprocess) { + _proguard_target = "${target_name}__proguard_process" + _proguard_input_jar = _previous_output_jar + _proguard_output_jar = "$target_out_dir/$target_name-proguarded.jar" + _proguard_config_path = invoker.proguard_preprocess_config + + proguard(_proguard_target) { + deps = _deps + if (defined(invoker.deps)) { + deps += invoker.deps + } + if (defined(invoker.public_deps)) { + public_deps = invoker.public_deps + } + inputs = [ + _build_config, + _proguard_config_path, + _proguard_input_jar, + ] + output_jar_path = _proguard_output_jar + + _rebased_input_paths = + [ rebase_path(_proguard_input_jar, root_build_dir) ] + _rebased_proguard_configs = + [ rebase_path(_proguard_config_path, root_build_dir) ] + args = [ + "--input-paths=$_rebased_input_paths", + "--proguard-configs=$_rebased_proguard_configs", + "--classpath=@FileArg($_rebased_build_config:javac:classpath)", + ] + } + + _deps = [] + _deps = [ ":$_proguard_target" ] + _previous_output_jar = _proguard_output_jar + } + + if (_enable_assert) { + _assert_target = "${target_name}__assert" + _assert_input_jar = _previous_output_jar + _assert_output_jar = "$target_out_dir/$target_name-asserted.jar" + + action(_assert_target) { + script = "$root_build_dir/bin/helper/java_assertion_enabler" + deps = [ + "//build/android/java_assertion_enabler($default_toolchain)", + ] + deps += _deps + if (defined(invoker.deps)) { + deps += invoker.deps + } + if (defined(invoker.public_deps)) { + public_deps = invoker.public_deps + } + inputs = [ + _assert_input_jar, + ] + outputs = [ + _assert_output_jar, + ] + args = [ + rebase_path(_assert_input_jar, root_build_dir), + rebase_path(_assert_output_jar, root_build_dir), + ] + } + + _deps = [] + _deps = [ ":$_assert_target" ] + _previous_output_jar = _assert_output_jar + } + + if (_retrolambda) { + _retrolambda_target = "${target_name}__retrolambda" + _retrolambda_input_jar = _previous_output_jar + _retrolambda_output_jar = "$target_out_dir/$target_name-retrolambda.jar" + + android_sdk_jar = "$android_sdk/android.jar" + action(_retrolambda_target) { + script = "//build/android/gyp/retrolambda.py" + deps = _deps + if (defined(invoker.deps)) { + deps += invoker.deps + } + if (defined(invoker.public_deps)) { + public_deps = invoker.public_deps + } + inputs = [ + _build_config, + _retrolambda_input_jar, + ] + outputs = [ + _retrolambda_output_jar, + ] + args = [ + "--input-jar", + rebase_path(_retrolambda_input_jar, root_build_dir), + "--output-jar", + rebase_path(_retrolambda_output_jar, root_build_dir), + "--classpath=@FileArg($_rebased_build_config:javac:classpath)", + "--android-sdk-jar", + rebase_path(android_sdk_jar, root_build_dir), + ] + } + + _deps = [] + _deps = [ ":$_retrolambda_target" ] + _previous_output_jar = _retrolambda_output_jar + } + + _output_jar_target = "${target_name}__copy" + copy(_output_jar_target) { + deps = _deps + if (defined(invoker.deps)) { + deps += invoker.deps + } + if (defined(invoker.public_deps)) { + public_deps = invoker.public_deps + } + sources = [ + _previous_output_jar, + ] + outputs = [ + _output_jar_path, + ] + } + + group(target_name) { + forward_variables_from(invoker, + [ + "data_deps", + "visibility", + ]) + public_deps = [ + ":$_output_jar_target", + ] + } + } + + template("emma_instr") { + action(target_name) { + forward_variables_from(invoker, + [ + "deps", + "testonly", + ]) + + _coverage_file = "$target_out_dir/${target_name}.em" + _source_dirs_listing_file = "$target_out_dir/${target_name}_sources.txt" + _emma_jar = "${android_sdk_root}/tools/lib/emma.jar" + + script = "//build/android/gyp/emma_instr.py" + depfile = "${target_gen_dir}/${target_name}.d" + inputs = invoker.java_files + [ + _emma_jar, + invoker.input_jar_path, + ] + outputs = [ + _coverage_file, + _source_dirs_listing_file, + invoker.output_jar_path, + ] + args = [ + "instrument_jar", + "--input-path", + rebase_path(invoker.input_jar_path, root_build_dir), + "--output-path", + rebase_path(invoker.output_jar_path, root_build_dir), + "--depfile", + rebase_path(depfile, root_build_dir), + "--coverage-file", + rebase_path(_coverage_file, root_build_dir), + "--sources-list-file", + rebase_path(_source_dirs_listing_file, root_build_dir), + "--src-root", + rebase_path("//", root_build_dir), + "--emma-jar", + rebase_path(_emma_jar, root_build_dir), + ] + _rebased_java_sources_file = + rebase_path(invoker.java_sources_file, root_build_dir) + args += [ "--java-sources-file=$_rebased_java_sources_file" ] + + if (emma_filter != "") { + args += [ + "--filter-string", + emma_filter, + ] + } + } + } + + # Creates an unsigned .apk. + # + # Variables + # assets_build_config: Path to android_apk .build_config containing merged + # asset information. + # deps: Specifies the dependencies of this target. + # dex_path: Path to classes.dex file to include (optional). + # resource_packaged_apk_path: Path to .ap_ to use. + # output_apk_path: Output path for the generated .apk. + # native_lib_placeholders: List of placeholder filenames to add to the apk + # (optional). + # native_libs: List of native libraries. + # native_libs_filearg: @FileArg() of additionaly native libraries. + # write_asset_list: Adds an extra file to the assets, which contains a list of + # all other asset files. + template("package_apk") { + action(target_name) { + forward_variables_from(invoker, + [ + "deps", + "public_deps", + "testonly", + ]) + _native_lib_placeholders = [] + if (defined(invoker.native_lib_placeholders)) { + _native_lib_placeholders = invoker.native_lib_placeholders + } + + script = "//build/android/gyp/apkbuilder.py" + depfile = "$target_gen_dir/$target_name.d" + data_deps = [ + "//tools/android/md5sum", + ] # Used when deploying APKs + + inputs = invoker.native_libs + [ invoker.resource_packaged_apk_path ] + if (defined(invoker.dex_path)) { + inputs += [ invoker.dex_path ] + } + + outputs = [ + invoker.output_apk_path, + ] + + _rebased_resource_packaged_apk_path = + rebase_path(invoker.resource_packaged_apk_path, root_build_dir) + _rebased_packaged_apk_path = + rebase_path(invoker.output_apk_path, root_build_dir) + args = [ + "--depfile", + rebase_path(depfile, root_build_dir), + "--resource-apk=$_rebased_resource_packaged_apk_path", + "--output-apk=$_rebased_packaged_apk_path", + ] + if (defined(invoker.assets_build_config)) { + inputs += [ invoker.assets_build_config ] + _rebased_build_config = + rebase_path(invoker.assets_build_config, root_build_dir) + args += [ + "--assets=@FileArg($_rebased_build_config:assets)", + "--uncompressed-assets=@FileArg($_rebased_build_config:uncompressed_assets)", + ] + } + if (defined(invoker.write_asset_list) && invoker.write_asset_list) { + args += [ "--write-asset-list" ] + } + if (defined(invoker.dex_path)) { + _rebased_dex_path = rebase_path(invoker.dex_path, root_build_dir) + args += [ "--dex-file=$_rebased_dex_path" ] + } + if (invoker.native_libs != [] || defined(invoker.native_libs_filearg) || + _native_lib_placeholders != []) { + args += [ "--android-abi=$android_app_abi" ] + } + if (invoker.native_libs != []) { + _rebased_native_libs = rebase_path(invoker.native_libs, root_build_dir) + args += [ "--native-libs=$_rebased_native_libs" ] + } + if (defined(invoker.native_libs_filearg)) { + args += [ "--native-libs=${invoker.native_libs_filearg}" ] + } + if (_native_lib_placeholders != []) { + args += [ "--native-lib-placeholders=$_native_lib_placeholders" ] + } + + # TODO (michaelbai): Remove the secondary_native_libs variable. + if (defined(invoker.secondary_abi_native_libs_filearg)) { + assert(defined(android_app_secondary_abi)) + args += [ + "--secondary-native-libs=${invoker.secondary_abi_native_libs_filearg}", + "--secondary-android-abi=$android_app_secondary_abi", + ] + } else if (defined(invoker.secondary_native_libs) && + invoker.secondary_native_libs != []) { + assert(defined(android_app_secondary_abi)) + inputs += invoker.secondary_native_libs + _secondary_native_libs = rebase_path(invoker.secondary_native_libs) + args += [ + "--secondary-native-libs=$_secondary_native_libs", + "--secondary-android-abi=$android_app_secondary_abi", + ] + } + + if (defined(invoker.emma_instrument) && invoker.emma_instrument) { + _emma_device_jar = "$android_sdk_root/tools/lib/emma_device.jar" + _rebased_emma_device_jar = rebase_path(_emma_device_jar, root_build_dir) + args += [ "--emma-device-jar=$_rebased_emma_device_jar" ] + } + + if (defined(invoker.uncompress_shared_libraries) && + invoker.uncompress_shared_libraries) { + args += [ "--uncompress-shared-libraries" ] + } + } + } + + # Signs & zipaligns an apk. + # + # Variables + # input_apk_path: Path of the .apk to be finalized. + # output_apk_path: Output path for the generated .apk. + # keystore_path: Path to keystore to use for signing. + # keystore_name: Key alias to use. + # keystore_password: Keystore password. + # rezip_apk: Whether to add crazy-linker alignment. + template("finalize_apk") { + action(target_name) { + deps = [] + script = "//build/android/gyp/finalize_apk.py" + depfile = "$target_gen_dir/$target_name.d" + forward_variables_from(invoker, + [ + "deps", + "data_deps", + "public_deps", + "testonly", + ]) + + sources = [ + invoker.input_apk_path, + ] + inputs = [ + invoker.keystore_path, + ] + outputs = [ + invoker.output_apk_path, + ] + data = [ + invoker.output_apk_path, + ] + + args = [ + "--depfile", + rebase_path(depfile, root_build_dir), + "--zipalign-path", + rebase_path(zipalign_path, root_build_dir), + "--unsigned-apk-path", + rebase_path(invoker.input_apk_path, root_build_dir), + "--final-apk-path", + rebase_path(invoker.output_apk_path, root_build_dir), + "--key-path", + rebase_path(invoker.keystore_path, root_build_dir), + "--key-name", + invoker.keystore_name, + "--key-passwd", + invoker.keystore_password, + ] + if (defined(invoker.rezip_apk) && invoker.rezip_apk) { + deps += [ "//build/android/rezip" ] + _rezip_jar_path = "$root_build_dir/lib.java/rezip_apk.jar" + args += [ + "--load-library-from-zip=1", + "--rezip-apk-jar-path", + rebase_path(_rezip_jar_path, root_build_dir), + ] + } + + if (defined(invoker.page_align_shared_libraries) && + invoker.page_align_shared_libraries) { + args += [ "--page-align-shared-libraries" ] + } + } + } + + # Packages resources, assets, dex, and native libraries into an apk. Signs and + # zipaligns the apk. + template("create_apk") { + set_sources_assignment_filter([]) + forward_variables_from(invoker, [ "testonly" ]) + + _android_manifest = invoker.android_manifest + _base_path = invoker.base_path + _final_apk_path = invoker.apk_path + _incremental_final_apk_path_helper = + process_file_template( + [ _final_apk_path ], + "{{source_dir}}/{{source_name_part}}_incremental.apk") + _incremental_final_apk_path = _incremental_final_apk_path_helper[0] + + if (defined(invoker.resources_zip)) { + _resources_zip = invoker.resources_zip + assert(_resources_zip != "") # Mark as used. + } + if (defined(invoker.dex_path)) { + _dex_path = invoker.dex_path + } + _load_library_from_apk = invoker.load_library_from_apk + + _deps = [] + if (defined(invoker.deps)) { + _deps = invoker.deps + } + _incremental_deps = [] + if (defined(invoker.incremental_deps)) { + _incremental_deps = invoker.incremental_deps + } + _native_libs = [] + if (defined(invoker.native_libs)) { + _native_libs = invoker.native_libs + } + _native_libs_even_when_incremental = [] + if (defined(invoker.native_libs_even_when_incremental)) { + _native_libs_even_when_incremental = + invoker.native_libs_even_when_incremental + } + + _version_code = invoker.version_code + _version_name = invoker.version_name + assert(_version_code != -1) # Mark as used. + assert(_version_name != "") # Mark as used. + + _base_apk_path = _base_path + ".apk_intermediates" + + _resource_packaged_apk_path = _base_apk_path + ".ap_" + _incremental_resource_packaged_apk_path = + _base_apk_path + "_incremental.ap_" + _packaged_apk_path = _base_apk_path + ".unfinished.apk" + _incremental_packaged_apk_path = + _base_apk_path + "_incremental.unfinished.apk" + _shared_resources = + defined(invoker.shared_resources) && invoker.shared_resources + assert(_shared_resources || true) # Mark as used. + _app_as_shared_lib = + defined(invoker.app_as_shared_lib) && invoker.app_as_shared_lib + assert(_app_as_shared_lib || true) # Mark as used. + assert(!(_shared_resources && _app_as_shared_lib)) + + _keystore_path = invoker.keystore_path + _keystore_name = invoker.keystore_name + _keystore_password = invoker.keystore_password + + _split_densities = [] + if (defined(invoker.create_density_splits) && + invoker.create_density_splits) { + _split_densities = [ + "hdpi", + "xhdpi", + "xxhdpi", + "xxxhdpi", + "tvdpi", + ] + } + + _split_languages = [] + if (defined(invoker.language_splits)) { + _split_languages = invoker.language_splits + } + + template("package_resources_helper") { + action(target_name) { + deps = invoker.deps + + script = "//build/android/gyp/package_resources.py" + depfile = "${target_gen_dir}/${target_name}.d" + inputs = [ + invoker.android_manifest, + ] + if (defined(_resources_zip)) { + inputs += [ _resources_zip ] + } + outputs = [ + invoker.resource_packaged_apk_path, + ] + + if (defined(invoker.android_aapt_path)) { + _android_aapt_path = invoker.android_aapt_path + } else { + _android_aapt_path = android_default_aapt_path + } + + if (defined(invoker.alternative_android_sdk_jar)) { + _rebased_android_sdk_jar = + rebase_path(invoker.alternative_android_sdk_jar) + } else { + _rebased_android_sdk_jar = rebased_android_sdk_jar + } + + args = [ + "--depfile", + rebase_path(depfile, root_build_dir), + "--android-sdk-jar", + _rebased_android_sdk_jar, + "--aapt-path", + _android_aapt_path, + "--configuration-name=$android_configuration_name", + "--android-manifest", + rebase_path(invoker.android_manifest, root_build_dir), + "--version-code", + _version_code, + "--version-name", + _version_name, + "--apk-path", + rebase_path(invoker.resource_packaged_apk_path, root_build_dir), + ] + + if (defined(_resources_zip)) { + args += [ + "--resource-zips", + rebase_path(_resources_zip, root_build_dir), + ] + } + if (_shared_resources) { + args += [ "--shared-resources" ] + } + if (_app_as_shared_lib) { + args += [ "--app-as-shared-lib" ] + } + if (_split_densities != []) { + args += [ "--create-density-splits" ] + foreach(_density, _split_densities) { + outputs += [ "${invoker.resource_packaged_apk_path}_${_density}" ] + } + } + if (_split_languages != []) { + args += [ "--language-splits=$_split_languages" ] + foreach(_language, _split_languages) { + outputs += [ "${invoker.resource_packaged_apk_path}_${_language}" ] + } + } + if (defined(invoker.extensions_to_not_compress)) { + args += [ + "--no-compress", + invoker.extensions_to_not_compress, + ] + } + } + } + + _package_resources_target_name = "${target_name}__package_resources" + package_resources_helper(_package_resources_target_name) { + forward_variables_from(invoker, + [ + "alternative_android_sdk_jar", + "android_aapt_path", + "extensions_to_not_compress", + ]) + deps = _deps + android_manifest = _android_manifest + resource_packaged_apk_path = _resource_packaged_apk_path + } + + _generate_incremental_manifest_target_name = + "${target_name}_incremental_generate_manifest" + _incremental_android_manifest = + get_label_info(_generate_incremental_manifest_target_name, + "target_gen_dir") + "/AndroidManifest.xml" + action(_generate_incremental_manifest_target_name) { + deps = _incremental_deps + script = + "//build/android/incremental_install/generate_android_manifest.py" + depfile = "${target_gen_dir}/${target_name}.d" + inputs = [ + _android_manifest, + ] + outputs = [ + _incremental_android_manifest, + ] + + _rebased_src_manifest = rebase_path(_android_manifest, root_build_dir) + _rebased_incremental_manifest = + rebase_path(_incremental_android_manifest, root_build_dir) + _rebased_depfile = rebase_path(depfile, root_build_dir) + args = [ + "--src-manifest=$_rebased_src_manifest", + "--out-manifest=$_rebased_incremental_manifest", + "--depfile=$_rebased_depfile", + ] + if (disable_incremental_isolated_processes) { + args += [ "--disable-isolated-processes" ] + } + } + + _incremental_package_resources_target_name = + "${target_name}_incremental__package_resources" + + # TODO(agrieve): See if we can speed up this step by swapping the manifest + # from the result of the main package_resources step. + package_resources_helper(_incremental_package_resources_target_name) { + forward_variables_from(invoker, + [ + "alternative_android_sdk_jar", + "android_aapt_path", + "extensions_to_not_compress", + ]) + deps = + _incremental_deps + [ ":$_generate_incremental_manifest_target_name" ] + android_manifest = _incremental_android_manifest + resource_packaged_apk_path = _incremental_resource_packaged_apk_path + } + + package_target = "${target_name}__package" + package_apk(package_target) { + forward_variables_from(invoker, + [ + "assets_build_config", + "emma_instrument", + "native_lib_placeholders", + "native_libs_filearg", + "secondary_abi_native_libs_filearg", + "secondary_native_libs", + "uncompress_shared_libraries", + "write_asset_list", + ]) + deps = _deps + [ ":${_package_resources_target_name}" ] + native_libs = _native_libs + _native_libs_even_when_incremental + + if (defined(_dex_path)) { + dex_path = _dex_path + } + + output_apk_path = _packaged_apk_path + resource_packaged_apk_path = _resource_packaged_apk_path + } + + _incremental_package_target = "${target_name}_incremental__package" + package_apk(_incremental_package_target) { + forward_variables_from(invoker, + [ + "assets_build_config", + "emma_instrument", + "secondary_native_libs", + "uncompress_shared_libraries", + ]) + _dex_target = "//build/android/incremental_install:bootstrap_java__dex" + deps = _incremental_deps + [ + ":${_incremental_package_resources_target_name}", + _dex_target, + ] + + if (defined(_dex_path)) { + dex_path = + get_label_info(_dex_target, "target_gen_dir") + "/bootstrap.dex" + } + + native_libs = _native_libs_even_when_incremental + + # http://crbug.com/384638 + _has_native_libs = + defined(invoker.native_libs_filearg) || _native_libs != [] + if (_has_native_libs && _native_libs_even_when_incremental == []) { + native_lib_placeholders = [ "libfix.crbug.384638.so" ] + } + + output_apk_path = _incremental_packaged_apk_path + resource_packaged_apk_path = _incremental_resource_packaged_apk_path + } + + _finalize_apk_rule_name = "${target_name}__finalize" + finalize_apk(_finalize_apk_rule_name) { + forward_variables_from(invoker, [ "page_align_shared_libraries" ]) + + input_apk_path = _packaged_apk_path + output_apk_path = _final_apk_path + keystore_path = _keystore_path + keystore_name = _keystore_name + keystore_password = _keystore_password + rezip_apk = _load_library_from_apk + + public_deps = [ + # Generator of the _packaged_apk_path this target takes as input. + ":$package_target", + ] + } + + _incremental_finalize_apk_rule_name = "${target_name}_incremental__finalize" + finalize_apk(_incremental_finalize_apk_rule_name) { + input_apk_path = _incremental_packaged_apk_path + output_apk_path = _incremental_final_apk_path + keystore_path = _keystore_path + keystore_name = _keystore_name + keystore_password = _keystore_password + + public_deps = [ + ":$_incremental_package_target", + ] + } + + _split_deps = [] + + template("finalize_split") { + finalize_apk(target_name) { + _config = invoker.split_config + _type = invoker.split_type + input_apk_path = "${_resource_packaged_apk_path}_${_config}" + _output_paths = process_file_template( + [ _final_apk_path ], + "{{source_dir}}/{{source_name_part}}-${_type}-${_config}.apk") + output_apk_path = _output_paths[0] + keystore_path = _keystore_path + keystore_name = _keystore_name + keystore_password = _keystore_password + deps = [ + ":${_package_resources_target_name}", + ] + } + } + + foreach(_split, _split_densities) { + _split_rule = "${target_name}__finalize_${_split}_split" + finalize_split(_split_rule) { + split_type = "density" + split_config = _split + } + _split_deps += [ ":$_split_rule" ] + } + foreach(_split, _split_languages) { + _split_rule = "${target_name}__finalize_${_split}_split" + finalize_split(_split_rule) { + split_type = "lang" + split_config = _split + } + _split_deps += [ ":$_split_rule" ] + } + + group(target_name) { + public_deps = [ ":${_finalize_apk_rule_name}" ] + _split_deps + } + group("${target_name}_incremental") { + public_deps = [ ":${_incremental_finalize_apk_rule_name}" ] + _split_deps + } + } + + template("java_prebuilt_impl") { + set_sources_assignment_filter([]) + forward_variables_from(invoker, [ "testonly" ]) + _supports_android = + defined(invoker.supports_android) && invoker.supports_android + + assert(defined(invoker.jar_path)) + if (defined(invoker.output_name)) { + _output_name = invoker.output_name + } else { + _output_name = get_path_info(invoker.jar_path, "name") + } + _base_path = "${target_gen_dir}/$target_name" + + # Jar files can be needed at runtime (by Robolectric tests or java binaries), + # so do not put them under gen/. + _target_dir_name = get_label_info(":$target_name", "dir") + _jar_path = "$root_out_dir/lib.java$_target_dir_name/$_output_name.jar" + _ijar_path = + "$root_out_dir/lib.java$_target_dir_name/$_output_name.interface.jar" + _build_config = _base_path + ".build_config" + + if (_supports_android) { + _dex_path = _base_path + ".dex.jar" + } + _deps = [] + if (defined(invoker.deps)) { + _deps = invoker.deps + } + _jar_deps = [] + if (defined(invoker.jar_dep)) { + _jar_deps = [ invoker.jar_dep ] + } + + _template_name = target_name + + _build_config_target_name = "${_template_name}__build_config" + _process_jar_target_name = "${_template_name}__process_jar" + _ijar_target_name = "${_template_name}__ijar" + if (_supports_android) { + _dex_target_name = "${_template_name}__dex" + } + + write_build_config(_build_config_target_name) { + type = "java_prebuilt" + is_prebuilt_binary = defined(invoker.main_class) + forward_variables_from(invoker, + [ + "input_jars_paths", + "proguard_configs", + ]) + supports_android = _supports_android + requires_android = + defined(invoker.requires_android) && invoker.requires_android + + if (defined(invoker.deps)) { + possible_config_deps = _deps + } + build_config = _build_config + jar_path = _jar_path + if (_supports_android) { + dex_path = _dex_path + } + } + + process_java_prebuilt(_process_jar_target_name) { + forward_variables_from(invoker, + [ + "jar_excluded_patterns", + "proguard_preprocess", + "proguard_preprocess_config", + "strip_resource_classes", + ]) + + visibility = [ + ":$_ijar_target_name", + ":$_template_name", + ] + if (_supports_android) { + visibility += [ ":$_dex_target_name" ] + } + + supports_android = _supports_android + build_config = _build_config + input_jar_path = invoker.jar_path + output_jar_path = _jar_path + + deps = [ ":$_build_config_target_name" ] + _deps + _jar_deps + } + + generate_interface_jar(_ijar_target_name) { + if (!defined(invoker.proguard_preprocess) || + !invoker.proguard_preprocess) { + # Always used the unfiltered .jar to create the interface jar so that + # other targets will resolve filtered classes when depending on + # BuildConfig, NativeLibraries, etc. + input_jar = invoker.jar_path + deps = _deps + _jar_deps + } else { + # However, still apply pre-proguarding, since ignoring that can break + # compiles. + input_jar = _jar_path + deps = [ + ":$_process_jar_target_name", + ] + } + + output_jar = _ijar_path + } + + if (_supports_android) { + dex(_dex_target_name) { + sources = [ + _jar_path, + ] + output = _dex_path + deps = [ ":$_process_jar_target_name" ] + _deps + _jar_deps + } + } + + if (defined(invoker.main_class)) { + _binary_script_target_name = "${_template_name}__java_binary_script" + java_binary_script(_binary_script_target_name) { + forward_variables_from(invoker, + [ + "bootclasspath", + "deps", + "main_class", + "wrapper_script_args", + ]) + if (!defined(deps)) { + deps = [] + } + build_config = _build_config + jar_path = _jar_path + script_name = _template_name + if (defined(invoker.wrapper_script_name)) { + script_name = invoker.wrapper_script_name + } + deps += [ ":$_build_config_target_name" ] + } + } + + group(target_name) { + forward_variables_from(invoker, [ "data_deps" ]) + public_deps = [ + ":$_ijar_target_name", + ":$_process_jar_target_name", + ] + if (_supports_android) { + public_deps += [ ":$_dex_target_name" ] + } + if (defined(invoker.main_class)) { + # Some targets use the generated script while building, so make it a dep + # rather than a data_dep. + public_deps += [ ":$_binary_script_target_name" ] + } + } + } + + # Compiles and jars a set of java files. + # + # Outputs: + # $jar_path.jar + # $jar_path.interface.jar + # + # Variables + # java_files: List of .java files to compile (same as exists in java_sources_file) + # java_sources_file: Path to file containing list of files to compile. + # chromium_code: If true, enable extra warnings. + # srcjar_deps: List of srcjar dependencies. The .java files contained in the + # dependencies srcjar outputs will be compiled and added to the output jar. + # jar_path: Use this to explicitly set the output jar path. Defaults to + # "${target_gen_dir}/${target_name}.jar. + template("compile_java") { + set_sources_assignment_filter([]) + forward_variables_from(invoker, [ "testonly" ]) + + assert(defined(invoker.build_config)) + assert(defined(invoker.jar_path)) + + _build_config = invoker.build_config + + _chromium_code = false + if (defined(invoker.chromium_code)) { + _chromium_code = invoker.chromium_code + } + + _supports_android = true + if (defined(invoker.supports_android)) { + _supports_android = invoker.supports_android + } + + _requires_android = + defined(invoker.requires_android) && invoker.requires_android + + _enable_errorprone = use_errorprone_java_compiler + if (!_chromium_code) { + _enable_errorprone = false + } else if (defined(invoker.enable_errorprone)) { + _enable_errorprone = invoker.enable_errorprone + } + + _provider_configurations = [] + if (defined(invoker.provider_configurations)) { + _provider_configurations = invoker.provider_configurations + } + + _processors = [] + _enable_interface_jars_javac = true + if (defined(invoker.processors_javac)) { + _processors = invoker.processors_javac + _enable_interface_jars_javac = _processors == [] + } + + _processor_args = [] + if (defined(invoker.processor_args_javac)) { + _processor_args = invoker.processor_args_javac + } + + _additional_jar_files = [] + if (defined(invoker.additional_jar_files)) { + _additional_jar_files = invoker.additional_jar_files + } + + if (defined(invoker.enable_incremental_javac_override)) { + # Use invoker-specified override. + _enable_incremental_javac = invoker.enable_incremental_javac_override + } else { + # Default to build arg if not overridden. + _enable_incremental_javac = enable_incremental_javac + } + + _manifest_entries = [] + if (defined(invoker.manifest_entries)) { + _manifest_entries = invoker.manifest_entries + } + + _srcjar_deps = [] + if (defined(invoker.srcjar_deps)) { + _srcjar_deps += invoker.srcjar_deps + } + + _java_srcjars = [] + if (defined(invoker.srcjars)) { + _java_srcjars = invoker.srcjars + } + foreach(dep, _srcjar_deps) { + _dep_gen_dir = get_label_info(dep, "target_gen_dir") + _dep_name = get_label_info(dep, "name") + _java_srcjars += [ "$_dep_gen_dir/$_dep_name.srcjar" ] + } + + # Mark srcjar_deps as used. + assert(_srcjar_deps == [] || true) + + _javac_target_name = "${target_name}__javac" + _process_prebuilt_target_name = "${target_name}__process_prebuilt" + _ijar_target_name = "${target_name}__ijar" + _final_target_name = target_name + + _final_jar_path = invoker.jar_path + _javac_jar_path = "$target_gen_dir/$target_name.javac.jar" + _process_prebuilt_jar_path = _final_jar_path + _final_ijar_path = get_path_info(_final_jar_path, "dir") + "/" + + get_path_info(_final_jar_path, "name") + ".interface.jar" + + _emma_instrument = defined(invoker.emma_instrument) && + invoker.emma_instrument && invoker.java_files != [] + if (_emma_instrument) { + _emma_instr_target_name = "${target_name}__emma_instr" + _process_prebuilt_jar_path = + "$target_gen_dir/$target_name.process_prebuilt.jar" + } + + _rebased_build_config = rebase_path(_build_config, root_build_dir) + _rebased_jar_path = rebase_path(_javac_jar_path, root_build_dir) + + action(_javac_target_name) { + script = "//build/android/gyp/javac.py" + depfile = "$target_gen_dir/$target_name.d" + deps = _srcjar_deps + if (defined(invoker.deps)) { + deps += invoker.deps + } + + outputs = [ + _javac_jar_path, + _javac_jar_path + ".md5.stamp", + ] + sources = invoker.java_files + _java_srcjars + inputs = [ + _build_config, + ] + if (invoker.java_files != []) { + inputs += [ invoker.java_sources_file ] + } + + _rebased_java_srcjars = rebase_path(_java_srcjars, root_build_dir) + _rebased_depfile = rebase_path(depfile, root_build_dir) + args = [ + "--depfile=$_rebased_depfile", + "--jar-path=$_rebased_jar_path", + "--java-srcjars=$_rebased_java_srcjars", + "--java-srcjars=@FileArg($_rebased_build_config:javac:srcjars)", + ] + if (_enable_interface_jars_javac) { + args += [ "--classpath=@FileArg($_rebased_build_config:javac:interface_classpath)" ] + } else { + args += + [ "--classpath=@FileArg($_rebased_build_config:javac:classpath)" ] + } + if (_enable_incremental_javac) { + args += [ "--incremental" ] + deps += [ "//third_party/jmake($default_toolchain)" ] + inputs += [ "$root_build_dir/bin/jmake" ] + outputs += [ "${_javac_jar_path}.pdb" ] + } + if (_requires_android) { + if (defined(invoker.alternative_android_sdk_ijar)) { + deps += [ invoker.alternative_android_sdk_ijar_dep ] + _android_sdk_ijar = invoker.alternative_android_sdk_ijar + } else { + deps += [ "//build/android:android_ijar" ] + _android_sdk_ijar = "$root_out_dir/lib.java/android.interface.jar" + } + inputs += [ _android_sdk_ijar ] + _rebased_android_sdk_ijar = + rebase_path(_android_sdk_ijar, root_build_dir) + args += [ "--bootclasspath=$_rebased_android_sdk_ijar" ] + } + if (use_java8) { + args += [ "--java-version=1.8" ] + } else if (_supports_android) { + args += [ "--java-version=1.7" ] + } + foreach(e, _manifest_entries) { + args += [ "--manifest-entry=" + e ] + } + if (_chromium_code) { + args += [ "--chromium-code=1" ] + } + if (_enable_errorprone) { + deps += [ "//third_party/errorprone:chromium_errorprone" ] + args += [ + "--use-errorprone-path", + "bin/chromium_errorprone", + ] + } + foreach(e, _provider_configurations) { + args += [ "--provider-configuration=" + rebase_path(e, root_build_dir) ] + } + foreach(e, _processors) { + args += [ "--processor=" + e ] + } + foreach(e, _processor_args) { + args += [ "--processor-arg=" + e ] + } + foreach(file_tuple, _additional_jar_files) { + # Each element is of length two, [ path_to_file, path_to_put_in_jar ] + inputs += [ file_tuple[0] ] + args += + [ "--additional-jar-file=" + file_tuple[0] + ":" + file_tuple[1] ] + } + if (invoker.java_files != []) { + args += [ "@" + rebase_path(invoker.java_sources_file, root_build_dir) ] + } + } + + process_java_prebuilt(_process_prebuilt_target_name) { + forward_variables_from(invoker, + [ + "jar_excluded_patterns", + "proguard_preprocess", + "proguard_preprocess_config", + ]) + supports_android = _supports_android + build_config = _build_config + input_jar_path = _javac_jar_path + output_jar_path = _process_prebuilt_jar_path + + deps = [ + ":$_javac_target_name", + ] + if (defined(invoker.deps)) { + deps += invoker.deps + } + } + + if (_emma_instrument) { + emma_instr(_emma_instr_target_name) { + forward_variables_from(invoker, + [ + "deps", + "java_files", + "java_sources_file", + ]) + + input_jar_path = _process_prebuilt_jar_path + output_jar_path = _final_jar_path + + if (!defined(deps)) { + deps = [] + } + deps += [ ":$_process_prebuilt_target_name" ] + } + } + + generate_interface_jar(_ijar_target_name) { + if (!defined(invoker.proguard_preprocess) || + !invoker.proguard_preprocess) { + # Always used the unfiltered .jar to create the interface jar so that + # other targets will resolve filtered classes when depending on + # BuildConfig, NativeLibraries, etc. + input_jar = _javac_jar_path + deps = [ + ":$_javac_target_name", + ] + } else { + # However, still apply pre-proguarding, since ignoring that can break + # compiles. + input_jar = _process_prebuilt_jar_path + deps = [ + ":$_process_prebuilt_target_name", + ] + } + output_jar = _final_ijar_path + } + + group(_final_target_name) { + forward_variables_from(invoker, [ "visibility" ]) + public_deps = [ + ":$_ijar_target_name", + ] + if (_emma_instrument) { + public_deps += [ ":$_emma_instr_target_name" ] + } else { + public_deps += [ ":$_process_prebuilt_target_name" ] + } + } + } + + template("java_library_impl") { + set_sources_assignment_filter([]) + forward_variables_from(invoker, [ "testonly" ]) + _accumulated_deps = [] + if (defined(invoker.deps)) { + _accumulated_deps = invoker.deps + } + + assert(defined(invoker.java_files) || defined(invoker.srcjars) || + defined(invoker.srcjar_deps)) + _base_path = "$target_gen_dir/$target_name" + + if (defined(invoker.output_name)) { + _output_name = invoker.output_name + } else { + _output_name = target_name + } + + # Jar files can be needed at runtime (by Robolectric tests or java binaries), + # so do not put them under gen/. + target_dir_name = get_label_info(":$target_name", "dir") + _jar_path = "$root_out_dir/lib.java$target_dir_name/$_output_name.jar" + if (defined(invoker.jar_path)) { + _jar_path = invoker.jar_path + } + _template_name = target_name + + _final_deps = [] + + _supports_android = + defined(invoker.supports_android) && invoker.supports_android + _requires_android = + defined(invoker.requires_android) && invoker.requires_android + assert(_requires_android || true) # Mark as used. + _android_manifest = "//build/android/AndroidManifest.xml" + if (defined(invoker.android_manifest)) { + _android_manifest = invoker.android_manifest + } + assert(_android_manifest != "") # Mark as used. + + if (defined(invoker.run_findbugs_override)) { + _run_findbugs = invoker.run_findbugs_override + } else { + _run_findbugs = run_findbugs # Default to build arg if not overridden. + } + assert(_run_findbugs || true) # Mark as used. + + # Don't enable coverage, lint, findbugs unless the target has some + # non-generated files. + if (defined(invoker.chromium_code)) { + _chromium_code = invoker.chromium_code + } else { + _chromium_code = defined(invoker.java_files) && invoker.java_files != [] + if (_chromium_code) { + # Make chromium_code = false be the default for targets within + # third_party which contain no chromium-namespaced java files. + set_sources_assignment_filter([ "*\bthird_party\b*" ]) + sources = [ + get_label_info(":$target_name", "dir"), + ] + if (sources == []) { + set_sources_assignment_filter([ "*\bchromium\b*" ]) + sources = invoker.java_files + _chromium_code = invoker.java_files != sources + } + set_sources_assignment_filter([]) + sources = [] + } + } + + _emma_never_instrument = !_chromium_code + if (defined(invoker.emma_never_instrument)) { + _emma_never_instrument = invoker.emma_never_instrument + } + assert(_emma_never_instrument || true) # Mark as used + _emma_instrument = emma_coverage && !_emma_never_instrument + + if (_supports_android) { + _dex_path = _base_path + ".dex.jar" + if (defined(invoker.dex_path)) { + _dex_path = invoker.dex_path + } + } + + _java_files = [] + if (defined(invoker.java_files)) { + _java_files += invoker.java_files + } + if (_java_files != []) { + _java_sources_file = "$_base_path.sources" + write_file(_java_sources_file, rebase_path(_java_files, root_build_dir)) + } + + # Define build_config_deps which will be a list of targets required to + # build the _build_config. + if (defined(invoker.override_build_config)) { + _build_config = invoker.override_build_config + } else { + _build_config = _base_path + ".build_config" + build_config_target_name = "${_template_name}__build_config" + + write_build_config(build_config_target_name) { + forward_variables_from(invoker, + [ + "gradle_treat_as_prebuilt", + "input_jars_paths", + "main_class", + "proguard_configs", + ]) + if (defined(invoker.is_java_binary) && invoker.is_java_binary) { + type = "java_binary" + } else { + type = "java_library" + } + if (defined(invoker.deps)) { + possible_config_deps = invoker.deps + } + supports_android = _supports_android + requires_android = _requires_android + bypass_platform_checks = defined(invoker.bypass_platform_checks) && + invoker.bypass_platform_checks + + build_config = _build_config + jar_path = _jar_path + if (_supports_android) { + dex_path = _dex_path + } + if (_java_files != []) { + java_sources_file = _java_sources_file + } + + if (defined(invoker.srcjar_deps)) { + bundled_srcjars = [] + foreach(d, invoker.srcjar_deps) { + _dep_gen_dir = get_label_info(d, "target_gen_dir") + _dep_name = get_label_info(d, "name") + bundled_srcjars += [ "$_dep_gen_dir/$_dep_name.srcjar" ] + } + } + } + _accumulated_deps += [ ":$build_config_target_name" ] + } + + _srcjar_deps = [] + if (defined(invoker.srcjar_deps)) { + _srcjar_deps = invoker.srcjar_deps + } + + _srcjars = [] + if (defined(invoker.srcjars)) { + _srcjars = invoker.srcjars + } + + assert(_java_files != [] || _srcjar_deps != [] || _srcjars != []) + + _compile_java_target = "${_template_name}__compile_java" + _final_deps += [ ":$_compile_java_target" ] + compile_java(_compile_java_target) { + forward_variables_from(invoker, + [ + "additional_jar_files", + "alternative_android_sdk_ijar", + "alternative_android_sdk_ijar_dep", + "dist_jar_path", + "enable_errorprone", + "enable_incremental_javac_override", + "jar_excluded_patterns", + "manifest_entries", + "processors_javac", + "processor_args_javac", + "proguard_preprocess_config", + "proguard_preprocess", + "provider_configurations", + ]) + jar_path = _jar_path + build_config = _build_config + java_files = _java_files + if (_java_files != []) { + java_sources_file = _java_sources_file + } + srcjar_deps = _srcjar_deps + srcjars = _srcjars + chromium_code = _chromium_code + supports_android = _supports_android + requires_android = _requires_android + emma_instrument = _emma_instrument + deps = _accumulated_deps + } + _accumulated_deps += [ ":$_compile_java_target" ] + assert(_accumulated_deps != []) # Mark used. + + if (defined(invoker.main_class)) { + # Targets might use the generated script while building, so make it a dep + # rather than a data_dep. + _final_deps += [ ":${_template_name}__java_binary_script" ] + java_binary_script("${_template_name}__java_binary_script") { + forward_variables_from(invoker, + [ + "bootclasspath", + "main_class", + "wrapper_script_args", + ]) + build_config = _build_config + jar_path = _jar_path + script_name = _template_name + if (defined(invoker.wrapper_script_name)) { + script_name = invoker.wrapper_script_name + } + deps = _accumulated_deps + } + } + + _has_lint_target = false + if (_supports_android) { + if (_chromium_code) { + _has_lint_target = true + android_lint("${_template_name}__lint") { + android_manifest = _android_manifest + build_config = _build_config + jar_path = _jar_path + java_files = _java_files + if (_java_files != []) { + java_sources_file = _java_sources_file + } + deps = _accumulated_deps + } + + if (_run_findbugs) { + findbugs("${_template_name}__findbugs") { + build_config = _build_config + jar_path = _jar_path + deps = _accumulated_deps + } + } + + # Use an intermediate group() rather as the data_deps target in order to + # avoid lint artifacts showing up as runtime_deps (while still having lint + # run in parallel to other targets). + group("${_template_name}__analysis") { + public_deps = [ + ":${_template_name}__lint", + ] + if (_run_findbugs) { + public_deps += [ ":${_template_name}__findbugs" ] + } + } + } + + _final_deps += [ ":${_template_name}__dex" ] + dex("${_template_name}__dex") { + sources = [ + _jar_path, + ] + output = _dex_path + deps = [ + ":$_compile_java_target", + ] + } + } + + group(target_name) { + forward_variables_from(invoker, + [ + "data", + "data_deps", + "visibility", + ]) + if (!defined(data_deps)) { + data_deps = [] + } + public_deps = _final_deps + if (_has_lint_target) { + data_deps += [ ":${_template_name}__analysis" ] + } + } + } + + # Runs process_resources.py + template("process_resources") { + set_sources_assignment_filter([]) + forward_variables_from(invoker, [ "testonly" ]) + + zip_path = invoker.zip_path + srcjar_path = invoker.srcjar_path + r_text_path = invoker.r_text_path + build_config = invoker.build_config + android_manifest = invoker.android_manifest + + non_constant_id = true + if (defined(invoker.generate_constant_ids) && + invoker.generate_constant_ids) { + non_constant_id = false + } + + action(target_name) { + forward_variables_from(invoker, + [ + "deps", + "visibility", + ]) + script = "//build/android/gyp/process_resources.py" + + depfile = "$target_gen_dir/$target_name.d" + outputs = [ + zip_path, + srcjar_path, + r_text_path, + ] + + _all_resource_dirs = [] + sources = [] + + if (defined(invoker.resource_dirs)) { + _all_resource_dirs += invoker.resource_dirs + + # Speed up "gn gen" by short-circuiting the empty directory. + if (invoker.resource_dirs != [ "//build/android/ant/empty/res" ] && + invoker.resource_dirs != []) { + _sources_build_rel = + exec_script("//build/android/gyp/find.py", + rebase_path(invoker.resource_dirs, root_build_dir), + "list lines") + sources += rebase_path(_sources_build_rel, ".", root_build_dir) + } + } + + if (defined(invoker.generated_resource_dirs)) { + assert(defined(invoker.generated_resource_files)) + _all_resource_dirs += invoker.generated_resource_dirs + sources += invoker.generated_resource_files + } + + inputs = [ + build_config, + android_manifest, + ] + + _rebased_all_resource_dirs = + rebase_path(_all_resource_dirs, root_build_dir) + rebase_build_config = rebase_path(build_config, root_build_dir) + + if (defined(invoker.android_aapt_path)) { + _android_aapt_path = invoker.android_aapt_path + } else { + _android_aapt_path = android_default_aapt_path + } + + if (defined(invoker.alternative_android_sdk_jar)) { + _rebased_android_sdk_jar = + rebase_path(invoker.alternative_android_sdk_jar) + } else { + _rebased_android_sdk_jar = rebased_android_sdk_jar + } + + args = [ + "--depfile", + rebase_path(depfile, root_build_dir), + "--android-sdk-jar", + _rebased_android_sdk_jar, + "--aapt-path", + _android_aapt_path, + "--android-manifest", + rebase_path(android_manifest, root_build_dir), + "--resource-dirs=$_rebased_all_resource_dirs", + "--srcjar-out", + rebase_path(srcjar_path, root_build_dir), + "--resource-zip-out", + rebase_path(zip_path, root_build_dir), + "--r-text-out", + rebase_path(r_text_path, root_build_dir), + "--dependencies-res-zips=@FileArg($rebase_build_config:resources:dependency_zips)", + "--extra-res-packages=@FileArg($rebase_build_config:resources:extra_package_names)", + "--extra-r-text-files=@FileArg($rebase_build_config:resources:extra_r_text_files)", + ] + + if (non_constant_id) { + args += [ "--non-constant-id" ] + } + + if (defined(invoker.custom_package)) { + args += [ + "--custom-package", + invoker.custom_package, + ] + } + + if (defined(invoker.v14_skip) && invoker.v14_skip) { + args += [ "--v14-skip" ] + } + + if (defined(invoker.shared_resources) && invoker.shared_resources) { + args += [ "--shared-resources" ] + } + + if (defined(invoker.app_as_shared_lib) && invoker.app_as_shared_lib) { + args += [ "--app-as-shared-lib" ] + } + + if (defined(invoker.include_all_resources) && + invoker.include_all_resources) { + args += [ "--include-all-resources" ] + } + + if (defined(invoker.all_resources_zip_path)) { + all_resources_zip = invoker.all_resources_zip_path + outputs += [ all_resources_zip ] + args += [ + "--all-resources-zip-out", + rebase_path(all_resources_zip, root_build_dir), + ] + } + + if (defined(invoker.proguard_file)) { + outputs += [ invoker.proguard_file ] + args += [ + "--proguard-file", + rebase_path(invoker.proguard_file, root_build_dir), + ] + } + + if (defined(invoker.args)) { + args += invoker.args + } + } + } + + # Produces a single .dex.jar out of a set of Java dependencies. + template("deps_dex") { + set_sources_assignment_filter([]) + build_config = "$target_gen_dir/${target_name}.build_config" + build_config_target_name = "${target_name}__build_config" + + write_build_config(build_config_target_name) { + forward_variables_from(invoker, [ "dex_path" ]) + if (defined(invoker.deps)) { + possible_config_deps = invoker.deps + } + type = "deps_dex" + build_config = build_config + } + + rebased_build_config = rebase_path(build_config, root_build_dir) + dex(target_name) { + inputs = [ + build_config, + ] + output = invoker.dex_path + dex_arg_key = "${rebased_build_config}:final_dex:dependency_dex_files" + args = [ "--inputs=@FileArg($dex_arg_key)" ] + if (defined(invoker.excluded_jars)) { + excluded_jars = rebase_path(invoker.excluded_jars, root_build_dir) + args += [ "--excluded-paths=${excluded_jars}" ] + } + deps = [ + ":$build_config_target_name", + ] + } + } + + # Creates an AndroidManifest.xml for an APK split. + template("generate_split_manifest") { + assert(defined(invoker.main_manifest)) + assert(defined(invoker.out_manifest)) + assert(defined(invoker.split_name)) + + action(target_name) { + forward_variables_from(invoker, + [ + "deps", + "testonly", + ]) + depfile = "$target_gen_dir/$target_name.d" + args = [ + "--main-manifest", + rebase_path(invoker.main_manifest, root_build_dir), + "--out-manifest", + rebase_path(invoker.out_manifest, root_build_dir), + "--split", + invoker.split_name, + ] + if (defined(invoker.version_code)) { + args += [ + "--version-code", + invoker.version_code, + ] + } + if (defined(invoker.version_name)) { + args += [ + "--version-name", + invoker.version_name, + ] + } + if (defined(invoker.has_code)) { + args += [ + "--has-code", + invoker.has_code, + ] + } + args += [ + "--depfile", + rebase_path(depfile, root_build_dir), + ] + + script = "//build/android/gyp/generate_split_manifest.py" + outputs = [ + invoker.out_manifest, + ] + inputs = [ + invoker.main_manifest, + ] + } + } + + template("pack_relocation_section") { + assert(defined(invoker.file_list_json)) + assert(defined(invoker.libraries_filearg)) + action(target_name) { + forward_variables_from(invoker, + [ + "deps", + "public_deps", + "inputs", + "testonly", + ]) + script = "//build/android/gyp/pack_relocations.py" + depfile = "$target_gen_dir/$target_name.d" + _packed_libraries_dir = "$target_gen_dir/$target_name/packed-libs" + outputs = [ + invoker.file_list_json, + ] + deps += [ relocation_packer_target ] + + args = [ + "--depfile", + rebase_path(depfile, root_build_dir), + "--enable-packing=1", + "--android-pack-relocations", + rebase_path(relocation_packer_exe, root_build_dir), + "--stripped-libraries-dir", + rebase_path(root_build_dir, root_build_dir), + "--packed-libraries-dir", + rebase_path(_packed_libraries_dir, root_build_dir), + "--libraries=${invoker.libraries_filearg}", + "--filelistjson", + rebase_path(invoker.file_list_json, root_build_dir), + ] + } + } +} diff --git a/samples/GN/ios-rules.gni b/samples/GN/ios-rules.gni new file mode 100644 index 0000000000..d641363382 --- /dev/null +++ b/samples/GN/ios-rules.gni @@ -0,0 +1,1422 @@ +# Copyright 2015 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/ios/ios_sdk.gni") +import("//build/config/mac/base_rules.gni") +import("//build/config/mac/symbols.gni") +import("//build/toolchain/toolchain.gni") + +# Invokes lipo on multiple arch-specific binaries to create a fat binary. +# +# Arguments +# +# arch_binary_target +# name of the target generating the arch-specific binaries, they must +# be named $target_out_dir/$toolchain_cpu/$arch_binary_output. +# +# arch_binary_output +# (optional, defaults to the name of $arch_binary_target) base name of +# the arch-specific binary generated by arch_binary_target. +# +# output_name +# (optional, defaults to $target_name) base name of the target output, +# the full path will be $target_out_dir/$output_name. +# +# configs +# (optional) a list of configurations, this is used to check whether +# the binary should be stripped, when "enable_stripping" is true. +# +template("lipo_binary") { + assert(defined(invoker.arch_binary_target), + "arch_binary_target must be defined for $target_name") + + _target_name = target_name + _output_name = target_name + if (defined(invoker.output_name)) { + _output_name = invoker.output_name + } + + _all_target_cpu = [ current_cpu ] + additional_target_cpus + _all_toolchains = [ current_toolchain ] + additional_toolchains + + _arch_binary_target = invoker.arch_binary_target + _arch_binary_output = get_label_info(_arch_binary_target, "name") + if (defined(invoker.arch_binary_output)) { + _arch_binary_output = invoker.arch_binary_output + } + + action(_target_name) { + forward_variables_from(invoker, + "*", + [ + "arch_binary_output", + "arch_binary_target", + "configs", + "output_name", + ]) + + script = "//build/toolchain/mac/linker_driver.py" + + outputs = [ + "$target_out_dir/$_output_name", + ] + + deps = [] + _index = 0 + inputs = [] + foreach(_cpu, _all_target_cpu) { + _toolchain = _all_toolchains[_index] + _index = _index + 1 + + inputs += + [ get_label_info("$_arch_binary_target($_toolchain)", + "target_out_dir") + "/$_cpu/$_arch_binary_output" ] + + deps += [ "$_arch_binary_target($_toolchain)" ] + } + + args = [] + if (!use_system_xcode) { + args += [ + "--developer_dir", + hermetic_xcode_path, + ] + } + args += [ + "xcrun", + "lipo", + "-create", + "-output", + rebase_path("$target_out_dir/$_output_name", root_build_dir), + ] + rebase_path(inputs, root_build_dir) + + if (enable_dsyms) { + _dsyms_output_dir = "$root_out_dir/$_output_name.dSYM" + outputs += [ + "$_dsyms_output_dir/", + "$_dsyms_output_dir/Contents/Info.plist", + "$_dsyms_output_dir/Contents/Resources/DWARF/$_output_name", + ] + args += [ "-Wcrl,dsym," + rebase_path("$root_out_dir/.", root_build_dir) ] + } + + if (enable_stripping) { + # Check whether //build/config/mac:strip_all has been removed from the + # configs variables (as this is how stripping is disabled for a single + # target). + _strip_all_in_config = false + if (defined(invoker.configs)) { + foreach(_config, invoker.configs) { + if (_config == "//build/config/mac:strip_all") { + _strip_all_in_config = true + } + } + } + + if (_strip_all_in_config) { + args += [ "-Wcrl,strip,-x,-S" ] + if (save_unstripped_output) { + outputs += [ "$root_out_dir/$_output_name.unstripped" ] + args += [ "-Wcrl,unstripped," + + rebase_path("$root_out_dir/.", root_build_dir) ] + } + } + } + } +} + +# Wrapper around create_bundle taking care of code signature settings. +# +# Arguments +# +# product_type +# string, product type for the generated Xcode project. +# +# bundle_deps +# (optional) list of additional dependencies +# +# bundle_deps_filter +# (optional) list of dependencies to filter (for more information +# see "gn help bundle_deps_filter") +# +# bundle_extension +# string, extension of the bundle, used to generate bundle name. +# +# bundle_binary_target +# string, label of the target generating the bundle main binary. +# +# bundle_binary_output +# (optional) string, base name of the binary generated by the +# bundle_binary_target target, defaults to the target name. +# +# extra_system_frameworks +# (optional) list of system framework to copy to the bundle. +# +# enable_code_signing +# (optional) boolean, control whether code signing is enabled or not, +# default to ios_enable_code_signing if not defined. +# +# entitlements_path: +# (optional) path to the template to use to generate the application +# entitlements by performing variable substitutions, defaults to +# //build/config/ios/entitlements.plist. +# +# entitlements_target: +# (optional) label of the target generating the application +# entitlements (must generate a single file as output); cannot be +# defined if entitlements_path is set. +# +template("create_signed_bundle") { + assert(defined(invoker.product_type), + "product_type must be defined for $target_name") + assert(defined(invoker.bundle_extension), + "bundle_extension must be defined for $target_name") + assert(defined(invoker.bundle_binary_target), + "bundle_binary_target must be defined for $target_name") + + _target_name = target_name + _output_name = target_name + if (defined(invoker.output_name)) { + _output_name = invoker.output_name + } + + _bundle_binary_target = invoker.bundle_binary_target + _bundle_binary_output = get_label_info(_bundle_binary_target, "name") + if (defined(invoker.bundle_binary_output)) { + _bundle_binary_output = invoker.bundle_binary_output + } + + _bundle_extension = invoker.bundle_extension + _bundle_root_dir = "$root_out_dir/$_output_name$_bundle_extension" + + if (!defined(invoker.entitlements_target)) { + _entitlements_path = "//build/config/ios/entitlements.plist" + if (defined(invoker.entitlements_path)) { + _entitlements_path = invoker.entitlements_path + } + } else { + assert(!defined(invoker.entitlements_path), + "Cannot define both entitlements_path and entitlements_target " + + "for $target_name") + + _entitlements_target_outputs = + get_target_outputs(invoker.entitlements_target) + _entitlements_path = _entitlements_target_outputs[0] + } + + _enable_code_signing = ios_enable_code_signing + if (defined(invoker.enable_code_signing)) { + _enable_code_signing = invoker.enable_code_signing + } + + create_bundle(_target_name) { + forward_variables_from(invoker, + [ + "bundle_deps_filter", + "data_deps", + "deps", + "product_type", + "public_configs", + "public_deps", + "testonly", + "visibility", + ]) + + bundle_root_dir = _bundle_root_dir + bundle_resources_dir = _bundle_root_dir + bundle_executable_dir = _bundle_root_dir + bundle_plugins_dir = "$_bundle_root_dir/PlugIns" + + if (!defined(public_deps)) { + public_deps = [] + } + public_deps += [ _bundle_binary_target ] + + if (defined(invoker.bundle_deps)) { + if (!defined(deps)) { + deps = [] + } + deps += invoker.bundle_deps + } + if (defined(invoker.entitlements_target)) { + if (!defined(deps)) { + deps = [] + } + deps += [ invoker.entitlements_target ] + } + + code_signing_script = "//build/config/ios/codesign.py" + code_signing_sources = [ + _entitlements_path, + get_label_info(_bundle_binary_target, "target_out_dir") + + "/$_bundle_binary_output", + ] + code_signing_outputs = [ "$_bundle_root_dir/$_output_name" ] + if (_enable_code_signing) { + code_signing_outputs += + [ "$_bundle_root_dir/_CodeSignature/CodeResources" ] + } + if (ios_code_signing_identity != "" && !use_ios_simulator) { + code_signing_outputs += [ "$_bundle_root_dir/embedded.mobileprovision" ] + } + + if (defined(invoker.extra_system_frameworks)) { + foreach(_framework, invoker.extra_system_frameworks) { + code_signing_outputs += [ "$bundle_root_dir/Frameworks/" + + get_path_info(_framework, "file") ] + } + } + + code_signing_args = [] + if (!use_system_xcode) { + code_signing_args += [ + "--developer_dir", + hermetic_xcode_path, + ] + } + code_signing_args += [ + "code-sign-bundle", + "-t=" + ios_sdk_name, + "-i=" + ios_code_signing_identity, + "-e=" + rebase_path(_entitlements_path, root_build_dir), + "-b=" + rebase_path("$target_out_dir/$_output_name", root_build_dir), + rebase_path(bundle_root_dir, root_build_dir), + ] + if (!_enable_code_signing) { + code_signing_args += [ "--disable-code-signature" ] + } + if (defined(invoker.extra_system_frameworks)) { + # All framework in extra_system_frameworks are expected to be + # system framework and the path to be already system absolute + # so do not use rebase_path here. + foreach(_framework, invoker.extra_system_frameworks) { + code_signing_args += [ "-F=" + _framework ] + } + } + } +} + +# Generates Info.plist files for Mac apps and frameworks. +# +# Arguments +# +# info_plist: +# (optional) string, path to the Info.plist file that will be used for +# the bundle. +# +# info_plist_target: +# (optional) string, if the info_plist is generated from an action, +# rather than a regular source file, specify the target name in lieu +# of info_plist. The two arguments are mutually exclusive. +# +# executable_name: +# string, name of the generated target used for the product +# and executable name as specified in the output Info.plist. +# +# extra_substitutions: +# (optional) string array, 'key=value' pairs for extra fields which are +# specified in a source Info.plist template. +template("ios_info_plist") { + assert(defined(invoker.info_plist) != defined(invoker.info_plist_target), + "Only one of info_plist or info_plist_target may be specified in " + + target_name) + + if (defined(invoker.info_plist)) { + _info_plist = invoker.info_plist + } else { + _info_plist_target_output = get_target_outputs(invoker.info_plist_target) + _info_plist = _info_plist_target_output[0] + } + + info_plist(target_name) { + format = "binary1" + extra_substitutions = [] + if (defined(invoker.extra_substitutions)) { + extra_substitutions = invoker.extra_substitutions + } + extra_substitutions += [ + "IOS_BUNDLE_ID_PREFIX=$ios_app_bundle_id_prefix", + "IOS_DEPLOYMENT_TARGET=$ios_deployment_target", + "IOS_PLATFORM_BUILD=$ios_platform_build", + "IOS_PLATFORM_NAME=$ios_sdk_name", + "IOS_PLATFORM_VERSION=$ios_sdk_version", + "IOS_SDK_BUILD=$ios_sdk_build", + "IOS_SDK_NAME=$ios_sdk_name$ios_sdk_version", + "IOS_SUPPORTED_PLATFORM=$ios_sdk_platform", + ] + plist_templates = [ + "//build/config/ios/BuildInfo.plist", + _info_plist, + ] + if (defined(invoker.info_plist_target)) { + deps = [ + invoker.info_plist_target, + ] + } + forward_variables_from(invoker, + [ + "executable_name", + "output_name", + "visibility", + ]) + } +} + +# Template to build an application bundle for iOS. +# +# This should be used instead of "executable" built-in target type on iOS. +# As the template forward the generation of the application executable to +# an "executable" target, all arguments supported by "executable" targets +# are also supported by this template. +# +# Arguments +# +# output_name: +# (optional) string, name of the generated application, if omitted, +# defaults to the target_name. +# +# extra_substitutions: +# (optional) list of string in "key=value" format, each value will +# be used as an additional variable substitution rule when generating +# the application Info.plist +# +# info_plist: +# (optional) string, path to the Info.plist file that will be used for +# the bundle. +# +# info_plist_target: +# (optional) string, if the info_plist is generated from an action, +# rather than a regular source file, specify the target name in lieu +# of info_plist. The two arguments are mutually exclusive. +# +# entitlements_path: +# (optional) path to the template to use to generate the application +# entitlements by performing variable substitutions, defaults to +# //build/config/ios/entitlements.plist. +# +# entitlements_target: +# (optional) label of the target generating the application +# entitlements (must generate a single file as output); cannot be +# defined if entitlements_path is set. +# +# bundle_extension: +# (optional) bundle extension including the dot, default to ".app". +# +# product_type +# (optional) string, product type for the generated Xcode project, +# default to "com.apple.product-type.application". Should generally +# not be overridden. +# +# enable_code_signing +# (optional) boolean, control whether code signing is enabled or not, +# default to ios_enable_code_signing if not defined. +# +# For more information, see "gn help executable". +template("ios_app_bundle") { + _output_name = target_name + _target_name = target_name + if (defined(invoker.output_name)) { + _output_name = invoker.output_name + } + + _arch_executable_source = _target_name + "_arch_executable_sources" + _arch_executable_target = _target_name + "_arch_executable" + _lipo_executable_target = _target_name + "_executable" + + source_set(_arch_executable_source) { + forward_variables_from(invoker, + "*", + [ + "bundle_deps", + "bundle_deps_filter", + "bundle_extension", + "enable_code_signing", + "entitlements_path", + "entitlements_target", + "extra_substitutions", + "extra_system_frameworks", + "info_plist", + "info_plist_target", + "output_name", + "product_type", + "visibility", + ]) + + visibility = [ ":$_arch_executable_target" ] + } + + if (current_toolchain == default_toolchain || use_ios_simulator) { + _generate_entitlements_target = _target_name + "_gen_entitlements" + _generate_entitlements_output = + get_label_info(":$_generate_entitlements_target($default_toolchain)", + "target_out_dir") + "/$_output_name.xcent" + } + + executable(_arch_executable_target) { + forward_variables_from(invoker, + "*", + [ + "bundle_deps", + "bundle_deps_filter", + "bundle_extension", + "enable_code_signing", + "entitlements_path", + "entitlements_target", + "extra_substitutions", + "extra_system_frameworks", + "info_plist", + "info_plist_target", + "output_name", + "product_type", + "sources", + "visibility", + ]) + + visibility = [ ":$_lipo_executable_target($default_toolchain)" ] + if (current_toolchain != default_toolchain) { + visibility += [ ":$_target_name" ] + } + + if (!defined(deps)) { + deps = [] + } + deps += [ ":$_arch_executable_source" ] + + if (!defined(libs)) { + libs = [] + } + libs += [ "UIKit.framework" ] + + if (!defined(ldflags)) { + ldflags = [] + } + ldflags += [ + "-Xlinker", + "-rpath", + "-Xlinker", + "@executable_path/Frameworks", + "-Xlinker", + "-objc_abi_version", + "-Xlinker", + "2", + ] + + if (use_ios_simulator) { + deps += [ ":$_generate_entitlements_target($default_toolchain)" ] + + if (!defined(inputs)) { + inputs = [] + } + inputs += [ _generate_entitlements_output ] + + if (!defined(ldflags)) { + ldflags = [] + } + ldflags += [ + "-Xlinker", + "-sectcreate", + "-Xlinker", + "__TEXT", + "-Xlinker", + "__entitlements", + "-Xlinker", + rebase_path(_generate_entitlements_output, root_build_dir), + ] + } + + output_name = _output_name + output_prefix_override = true + output_dir = "$target_out_dir/$current_cpu" + } + + if (current_toolchain != default_toolchain) { + # For fat builds, only the default toolchain will generate an application + # bundle. For the other toolchains, the template is only used for building + # the arch-specific binary, thus the default target is just a group(). + + group(_target_name) { + forward_variables_from(invoker, + [ + "visibility", + "testonly", + ]) + public_deps = [ + ":$_arch_executable_target", + ] + } + } else { + lipo_binary(_lipo_executable_target) { + forward_variables_from(invoker, + [ + "configs", + "testonly", + ]) + + visibility = [ ":$_target_name" ] + output_name = _output_name + arch_binary_target = ":$_arch_executable_target" + arch_binary_output = _output_name + } + + _generate_info_plist = target_name + "_generate_info_plist" + ios_info_plist(_generate_info_plist) { + forward_variables_from(invoker, + [ + "extra_substitutions", + "info_plist", + "info_plist_target", + ]) + + executable_name = _output_name + } + + if (current_toolchain == default_toolchain) { + if (!defined(invoker.entitlements_target)) { + _entitlements_path = "//build/config/ios/entitlements.plist" + if (defined(invoker.entitlements_path)) { + _entitlements_path = invoker.entitlements_path + } + } else { + assert(!defined(invoker.entitlements_path), + "Cannot define both entitlements_path and entitlements_target" + + "for $_target_name") + + _entitlements_target_outputs = + get_target_outputs(invoker.entitlements_target) + _entitlements_path = _entitlements_target_outputs[0] + } + + action(_generate_entitlements_target) { + _gen_info_plist_outputs = get_target_outputs(":$_generate_info_plist") + _info_plist_path = _gen_info_plist_outputs[0] + + script = "//build/config/ios/codesign.py" + deps = [ + ":$_generate_info_plist", + ] + if (defined(invoker.entitlements_target)) { + deps += [ invoker.entitlements_target ] + } + sources = [ + _entitlements_path, + _info_plist_path, + ] + outputs = [ + _generate_entitlements_output, + ] + + args = [] + if (!use_system_xcode) { + args += [ + "--developer_dir", + hermetic_xcode_path, + ] + } + args += [ + "generate-entitlements", + "-e=" + rebase_path(_entitlements_path, root_build_dir), + "-p=" + rebase_path(_info_plist_path, root_build_dir), + ] + rebase_path(outputs, root_build_dir) + } + } + + _bundle_data_info_plist = target_name + "_bundle_data_info_plist" + bundle_data(_bundle_data_info_plist) { + forward_variables_from(invoker, [ "testonly" ]) + + sources = get_target_outputs(":$_generate_info_plist") + outputs = [ + "{{bundle_root_dir}}/Info.plist", + ] + public_deps = [ + ":$_generate_info_plist", + ] + } + + create_signed_bundle(_target_name) { + forward_variables_from(invoker, + [ + "bundle_deps", + "bundle_deps_filter", + "bundle_extension", + "data_deps", + "deps", + "enable_code_signing", + "entitlements_path", + "entitlements_target", + "extra_system_frameworks", + "product_type", + "public_configs", + "public_deps", + "testonly", + "visibility", + ]) + + output_name = _output_name + bundle_binary_target = ":$_lipo_executable_target" + bundle_binary_output = _output_name + + if (!defined(bundle_deps)) { + bundle_deps = [] + } + bundle_deps += [ ":$_bundle_data_info_plist" ] + + if (use_ios_simulator) { + if (!defined(data_deps)) { + data_deps = [] + } + data_deps += [ "//testing/iossim" ] + } + + if (!defined(product_type)) { + product_type = "com.apple.product-type.application" + } + + if (!defined(bundle_extension)) { + bundle_extension = ".app" + } + } + } +} + +set_defaults("ios_app_bundle") { + configs = default_executable_configs +} + +# Template to build an application extension bundle for iOS. +# +# This should be used instead of "executable" built-in target type on iOS. +# As the template forward the generation of the application executable to +# an "executable" target, all arguments supported by "executable" targets +# are also supported by this template. +# +# Arguments +# +# output_name: +# (optional) string, name of the generated application, if omitted, +# defaults to the target_name. +# +# extra_substitutions: +# (optional) list of string in "key=value" format, each value will +# be used as an additional variable substitution rule when generating +# the application Info.plist +# +# info_plist: +# (optional) string, path to the Info.plist file that will be used for +# the bundle. +# +# info_plist_target: +# (optional) string, if the info_plist is generated from an action, +# rather than a regular source file, specify the target name in lieu +# of info_plist. The two arguments are mutually exclusive. +# +# For more information, see "gn help executable". +template("ios_appex_bundle") { + ios_app_bundle(target_name) { + forward_variables_from(invoker, + "*", + [ + "bundle_extension", + "product_type", + ]) + bundle_extension = ".appex" + product_type = "com.apple.product-type.app-extension" + + # Add linker flags required for an application extension (determined by + # inspecting the link command-line when using Xcode 9.0+). + if (!defined(ldflags)) { + ldflags = [] + } + ldflags += [ + "-e", + "_NSExtensionMain", + "-fapplication-extension", + ] + } +} + +set_defaults("ios_appex_bundle") { + configs = default_executable_configs +} + +# Compile a xib or storyboard file and add it to a bundle_data so that it is +# available at runtime in the bundle. +# +# Arguments +# +# source: +# string, path of the xib or storyboard to compile. +# +# Forwards all variables to the bundle_data target. +template("bundle_data_xib") { + assert(defined(invoker.source), "source needs to be defined for $target_name") + + _source_extension = get_path_info(invoker.source, "extension") + assert(_source_extension == "xib" || _source_extension == "storyboard", + "source must be a .xib or .storyboard for $target_name") + + _target_name = target_name + _compile_xib = target_name + "_compile_xib" + + compile_xibs(_compile_xib) { + sources = [ + invoker.source, + ] + visibility = [ ":$_target_name" ] + ibtool_flags = [ + "--minimum-deployment-target", + ios_deployment_target, + "--auto-activate-custom-fonts", + "--target-device", + "iphone", + "--target-device", + "ipad", + ] + } + + bundle_data(_target_name) { + forward_variables_from(invoker, "*", [ "source" ]) + + if (!defined(public_deps)) { + public_deps = [] + } + public_deps += [ ":$_compile_xib" ] + + sources = get_target_outputs(":$_compile_xib") + + outputs = [ + "{{bundle_resources_dir}}/{{source_file_part}}", + ] + } +} + +# Compile a strings file and add it to a bundle_data so that it is available +# at runtime in the bundle. +# +# Arguments +# +# source: +# string, path of the strings file to compile. +# +# output: +# string, path of the compiled file in the final bundle. +# +# Forwards all variables to the bundle_data target. +template("bundle_data_strings") { + assert(defined(invoker.source), "source needs to be defined for $target_name") + assert(defined(invoker.output), "output needs to be defined for $target_name") + + _source_extension = get_path_info(invoker.source, "extension") + assert(_source_extension == "strings", + "source must be a .strings for $target_name") + + _target_name = target_name + _convert_target = target_name + "_compile_strings" + + convert_plist(_convert_target) { + visibility = [ ":$_target_name" ] + source = invoker.source + output = + "$target_gen_dir/$_target_name/" + get_path_info(invoker.source, "file") + format = "binary1" + } + + bundle_data(_target_name) { + forward_variables_from(invoker, + "*", + [ + "source", + "output", + ]) + + if (!defined(public_deps)) { + public_deps = [] + } + public_deps += [ ":$_convert_target" ] + + sources = get_target_outputs(":$_convert_target") + + outputs = [ + invoker.output, + ] + } +} + +# Template to package a shared library into an iOS framework bundle. +# +# By default, the bundle target this template generates does not link the +# resulting framework into anything that depends on it. If a dependency wants +# a link-time (as well as build-time) dependency on the framework bundle, +# depend against "$target_name+link". If only the build-time dependency is +# required (e.g., for copying into another bundle), then use "$target_name". +# +# Arguments +# +# output_name: +# (optional) string, name of the generated framework without the +# .framework suffix. If omitted, defaults to target_name. +# +# public_headers: +# (optional) list of paths to header file that needs to be copied +# into the framework bundle Headers subdirectory. If omitted or +# empty then the Headers subdirectory is not created. +# +# sources +# (optional) list of files. Needs to be defined and non-empty if +# public_headers is defined and non-empty. +# +# enable_code_signing +# (optional) boolean, control whether code signing is enabled or not, +# default to ios_enable_code_signing if not defined. +# +# This template provides two targets for the resulting framework bundle. The +# link-time behavior varies depending on which of the two targets below is +# added as a dependency: +# - $target_name only adds a build-time dependency. Targets that depend on +# it will not link against the framework. +# - $target_name+link adds a build-time and link-time dependency. Targets +# that depend on it will link against the framework. +# +# The build-time-only dependency is used for when a target needs to use the +# framework either only for resources, or because the target loads it at run- +# time, via dlopen() or NSBundle. The link-time dependency will cause the +# dependee to have the framework loaded by dyld at launch. +# +# Example of build-time only dependency: +# +# framework_bundle("CoreTeleportation") { +# sources = [ ... ] +# } +# +# bundle_data("core_teleportation_bundle_data") { +# deps = [ ":CoreTeleportation" ] +# sources = [ "$root_out_dir/CoreTeleportation.framework" ] +# outputs = [ "{{bundle_root_dir}}/Frameworks/{{source_file_part}}" ] +# } +# +# app_bundle("GoatTeleporter") { +# sources = [ ... ] +# deps = [ +# ":core_teleportation_bundle_data", +# ] +# } +# +# The GoatTeleporter.app will not directly link against +# CoreTeleportation.framework, but it will be included in the bundle's +# Frameworks directory. +# +# Example of link-time dependency: +# +# framework_bundle("CoreTeleportation") { +# sources = [ ... ] +# ldflags = [ +# "-install_name", +# "@executable_path/../Frameworks/$target_name.framework" +# ] +# } +# +# bundle_data("core_teleportation_bundle_data") { +# deps = [ ":CoreTeleportation+link" ] +# sources = [ "$root_out_dir/CoreTeleportation.framework" ] +# outputs = [ "{{bundle_root_dir}}/Frameworks/{{source_file_part}}" ] +# } +# +# app_bundle("GoatTeleporter") { +# sources = [ ... ] +# deps = [ +# ":core_teleportation_bundle_data", +# ] +# } +# +# Note that the framework is still copied to the app's bundle, but dyld will +# load this library when the app is launched because it uses the "+link" +# target as a dependency. This also requires that the framework set its +# install_name so that dyld can locate it. +# +# See "gn help shared_library" for more information on arguments supported +# by shared library target. +template("ios_framework_bundle") { + _target_name = target_name + _output_name = target_name + if (defined(invoker.output_name)) { + _output_name = invoker.output_name + } + + _has_public_headers = + defined(invoker.public_headers) && invoker.public_headers != [] + + if (_has_public_headers) { + _framework_headers_target = _target_name + "_framework_headers" + _framework_headers_config = _target_name + "_framework_headers_config" + _headers_map_config = _target_name + "_headers_map" + } + + _arch_shared_library_source = _target_name + "_arch_shared_library_sources" + _arch_shared_library_target = _target_name + "_arch_shared_library" + _lipo_shared_library_target = _target_name + "_shared_library" + + source_set(_arch_shared_library_source) { + forward_variables_from(invoker, + "*", + [ + "bundle_deps", + "bundle_deps_filter", + "data_deps", + "enable_code_signing", + "info_plist", + "info_plist_target", + "output_name", + "visibility", + ]) + + visibility = [ ":$_arch_shared_library_target" ] + + if (_has_public_headers) { + configs += [ + ":$_framework_headers_config($default_toolchain)", + ":$_headers_map_config($default_toolchain)", + ] + + if (!defined(deps)) { + deps = [] + } + deps += [ ":$_framework_headers_target($default_toolchain)" ] + } + } + + shared_library(_arch_shared_library_target) { + forward_variables_from(invoker, + "*", + [ + "bundle_deps", + "bundle_deps_filter", + "data_deps", + "enable_code_signing", + "info_plist", + "info_plist_target", + "output_name", + "sources", + "visibility", + ]) + + visibility = [ ":$_lipo_shared_library_target($default_toolchain)" ] + if (current_toolchain != default_toolchain) { + visibility += [ ":$_target_name" ] + } + + if (!defined(deps)) { + deps = [] + } + deps += [ ":$_arch_shared_library_source" ] + + if (!defined(ldflags)) { + ldflags = [] + } + ldflags += [ + "-Xlinker", + "-install_name", + "-Xlinker", + "@rpath/$_output_name.framework/$_output_name", + "-Xlinker", + "-objc_abi_version", + "-Xlinker", + "2", + ] + + output_extension = "" + output_name = _output_name + output_prefix_override = true + output_dir = "$target_out_dir/$current_cpu" + } + + if (current_toolchain != default_toolchain) { + # For fat builds, only the default toolchain will generate a framework + # bundle. For the other toolchains, the template is only used for building + # the arch-specific binary, thus the default target is just a group(). + + group(_target_name) { + forward_variables_from(invoker, + [ + "visibility", + "testonly", + ]) + public_deps = [ + ":$_arch_shared_library_target", + ] + } + + group(_target_name + "+link") { + forward_variables_from(invoker, + [ + "visibility", + "testonly", + ]) + public_deps = [ + ":$_target_name+link($default_toolchain)", + ] + } + + if (defined(invoker.bundle_deps)) { + assert(invoker.bundle_deps != [], "mark bundle_deps as used") + } + } else { + if (_has_public_headers) { + _public_headers = invoker.public_headers + _framework_root = "$root_out_dir/$_output_name.framework" + + _header_map_filename = "$target_gen_dir/$_output_name.headers.hmap" + + _compile_headers_map_target = _target_name + "_compile_headers_map" + action(_compile_headers_map_target) { + visibility = [ ":$_framework_headers_target" ] + script = "//build/config/ios/write_framework_hmap.py" + outputs = [ + _header_map_filename, + ] + + # The header map generation only wants the list of headers, not all of + # sources, so filter any non-header source files from "sources". It is + # less error prone that having the developer duplicate the list of all + # headers in addition to "sources". + set_sources_assignment_filter([ + "*.c", + "*.cc", + "*.cpp", + "*.m", + "*.mm", + ]) + sources = invoker.sources + set_sources_assignment_filter([]) + + args = [ + rebase_path(_header_map_filename), + rebase_path(_framework_root, root_build_dir), + ] + rebase_path(sources, root_build_dir) + } + + _create_module_map_target = _target_name + "_module_map" + action(_create_module_map_target) { + visibility = [ ":$_framework_headers_target" ] + script = "//build/config/ios/write_framework_modulemap.py" + outputs = [ + "$_framework_root/Modules/module.modulemap", + ] + args = [ rebase_path("$_framework_root", root_build_dir) ] + } + + _copy_public_headers_target = _target_name + "_copy_public_headers" + copy(_copy_public_headers_target) { + visibility = [ ":$_framework_headers_target" ] + sources = _public_headers + outputs = [ + "$_framework_root/Headers/{{source_file_part}}", + ] + } + + config(_headers_map_config) { + visibility = [ ":$_target_name" ] + include_dirs = [ _header_map_filename ] + } + + group(_framework_headers_target) { + deps = [ + ":$_compile_headers_map_target", + ":$_copy_public_headers_target", + ":$_create_module_map_target", + ] + } + + config(_framework_headers_config) { + # The link settings are inherited from the framework_bundle config. + cflags = [ + "-F", + rebase_path("$root_out_dir/.", root_build_dir), + ] + } + } + + lipo_binary(_lipo_shared_library_target) { + forward_variables_from(invoker, + [ + "configs", + "testonly", + ]) + + visibility = [ ":$_target_name" ] + output_name = _output_name + arch_binary_target = ":$_arch_shared_library_target" + arch_binary_output = _output_name + } + + _framework_public_config = _target_name + "_public_config" + config(_framework_public_config) { + # TODO(sdefresne): should we have a framework_dirs similar to lib_dirs + # and include_dirs to avoid duplicate values on the command-line. + visibility = [ ":$_target_name" ] + ldflags = [ + "-F", + rebase_path("$root_out_dir/.", root_build_dir), + ] + lib_dirs = [ root_out_dir ] + libs = [ "$_output_name.framework" ] + } + + _info_plist_target = _target_name + "_info_plist" + _info_plist_bundle = _target_name + "_info_plist_bundle" + ios_info_plist(_info_plist_target) { + visibility = [ ":$_info_plist_bundle" ] + executable_name = _output_name + forward_variables_from(invoker, + [ + "extra_substitutions", + "info_plist", + "info_plist_target", + ]) + } + + bundle_data(_info_plist_bundle) { + visibility = [ ":$_target_name" ] + forward_variables_from(invoker, [ "testonly" ]) + sources = get_target_outputs(":$_info_plist_target") + outputs = [ + "{{bundle_root_dir}}/Info.plist", + ] + public_deps = [ + ":$_info_plist_target", + ] + } + + create_signed_bundle(_target_name) { + forward_variables_from(invoker, + [ + "bundle_deps", + "bundle_deps_filter", + "data_deps", + "deps", + "enable_code_signing", + "public_configs", + "public_deps", + "testonly", + "visibility", + ]) + + product_type = "com.apple.product-type.framework" + bundle_extension = ".framework" + + output_name = _output_name + bundle_binary_target = ":$_lipo_shared_library_target" + bundle_binary_output = _output_name + + if (!defined(deps)) { + deps = [] + } + deps += [ ":$_info_plist_bundle" ] + } + + group(_target_name + "+link") { + forward_variables_from(invoker, + [ + "public_deps", + "public_configs", + "testonly", + "visibility", + ]) + if (!defined(public_deps)) { + public_deps = [] + } + public_deps += [ ":$_target_name" ] + if (!defined(public_configs)) { + public_configs = [] + } + public_configs += [ ":$_framework_public_config" ] + + if (_has_public_headers) { + public_configs += [ ":$_framework_headers_config" ] + } + } + + bundle_data(_target_name + "+bundle") { + forward_variables_from(invoker, + [ + "testonly", + "visibility", + ]) + public_deps = [ + ":$_target_name", + ] + sources = [ + "$root_out_dir/$_output_name.framework", + ] + outputs = [ + "{{bundle_resources_dir}}/Frameworks/$_output_name.framework", + ] + } + } +} + +set_defaults("ios_framework_bundle") { + configs = default_shared_library_configs +} + +# For Chrome on iOS we want to run XCTests for all our build configurations +# (Debug, Release, ...). In addition, the symbols visibility is configured to +# private by default. To simplify testing with those constraints, our tests are +# compiled in the TEST_HOST target instead of the .xctest bundle. +template("ios_xctest_test") { + _target_name = target_name + _output_name = target_name + if (defined(invoker.output_name)) { + _output_name = invoker.output_name + } + + _xctest_target = _target_name + "_module" + _xctest_output = _output_name + "_module" + + _host_target = _target_name + _host_output = _output_name + + _xctest_arch_loadable_module_target = _xctest_target + "_arch_loadable_module" + _xctest_lipo_loadable_module_target = _xctest_target + "_loadable_module" + + loadable_module(_xctest_arch_loadable_module_target) { + visibility = [ ":$_xctest_lipo_loadable_module_target($default_toolchain)" ] + if (current_toolchain != default_toolchain) { + visibility += [ ":$_xctest_target" ] + } + + sources = [ + "//build/config/ios/xctest_shell.mm", + ] + configs += [ "//build/config/ios:xctest_config" ] + + output_dir = "$target_out_dir/$current_cpu" + output_name = _xctest_output + output_prefix_override = true + output_extension = "" + } + + if (current_toolchain != default_toolchain) { + # For fat builds, only the default toolchain will generate a test bundle. + # For the other toolchains, the template is only used for building the + # arch-specific binary, thus the default target is just a group(). + group(_xctest_target) { + forward_variables_from(invoker, + [ + "visibility", + "testonly", + ]) + public_deps = [ + ":$_xctest_arch_loadable_module_target", + ] + } + } else { + _xctest_info_plist_target = _xctest_target + "_info_plist" + _xctest_info_plist_bundle = _xctest_target + "_info_plist_bundle" + ios_info_plist(_xctest_info_plist_target) { + visibility = [ ":$_xctest_info_plist_bundle" ] + info_plist = "//build/config/ios/Module-Info.plist" + extra_substitutions = [ "MODULE_NAME=$_xctest_output" ] + executable_name = _host_output + } + + bundle_data(_xctest_info_plist_bundle) { + visibility = [ ":$_xctest_target" ] + public_deps = [ + ":$_xctest_info_plist_target", + ] + sources = get_target_outputs(":$_xctest_info_plist_target") + outputs = [ + "{{bundle_root_dir}}/Info.plist", + ] + } + + lipo_binary(_xctest_lipo_loadable_module_target) { + forward_variables_from(invoker, + [ + "configs", + "testonly", + ]) + + visibility = [ ":$_xctest_target" ] + output_name = _xctest_output + arch_binary_target = ":$_xctest_arch_loadable_module_target" + arch_binary_output = _xctest_output + } + + _xctest_bundle = _xctest_target + "_bundle" + create_signed_bundle(_xctest_target) { + forward_variables_from(invoker, [ "enable_code_signing" ]) + visibility = [ ":$_xctest_bundle" ] + + product_type = "com.apple.product-type.bundle.unit-test" + bundle_extension = ".xctest" + + output_name = _xctest_output + bundle_binary_target = ":$_xctest_lipo_loadable_module_target" + bundle_binary_output = _xctest_output + + deps = [ + ":$_xctest_info_plist_bundle", + ] + } + + bundle_data(_xctest_bundle) { + visibility = [ ":$_host_target" ] + public_deps = [ + ":$_xctest_target", + ] + sources = [ + "$root_out_dir/$_xctest_output.xctest", + ] + outputs = [ + "{{bundle_plugins_dir}}/$_xctest_output.xctest", + ] + } + } + + ios_app_bundle(_host_target) { + forward_variables_from(invoker, "*", [ "testonly" ]) + + testonly = true + output_name = _host_output + configs += [ "//build/config/ios:xctest_config" ] + + if (!defined(invoker.info_plist) && !defined(invoker.info_plist_target)) { + info_plist = "//build/config/ios/Host-Info.plist" + } + + # Xcode needs those two framework installed in the application (and signed) + # for the XCTest to run, so install them using extra_system_frameworks. + _ios_platform_library = "$ios_sdk_platform_path/Developer/Library" + extra_system_frameworks = [ + "$_ios_platform_library/Frameworks/XCTest.framework", + "$_ios_platform_library/PrivateFrameworks/IDEBundleInjection.framework", + ] + + if (current_toolchain == default_toolchain) { + if (!defined(bundle_deps)) { + bundle_deps = [] + } + bundle_deps += [ ":$_xctest_bundle" ] + } + + if (!defined(ldflags)) { + ldflags = [] + } + ldflags += [ + "-Xlinker", + "-rpath", + "-Xlinker", + "@executable_path/Frameworks", + "-Xlinker", + "-rpath", + "-Xlinker", + "@loader_path/Frameworks", + ] + } +} + +set_defaults("ios_xctest_test") { + configs = default_executable_configs +} diff --git a/samples/GN/isolate.gni b/samples/GN/isolate.gni new file mode 100644 index 0000000000..3906cf60ef --- /dev/null +++ b/samples/GN/isolate.gni @@ -0,0 +1,193 @@ +# Copyright 2016 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/sanitizers/sanitizers.gni") +import("//third_party/icu/config.gni") +import("v8.gni") + +declare_args() { + # Sets the test isolation mode (noop|prepare|check). + v8_test_isolation_mode = "noop" +} + +template("v8_isolate_run") { + forward_variables_from(invoker, + "*", + [ + "deps", + "isolate", + ]) + + # Remember target name as within the action scope the target name will be + # different. + name = target_name + + assert(defined(invoker.deps)) + assert(defined(invoker.isolate)) + + if (name != "" && v8_test_isolation_mode != "noop") { + action(name + "_run") { + testonly = true + + deps = invoker.deps + + script = "//tools/isolate_driver.py" + + sources = [ + invoker.isolate, + ] + + inputs = [ + # Files that are known to be involved in this step. + "//tools/swarming_client/isolate.py", + "//tools/swarming_client/run_isolated.py", + ] + + if (v8_test_isolation_mode == "prepare") { + outputs = [ + "$root_out_dir/$name.isolated.gen.json", + ] + } else if (v8_test_isolation_mode == "check") { + outputs = [ + "$root_out_dir/$name.isolated", + "$root_out_dir/$name.isolated.state", + ] + } + + # Translate gn to gyp variables. + if (is_asan) { + asan = "1" + } else { + asan = "0" + } + if (is_msan) { + msan = "1" + } else { + msan = "0" + } + if (is_tsan) { + tsan = "1" + } else { + tsan = "0" + } + if (is_cfi) { + cfi_vptr = "1" + } else { + cfi_vptr = "0" + } + if (target_cpu == "x86") { + target_arch = "ia32" + } else { + target_arch = target_cpu + } + if (is_debug) { + configuration_name = "Debug" + } else { + configuration_name = "Release" + } + if (is_component_build) { + component = "shared_library" + } else { + component = "static_library" + } + if (icu_use_data_file) { + icu_use_data_file_flag = "1" + } else { + icu_use_data_file_flag = "0" + } + if (v8_enable_inspector) { + enable_inspector = "1" + } else { + enable_inspector = "0" + } + if (v8_use_external_startup_data) { + use_external_startup_data = "1" + } else { + use_external_startup_data = "0" + } + if (v8_use_snapshot) { + use_snapshot = "true" + } else { + use_snapshot = "false" + } + if (v8_has_valgrind) { + has_valgrind = "1" + } else { + has_valgrind = "0" + } + if (v8_gcmole) { + gcmole = "1" + } else { + gcmole = "0" + } + + # Note, all paths will be rebased in isolate_driver.py to be relative to + # the isolate file. + args = [ + v8_test_isolation_mode, + "--isolated", + rebase_path("$root_out_dir/$name.isolated", root_build_dir), + "--isolate", + rebase_path(invoker.isolate, root_build_dir), + + # Path variables are used to replace file paths when loading a .isolate + # file + "--path-variable", + "DEPTH", + rebase_path("//", root_build_dir), + "--path-variable", + "PRODUCT_DIR", + rebase_path(root_out_dir, root_build_dir), + + # TODO(machenbach): Set variables for remaining features. + "--config-variable", + "CONFIGURATION_NAME=$configuration_name", + "--config-variable", + "OS=$target_os", + "--config-variable", + "asan=$asan", + "--config-variable", + "cfi_vptr=$cfi_vptr", + "--config-variable", + "gcmole=$gcmole", + "--config-variable", + "has_valgrind=$has_valgrind", + "--config-variable", + "icu_use_data_file_flag=$icu_use_data_file_flag", + "--config-variable", + "is_gn=1", + "--config-variable", + "msan=$msan", + "--config-variable", + "tsan=$tsan", + "--config-variable", + "coverage=0", + "--config-variable", + "sanitizer_coverage=0", + "--config-variable", + "component=$component", + "--config-variable", + "target_arch=$target_arch", + "--config-variable", + "v8_enable_inspector=$enable_inspector", + "--config-variable", + "v8_use_external_startup_data=$use_external_startup_data", + "--config-variable", + "v8_use_snapshot=$use_snapshot", + ] + + if (is_win) { + args += [ + "--config-variable", + "msvs_version=2015", + ] + } else { + args += [ + "--config-variable", + "msvs_version=0", + ] + } + } + } +} diff --git a/samples/Python/filenames/.gclient b/samples/Python/filenames/.gclient new file mode 100644 index 0000000000..4d21324d08 --- /dev/null +++ b/samples/Python/filenames/.gclient @@ -0,0 +1,9 @@ +solutions = [ + { + "url": "https://chromium.googlesource.com/v8/v8.git", + "managed": False, + "name": "v8", + "deps_file": "DEPS", + "custom_deps": {}, + }, +] diff --git a/samples/Python/standalone.gypi b/samples/Python/standalone.gypi new file mode 100644 index 0000000000..d438a5aeab --- /dev/null +++ b/samples/Python/standalone.gypi @@ -0,0 +1,1522 @@ +# Copyright 2012 the V8 project authors. All rights reserved. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Definitions to be used when building stand-alone V8 binaries. + +{ + # We need to include toolchain.gypi here for third-party sources that don't + # directly include it themselves. + 'includes': ['toolchain.gypi'], + 'variables': { + 'component%': 'static_library', + 'clang_xcode%': 0, + # Track where uninitialized memory originates from. From fastest to + # slowest: 0 - no tracking, 1 - track only the initial allocation site, 2 + # - track the chain of stores leading from allocation site to use site. + 'msan_track_origins%': 2, + 'visibility%': 'hidden', + 'v8_enable_backtrace%': 0, + 'v8_enable_i18n_support%': 1, + 'v8_deprecation_warnings': 1, + 'v8_imminent_deprecation_warnings': 1, + 'msvs_multi_core_compile%': '1', + 'mac_deployment_target%': '10.7', + 'release_extra_cflags%': '', + 'v8_enable_inspector%': 0, + 'variables': { + 'variables': { + 'variables': { + 'variables': { + 'conditions': [ + ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or \ + OS=="netbsd" or OS=="mac" or OS=="qnx" or OS=="aix"', { + # This handles the Unix platforms we generally deal with. + # Anything else gets passed through, which probably won't work + # very well; such hosts should pass an explicit target_arch + # to gyp. + 'host_arch%': ' Date: Thu, 8 Dec 2016 02:20:40 +0900 Subject: [PATCH 0192/1214] Add .php_cs and .php_cs.dist (#3367) * Add .php_cs and .php_cs.dist * Move files to filenames subdir --- lib/linguist/languages.yml | 2 ++ samples/PHP/filenames/.php_cs | 37 ++++++++++++++++++++++++++++++ samples/PHP/filenames/.php_cs.dist | 37 ++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 samples/PHP/filenames/.php_cs create mode 100644 samples/PHP/filenames/.php_cs.dist diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 5af7884d19..4b4c683a0a 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3045,6 +3045,8 @@ PHP: - ".phps" - ".phpt" filenames: + - ".php_cs" + - ".php_cs.dist" - Phakefile interpreters: - php diff --git a/samples/PHP/filenames/.php_cs b/samples/PHP/filenames/.php_cs new file mode 100644 index 0000000000..b76a1c2e46 --- /dev/null +++ b/samples/PHP/filenames/.php_cs @@ -0,0 +1,37 @@ + + Dariusz Rumiński + +This source file is subject to the MIT license that is bundled +with this source code in the file LICENSE. +EOF; + +return PhpCsFixer\Config::create() + ->setRiskyAllowed(true) + ->setRules(array( + '@Symfony' => true, + '@Symfony:risky' => true, + 'combine_consecutive_unsets' => true, + 'header_comment' => array('header' => $header), + 'array_syntax' => array('syntax' => 'long'), + 'no_extra_consecutive_blank_lines' => array('break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block'), + 'no_useless_else' => true, + 'no_useless_return' => true, + 'ordered_class_elements' => true, + 'ordered_imports' => true, + 'php_unit_strict' => true, + 'phpdoc_add_missing_param_annotation' => true, + 'psr4' => true, + 'strict_comparison' => true, + 'strict_param' => true, + )) + ->setFinder( + PhpCsFixer\Finder::create() + ->exclude('tests/Fixtures') + ->in(__DIR__) + ) +; diff --git a/samples/PHP/filenames/.php_cs.dist b/samples/PHP/filenames/.php_cs.dist new file mode 100644 index 0000000000..b76a1c2e46 --- /dev/null +++ b/samples/PHP/filenames/.php_cs.dist @@ -0,0 +1,37 @@ + + Dariusz Rumiński + +This source file is subject to the MIT license that is bundled +with this source code in the file LICENSE. +EOF; + +return PhpCsFixer\Config::create() + ->setRiskyAllowed(true) + ->setRules(array( + '@Symfony' => true, + '@Symfony:risky' => true, + 'combine_consecutive_unsets' => true, + 'header_comment' => array('header' => $header), + 'array_syntax' => array('syntax' => 'long'), + 'no_extra_consecutive_blank_lines' => array('break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block'), + 'no_useless_else' => true, + 'no_useless_return' => true, + 'ordered_class_elements' => true, + 'ordered_imports' => true, + 'php_unit_strict' => true, + 'phpdoc_add_missing_param_annotation' => true, + 'psr4' => true, + 'strict_comparison' => true, + 'strict_param' => true, + )) + ->setFinder( + PhpCsFixer\Finder::create() + ->exclude('tests/Fixtures') + ->in(__DIR__) + ) +; From 2c78dd2c66bef6da17d1f0beb59a394037f66477 Mon Sep 17 00:00:00 2001 From: Brandon Black Date: Wed, 7 Dec 2016 11:39:49 -0800 Subject: [PATCH 0193/1214] Bumping to v4.8.18 (#3370) * make tests great again :sparkles: * version bump * removing empty line in gemspec --- github-linguist.gemspec | 1 - lib/linguist/version.rb | 2 +- test/test_language.rb | 6 +++--- test/test_modelines.rb | 6 +++++- test/test_shebang.rb | 6 +++++- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/github-linguist.gemspec b/github-linguist.gemspec index f9f6ccc672..69152aa409 100644 --- a/github-linguist.gemspec +++ b/github-linguist.gemspec @@ -27,5 +27,4 @@ Gem::Specification.new do |s| s.add_development_dependency 'color-proximity', '~> 0.2.1' s.add_development_dependency 'licensed' s.add_development_dependency 'licensee', '>= 8.6.0' - end diff --git a/lib/linguist/version.rb b/lib/linguist/version.rb index 3540174fa4..6e7db9100f 100644 --- a/lib/linguist/version.rb +++ b/lib/linguist/version.rb @@ -1,3 +1,3 @@ module Linguist - VERSION = "4.8.17" + VERSION = "4.8.18" end diff --git a/test/test_language.rb b/test/test_language.rb index a82040e2cd..ca01d0cd24 100644 --- a/test/test_language.rb +++ b/test/test_language.rb @@ -297,9 +297,9 @@ def test_find_by_alias_ignores_comma end def test_doesnt_blow_up_with_blank_lookup - assert_equal nil, Language.find_by_alias('') - assert_equal nil, Language.find_by_name(nil) - assert_equal nil, Language[""] + assert_nil Language.find_by_alias('') + assert_nil Language.find_by_name(nil) + assert_nil Language[""] end def test_name diff --git a/test/test_modelines.rb b/test/test_modelines.rb index aac84ada88..17b953e2e4 100644 --- a/test/test_modelines.rb +++ b/test/test_modelines.rb @@ -4,7 +4,11 @@ class TestModelines < Minitest::Test include Linguist def assert_modeline(language, blob) - assert_equal language, Linguist::Strategy::Modeline.call(blob).first + if language.nil? + assert_nil Linguist::Strategy::Modeline.call(blob).first + else + assert_equal language, Linguist::Strategy::Modeline.call(blob).first + end end def test_modeline_strategy diff --git a/test/test_shebang.rb b/test/test_shebang.rb index de3344ec43..e9e93d8204 100644 --- a/test/test_shebang.rb +++ b/test/test_shebang.rb @@ -4,7 +4,11 @@ class TestShebang < Minitest::Test include Linguist def assert_interpreter(interpreter, body) - assert_equal interpreter, Shebang.interpreter(body) + if interpreter.nil? + assert_nil Shebang.interpreter(body) + else + assert_equal interpreter, Shebang.interpreter(body) + end end def test_shebangs From 9d8392dab830dd27d00323ce33c7324f8f47219e Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Mon, 12 Dec 2016 21:24:19 +0100 Subject: [PATCH 0194/1214] Remove deprecated code (#3359) * Remove deprecated find_by_shebang * Remove deprecated ace_modes function * Remove deprecated primary_extension function Gists don't have a language dropdown anymore * Remove deprecated Linguist::Language.detect function * Remove deprecated search_term field --- lib/linguist/language.rb | 55 -------------------------------------- lib/linguist/languages.yml | 24 ----------------- script/set-language-ids | 2 -- test/test_language.rb | 51 ----------------------------------- 4 files changed, 132 deletions(-) diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index 875ef956b3..3e698b018c 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -90,17 +90,6 @@ def self.create(attributes = {}) language end - # Public: Detects the Language of the blob. - # - # blob - an object that includes the Linguist `BlobHelper` interface; - # see Linguist::LazyBlob and Linguist::FileBlob for examples - # - # Returns Language or nil. - def self.detect(blob) - warn "[DEPRECATED] `Linguist::Language.detect` is deprecated. Use `Linguist.detect`. #{caller[0]}" - Linguist.detect(blob) - end - # Public: Get all Languages # # Returns an Array of Languages @@ -177,11 +166,6 @@ def self.find_by_extension(extname) @extension_index[extname.downcase] end - # DEPRECATED - def self.find_by_shebang(data) - @interpreter_index[Shebang.interpreter(data)] - end - # Public: Look up Languages by interpreter. # # interpreter - String of interpreter name @@ -259,18 +243,6 @@ def self.colors @colors ||= all.select(&:color).sort_by { |lang| lang.name.downcase } end - # Public: A List of languages compatible with Ace. - # - # TODO: Remove this method in a 5.x release. Every language now needs an ace_mode - # key, so this function isn't doing anything unique anymore. - # - # Returns an Array of Languages. - def self.ace_modes - warn "This method will be deprecated in a future 5.x release. Every language now has an `ace_mode` set." - warn caller - @ace_modes ||= all.select(&:ace_mode).sort_by { |lang| lang.name.downcase } - end - # Internal: Initialize a new Language # # attributes - A hash of attributes @@ -362,17 +334,6 @@ def initialize(attributes = {}) # Returns an Array of String names attr_reader :aliases - # Deprecated: Get code search term - # - # Examples - # - # # => "ruby" - # # => "python" - # # => "perl" - # - # Returns the name String - attr_reader :search_term - # Public: Get language_id (used in GitHub search) # # Examples @@ -457,22 +418,6 @@ def initialize(attributes = {}) # Returns the extensions Array attr_reader :filenames - # Deprecated: Get primary extension - # - # Defaults to the first extension but can be overridden - # in the languages.yml. - # - # The primary extension can not be nil. Tests should verify this. - # - # This method is only used by app/helpers/gists_helper.rb for creating - # the language dropdown. It really should be using `name` instead. - # Would like to drop primary extension. - # - # Returns the extension String. - def primary_extension - extensions.first - end - # Public: Get URL escaped name. # # Examples diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 31529caea4..02784542c3 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -14,8 +14,6 @@ # listed alphabetically) # interpreters - An Array of associated interpreters # searchable - Boolean flag to enable searching (defaults to true) -# search_term - Deprecated: Some languages may be indexed under a -# different alias. Avoid defining new exceptions. # language_id - Integer used as a language-name-independent indexed field so that we can rename # languages in Linguist without reindexing all the code on GitHub. Must not be # changed for existing languages without the explicit permission of GitHub staff. @@ -121,7 +119,6 @@ ASN.1: ASP: type: programming color: "#6a40fd" - search_term: aspx-vb tm_scope: text.html.asp aliases: - aspx @@ -154,7 +151,6 @@ ActionScript: type: programming tm_scope: source.actionscript.3 color: "#882B0F" - search_term: as3 aliases: - actionscript 3 - actionscript3 @@ -291,7 +287,6 @@ AspectJ: Assembly: type: programming color: "#6E4C13" - search_term: nasm aliases: - nasm extensions: @@ -349,7 +344,6 @@ Awk: language_id: 28 Batchfile: type: programming - search_term: bat aliases: - bat - batch @@ -474,7 +468,6 @@ C#: codemirror_mode: clike codemirror_mime_type: text/x-csharp tm_scope: source.cs - search_term: csharp color: "#178600" aliases: - csharp @@ -489,7 +482,6 @@ C++: ace_mode: c_cpp codemirror_mode: clike codemirror_mime_type: text/x-c++src - search_term: cpp color: "#f34b7d" aliases: - cpp @@ -719,7 +711,6 @@ ColdFusion: type: programming ace_mode: coldfusion color: "#ed2cd6" - search_term: cfm aliases: - cfm - cfml @@ -733,7 +724,6 @@ ColdFusion CFC: type: programming group: ColdFusion ace_mode: coldfusion - search_term: cfc aliases: - cfc extensions: @@ -956,7 +946,6 @@ DTrace: language_id: 85 Darcs Patch: type: data - search_term: dpatch aliases: - dpatch extensions: @@ -1187,7 +1176,6 @@ Erlang: F#: type: programming color: "#b845fc" - search_term: fsharp aliases: - fsharp extensions: @@ -1449,7 +1437,6 @@ Gentoo Eclass: language_id: 128 Gettext Catalog: type: prose - search_term: pot searchable: false aliases: - pot @@ -1861,7 +1848,6 @@ INI: language_id: 163 IRC log: type: data - search_term: irc aliases: - irc - irc logs @@ -2041,7 +2027,6 @@ Java: Java Server Pages: type: programming group: Java - search_term: jsp aliases: - jsp extensions: @@ -2298,7 +2283,6 @@ Literate CoffeeScript: group: CoffeeScript ace_mode: text wrap: true - search_term: litcoffee aliases: - litcoffee extensions: @@ -2307,7 +2291,6 @@ Literate CoffeeScript: Literate Haskell: type: programming group: Haskell - search_term: lhs aliases: - lhaskell - lhs @@ -2569,7 +2552,6 @@ Max: aliases: - max/msp - maxmsp - search_term: max/msp extensions: - ".maxpat" - ".maxhelp" @@ -2621,7 +2603,6 @@ MiniD: language_id: 231 Mirah: type: programming - search_term: mirah color: "#c7a938" extensions: - ".druby" @@ -3608,7 +3589,6 @@ Rascal: language_id: 173616037 Raw token data: type: data - search_term: raw aliases: - raw extensions: @@ -3955,7 +3935,6 @@ Self: language_id: 345 Shell: type: programming - search_term: bash color: "#89e051" aliases: - sh @@ -4476,7 +4455,6 @@ Verilog: VimL: type: programming color: "#199f4b" - search_term: vim tm_scope: source.viml aliases: - vim @@ -4832,7 +4810,6 @@ desktop: eC: type: programming color: "#913960" - search_term: ec extensions: - ".ec" - ".eh" @@ -4882,7 +4859,6 @@ ooc: reStructuredText: type: prose wrap: true - search_term: rst aliases: - rst extensions: diff --git a/script/set-language-ids b/script/set-language-ids index 769b850c94..e4fa6d7185 100755 --- a/script/set-language-ids +++ b/script/set-language-ids @@ -21,8 +21,6 @@ header = <<-EOF # listed alphabetically) # interpreters - An Array of associated interpreters # searchable - Boolean flag to enable searching (defaults to true) -# search_term - Deprecated: Some languages may be indexed under a -# different alias. Avoid defining new exceptions. # language_id - Integer used as a language-name-independent indexed field so that we can rename # languages in Linguist without reindexing all the code on GitHub. Must not be # changed for existing languages without the explicit permission of GitHub staff. diff --git a/test/test_language.rb b/test/test_language.rb index ca01d0cd24..6adca26351 100644 --- a/test/test_language.rb +++ b/test/test_language.rb @@ -106,39 +106,6 @@ def test_groups end end - # Used for code search indexing. Changing any of these values may - # require reindexing repositories. - def test_search_term - assert_equal 'perl', Language['Perl'].search_term - assert_equal 'python', Language['Python'].search_term - assert_equal 'ruby', Language['Ruby'].search_term - assert_equal 'common-lisp', Language['Common Lisp'].search_term - assert_equal 'html+erb', Language['HTML+ERB'].search_term - assert_equal 'max/msp', Language['Max'].search_term - assert_equal 'puppet', Language['Puppet'].search_term - assert_equal 'pure-data', Language['Pure Data'].search_term - - assert_equal 'aspx-vb', Language['ASP'].search_term - assert_equal 'as3', Language['ActionScript'].search_term - assert_equal 'nasm', Language['Assembly'].search_term - assert_equal 'bat', Language['Batchfile'].search_term - assert_equal 'csharp', Language['C#'].search_term - assert_equal 'cpp', Language['C++'].search_term - assert_equal 'cfm', Language['ColdFusion'].search_term - assert_equal 'dpatch', Language['Darcs Patch'].search_term - assert_equal 'fsharp', Language['F#'].search_term - assert_equal 'pot', Language['Gettext Catalog'].search_term - assert_equal 'irc', Language['IRC log'].search_term - assert_equal 'lhs', Language['Literate Haskell'].search_term - assert_equal 'mirah', Language['Mirah'].search_term - assert_equal 'raw', Language['Raw token data'].search_term - assert_equal 'bash', Language['Shell'].search_term - assert_equal 'vim', Language['VimL'].search_term - assert_equal 'jsp', Language['Java Server Pages'].search_term - assert_equal 'rst', Language['reStructuredText'].search_term - assert_equal 'supercollider', Language['SuperCollider'].search_term - end - def test_popular assert Language['Ruby'].popular? assert Language['Perl'].popular? @@ -345,13 +312,6 @@ def test_ace_mode assert_equal 'text', Language['FORTRAN'].ace_mode end - def test_ace_modes - silence_warnings do - assert Language.ace_modes.include?(Language['Ruby']) - assert Language.ace_modes.include?(Language['FORTRAN']) - end - end - def test_codemirror_mode assert_equal 'ruby', Language['Ruby'].codemirror_mode assert_equal 'javascript', Language['JavaScript'].codemirror_mode @@ -379,17 +339,6 @@ def test_extensions assert Language['SuperCollider'].extensions.include?('.scd') end - def test_primary_extension - assert_equal '.pl', Language['Perl'].primary_extension - assert_equal '.py', Language['Python'].primary_extension - assert_equal '.rb', Language['Ruby'].primary_extension - assert_equal '.js', Language['JavaScript'].primary_extension - assert_equal '.coffee', Language['CoffeeScript'].primary_extension - assert_equal '.t', Language['Turing'].primary_extension - assert_equal '.ts', Language['TypeScript'].primary_extension - assert_equal '.sc', Language['SuperCollider'].primary_extension - end - def test_eql assert Language['Ruby'].eql?(Language['Ruby']) assert !Language['Ruby'].eql?(Language['Python']) From 9b941a34f056b83bbd5099f15eac40689f876ca6 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Mon, 12 Dec 2016 21:34:33 +0100 Subject: [PATCH 0195/1214] Use filenames as a definitive answer (#2006) * Separate find_by_extension and find_by_filename find_by_extension now takes a path as argument and not only the file extension. Currently only find_by_extension is used as a strategy. * Add find_by_filename as first strategy --- lib/linguist.rb | 3 +- lib/linguist/language.rb | 36 ++--- lib/linguist/strategy/extension.rb | 10 ++ lib/linguist/strategy/filename.rb | 5 +- test/fixtures/CMake/CMakeLists.txt | 29 ++++ test/fixtures/CoffeeScript/Cakefile | 200 ++++++++++++++++++++++++++++ test/fixtures/Dockerfile/Dockerfile | 97 ++++++++++++++ test/fixtures/Makefile/Makefile | 5 + test/fixtures/Maven POM/pom.xml | 57 ++++++++ test/test_language.rb | 22 +-- 10 files changed, 435 insertions(+), 29 deletions(-) create mode 100644 lib/linguist/strategy/extension.rb create mode 100644 test/fixtures/CMake/CMakeLists.txt create mode 100755 test/fixtures/CoffeeScript/Cakefile create mode 100755 test/fixtures/Dockerfile/Dockerfile create mode 100755 test/fixtures/Makefile/Makefile create mode 100644 test/fixtures/Maven POM/pom.xml diff --git a/lib/linguist.rb b/lib/linguist.rb index 544bb250a2..c6733a67e3 100644 --- a/lib/linguist.rb +++ b/lib/linguist.rb @@ -59,8 +59,9 @@ def detect(blob) # Strategies are called in turn until a single Language is returned. STRATEGIES = [ Linguist::Strategy::Modeline, - Linguist::Shebang, Linguist::Strategy::Filename, + Linguist::Shebang, + Linguist::Strategy::Extension, Linguist::Heuristics, Linguist::Classifier ] diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index 3e698b018c..6874a511e5 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -11,6 +11,7 @@ require 'linguist/file_blob' require 'linguist/blob_helper' require 'linguist/strategy/filename' +require 'linguist/strategy/extension' require 'linguist/strategy/modeline' require 'linguist/shebang' @@ -129,41 +130,46 @@ def self.find_by_alias(name) # Public: Look up Languages by filename. # + # The behaviour of this method recently changed. + # See the second example below. + # # filename - The path String. # # Examples # + # Language.find_by_filename('Cakefile') + # # => [#] # Language.find_by_filename('foo.rb') - # # => [#] + # # => [] # # Returns all matching Languages or [] if none were found. def self.find_by_filename(filename) basename = File.basename(filename) - - # find the first extension with language definitions - extname = FileBlob.new(filename).extensions.detect do |e| - !@extension_index[e].empty? - end - - (@filename_index[basename] + @extension_index[extname]).compact.uniq + @filename_index[basename] end # Public: Look up Languages by file extension. # - # extname - The extension String. + # The behaviour of this method recently changed. + # See the second example below. + # + # filename - The path String. # # Examples # - # Language.find_by_extension('.rb') + # Language.find_by_extension('dummy.rb') # # => [#] - # # Language.find_by_extension('rb') - # # => [#] + # # => [] # # Returns all matching Languages or [] if none were found. - def self.find_by_extension(extname) - extname = ".#{extname}" unless extname.start_with?(".") - @extension_index[extname.downcase] + def self.find_by_extension(filename) + # find the first extension with language definitions + extname = FileBlob.new(filename.downcase).extensions.detect do |e| + !@extension_index[e].empty? + end + + @extension_index[extname] end # Public: Look up Languages by interpreter. diff --git a/lib/linguist/strategy/extension.rb b/lib/linguist/strategy/extension.rb new file mode 100644 index 0000000000..161dc34ca7 --- /dev/null +++ b/lib/linguist/strategy/extension.rb @@ -0,0 +1,10 @@ +module Linguist + module Strategy + # Detects language based on extension + class Extension + def self.call(blob, _) + Language.find_by_extension(blob.name.to_s) + end + end + end +end diff --git a/lib/linguist/strategy/filename.rb b/lib/linguist/strategy/filename.rb index b8c819ebc6..f365651532 100644 --- a/lib/linguist/strategy/filename.rb +++ b/lib/linguist/strategy/filename.rb @@ -1,9 +1,10 @@ module Linguist module Strategy - # Detects language based on filename and/or extension + # Detects language based on filename class Filename def self.call(blob, _) - Language.find_by_filename(blob.name.to_s) + name = blob.name.to_s + Language.find_by_filename(name) end end end diff --git a/test/fixtures/CMake/CMakeLists.txt b/test/fixtures/CMake/CMakeLists.txt new file mode 100644 index 0000000000..41effdc341 --- /dev/null +++ b/test/fixtures/CMake/CMakeLists.txt @@ -0,0 +1,29 @@ +cmake_minimum_required(VERSION 2.8 FATAL_ERROR) + +project("To do list") + +enable_testing() + +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR + "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + set(warnings "-Wall -Wextra -Werror") +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + set(warnings "/W4 /WX /EHsc") +endif() + +set(optimize "-O2") + +if (NOT CONFIGURED_ONCE) + set(CMAKE_CXX_FLAGS "${warnings} ${optimize}" + CACHE STRING "Flags used by the compiler during all build types." FORCE) + set(CMAKE_C_FLAGS "${warnings} ${optimize}" + CACHE STRING "Flags used by the compiler during all build types." FORCE) +endif() + + +add_executable(toDo main.cpp ToDo.cpp) + +add_test(toDoTest toDo) + +set(CONFIGURED_ONCE TRUE CACHE INTERNAL + "A flag showing that CMake has configured at least once.") \ No newline at end of file diff --git a/test/fixtures/CoffeeScript/Cakefile b/test/fixtures/CoffeeScript/Cakefile new file mode 100755 index 0000000000..05dddf54b2 --- /dev/null +++ b/test/fixtures/CoffeeScript/Cakefile @@ -0,0 +1,200 @@ +http = require 'http' +https = require 'https' +fs = require 'fs' +path = require 'path' +{spawn, exec} = require 'child_process' +semver = require 'semver' +AdmZip = require('adm-zip') +GitHubApi = require 'github' + +github = new GitHubApi(version: '3.0.0') + +# ---------------- +# Server / Builder +# ---------------- + +option '-P', '--production', 'run server in production mode' +option null, '--port [PORT]', 'listen on specified port (default 3333)' + +LOCAL_BRUNCH = path.join('.', 'node_modules', '.bin', 'brunch') + +spawnBrunch = (flags, env) -> + if fs.existsSync(LOCAL_BRUNCH) + brunch = spawn LOCAL_BRUNCH, flags, env + else + console.error 'Warning, using global brunch. Run `npm install`.' + brunch = spawn 'brunch', flags, env + + brunch.stdout.on 'data', (data) -> console.log data.toString().trim() + brunch.stderr.on 'data', (data) -> console.log data.toString().trim() + +runBrunchWatch = (options, shouldStartServer) -> + flags = ['w'] + flags.push '-s' if shouldStartServer + + if options.production? + flags.push('-P') + process.env.BRUNCH_ENV = 'production' + + if options.port? + flags.push '-p' + flags.push options.port + + spawnBrunch flags, process.env + +task 'server', 'start the brunch server in development', (options) -> + runBrunchWatch(options, true) + +task 'watch', 'build the app continuously without a server', (options) -> + runBrunchWatch(options, false) + +task 'build', 'build for production', -> + process.env.BRUNCH_ENV = 'production' + spawnBrunch ['b', '-P'], process.env + +task 'test', 'run brunch in the test environment', -> + flags = ['w', '-s'] + process.env.BRUNCH_ENV = 'test' + spawnBrunch flags, process.env + +# ------------- +# Tapas Updates +# ------------- +updateMessage = 'update Tapas to latest (Cakefile, package.json, portkey.json, + config.coffee, generators/*)' +task 'tapas:update', updateMessage, (options) -> + url = 'https://codeload.github.com/mutewinter/tapas-with-ember/zip/master' + filesToUpdate = [ + 'Cakefile' + 'package.json' + 'portkey.json' + 'config.coffee' + 'generators/' + 'testem.json' + 'bower.json' + ] + https.get url, (res) -> + data = [] + dataLen = 0 + + res.on('data', (chunk) -> + data.push(chunk) + dataLen += chunk.length + ).on('end', -> + buf = new Buffer(dataLen) + + pos = 0 + for dataItem in data + dataItem.copy(buf, pos) + pos += dataItem.length + + zip = new AdmZip(buf) + + filesToUpdate.forEach (file) -> + targetFile = "tapas-with-ember-master/#{file}" + if /\/$/.test(file) + zip.extractEntryTo(targetFile, file, false, true) + else + zip.extractEntryTo(targetFile, '', false, true) + ) + +# -------------- +# Script Updates +# -------------- + +EMBER_BASE_URL = 'http://builds.emberjs.com' +GITHUB_API_URL = 'https://api.github.com' +EMBER = {} +EMBER_DATA = {} +['release', 'beta', 'canary'].forEach (build) -> + EMBER[build] = + prod: "#{EMBER_BASE_URL}/#{build}/ember.prod.js" + dev: "#{EMBER_BASE_URL}/#{build}/ember.js" + EMBER_DATA[build] = + prod: "#{EMBER_BASE_URL}/#{build}/ember-data.prod.js" + dev: "#{EMBER_BASE_URL}/#{build}/ember-data.js" + +EMBER['tag'] = + prod: "#{EMBER_BASE_URL}/tags/{{tag}}/ember.prod.js" + dev: "#{EMBER_BASE_URL}/tags/{{tag}}/ember.js" + +EMBER_DATA['tag'] = + prod: "#{EMBER_BASE_URL}/tags/{{tag}}/ember-data.prod.js" + dev: "#{EMBER_BASE_URL}/tags/{{tag}}/ember-data.js" + +downloadFile = (src, dest) -> + console.log('Downloading ' + src + ' to ' + dest) + data = '' + request = http.get src, (response) -> + response.on('data', (chunk) -> + data += chunk + ) + response.on('end', -> + fs.writeFileSync(dest, data) + ) + +downloadEmberFile = (src, dest) -> + downloadFile(src, "vendor/ember/#{dest}") + +listTags = (user, repo, since, name, command) -> + github.repos.getTags(user: user, repo: repo, (resp, tags) -> + for tag in tags + if semver.valid(tag.name) and !semver.lt(tag.name, since) + firstTag = tag.name unless firstTag + console.log " #{tag.name}" + console.log "Install with cake -t \"#{firstTag}\" #{command}" + ) + +installEmberFiles = (project, filename, options) -> + if 'tag' of options + # Download a Tag + tag = options.tag + tag = "v#{tag}" unless /^v/.test(tag) + downloadEmberFile(project['tag'].dev.replace(/{{tag}}/, tag), + "development/#{filename}") + downloadEmberFile(project['tag'].prod.replace(/{{tag}}/, tag), + "production/#{filename}") + else + # Download a Channel + channel = options.channel ? 'release' + downloadEmberFile project[channel].dev, "development/#{filename}" + downloadEmberFile project[channel].prod, "production/#{filename}" + +# Channel +option '-c', '--channel "[CHANNEL_NAME]"', + 'relase, beta, or canary (http://emberjs.com/builds)' + +# Tag +option '-t', '--tag "[TAG_NAME]"', + 'a tagged release to install. Run cake ember:list to see known tags' + +# ----- +# Ember +# ----- +task 'ember:install', 'install latest Ember', (options) -> + installEmberFiles(EMBER, 'ember.js', options) + +task 'ember:list', 'list tagged relases of Ember since v1.0.0', (options) -> + listTags 'emberjs', 'ember.js', 'v1.0.0', 'Ember', 'ember:install' + +# ---------- +# Ember Data +# ---------- +task 'ember-data:install', 'install latest Ember Data', (options) -> + options.channel or= 'beta' + installEmberFiles(EMBER_DATA, 'ember-data.js', options) + +task 'ember-data:list', 'list tagged relases of Ember Data', (options) -> + listTags 'emberjs', 'data', 'v0.0.1', 'Ember Data', + 'ember-data:install' + +# ----------- +# Ember Model +# ----------- +EMBER_MODEL = + dev: 'http://builds.erikbryn.com/ember-model/ember-model-latest.js' + prod: 'http://builds.erikbryn.com/ember-model/ember-model-latest.prod.js' + +task 'ember-model:install', 'install latest Ember Model', (options) -> + downloadEmberFile EMBER_MODEL.dev, 'development/ember-model.js' + downloadEmberFile EMBER_MODEL.prod, 'production/ember-model.js' diff --git a/test/fixtures/Dockerfile/Dockerfile b/test/fixtures/Dockerfile/Dockerfile new file mode 100755 index 0000000000..c61ae8d07c --- /dev/null +++ b/test/fixtures/Dockerfile/Dockerfile @@ -0,0 +1,97 @@ +FROM ubuntu:14.04 + +MAINTAINER Wesley Hales + +# Install. +RUN \ + sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \ + apt-get update && \ + apt-get -y upgrade && \ + apt-get install -y build-essential && \ + apt-get install -y software-properties-common && \ + apt-get install -y byobu curl git htop man unzip vim wget && \ + rm -rf /var/lib/apt/lists/* + +# Set environment variables. +ENV HOME /root + +# Define working directory. +WORKDIR /root + +# Install Java. +RUN \ + echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \ + add-apt-repository -y ppa:webupd8team/java && \ + apt-get update && \ + apt-get install -y oracle-java7-installer && \ + rm -rf /var/lib/apt/lists/* \ + echo "done" + +# Install Phantom2 build requirements (Won't build on systems < 2GB ram) +RUN \ + sudo apt-get update && apt-get -y install g++ flex bison gperf ruby perl \ + libsqlite3-dev libfontconfig1-dev libicu-dev libfreetype6 libssl-dev libjpeg-dev libqt5webkit5-dev + +#####################################build latest phantom +######################################+++++ only do this in dev when needed + +#RUN rm -rf phantomjs + +#RUN git clone git://github.com/ariya/phantomjs.git + +#RUN cd /root/phantomjs/ && ./build.sh --confirm + +#RUN ln -s /root/phantomjs/bin/phantomjs /usr/bin/phantomjs +######################################+++++ END only do this in dev when needed + +######################################+++++ comment out when building new version of phantomjs +ADD phantomjs /root/phantomjs + +RUN ln -s /root/phantomjs /usr/bin/phantomjs +######################################+++++ END comment out when building new version of phantomjs + +RUN git clone git://github.com/wesleyhales/speedgun.git + +#RUN mkdir /root/speedgun/core/reports + +#VOLUME ["/root/speedgun/core/reports"] + +RUN cd speedgun/core && phantomjs --ssl-protocol=any --ignore-ssl-errors=yes speedgun.js http://www.google.com performance csv + +RUN cd /root && wget https://dl.dropboxusercontent.com/u/12278845/server.tar + +RUN cd /root && tar -xvf server.tar + +#RUN echo "cd /root/jboss-as-7.1.1.Final-fluxui/ && ./bin/standalone.sh --server-config=standalone-full.xml -b 0.0.0.0" >> /root/.bashrc + +# install maven +RUN sudo apt-get update && apt-get install -y maven + +ADD src /root/src +ADD pom.xml /root/pom.xml +RUN mvn clean install + +#RUN cp -rf /root/target/speedgun.war /root/jboss-as-7.1.1.Final-fluxui/standalone/deployments/ + +RUN ln -s /root/target/speedgun /root/jboss-as-7.1.1.Final-fluxui/standalone/deployments/speedgun.war + +RUN touch /root/jboss-as-7.1.1.Final-fluxui/standalone/deployments/speedgun.war.dodeploy + +# Cleanup old JMS queue +RUN rm -rf /root/jboss-as-7.1.1.Final-fluxui/standalone/tmp/ /root/jboss-as-7.1.1.Final-fluxui/standalone/data/* + +RUN mkdir /root/jboss-as-7.1.1.Final-fluxui/speedgun +RUN cd /root/jboss-as-7.1.1.Final-fluxui/speedgun && curl -O https://raw.githubusercontent.com/wesleyhales/speedgun/master/core/speedgun.js +RUN cd /root/jboss-as-7.1.1.Final-fluxui/speedgun && curl -O https://raw.githubusercontent.com/wesleyhales/speedgun/master/core/config.json + +COPY server-entrypoint.sh / + +ENTRYPOINT ["/server-entrypoint.sh"] + +RUN apt-get install -y postgresql-client + +COPY speedgun.sql / + +EXPOSE 3306 8080 8443 + +#CMD ["postgres"] \ No newline at end of file diff --git a/test/fixtures/Makefile/Makefile b/test/fixtures/Makefile/Makefile new file mode 100755 index 0000000000..b79c161d1b --- /dev/null +++ b/test/fixtures/Makefile/Makefile @@ -0,0 +1,5 @@ +SUBDIRS:=components test +.PHONY: ${SUBDIRS} clean +all:${SUBDIRS} +${SUBDIRS}: + ${MAKE} -C $@ all diff --git a/test/fixtures/Maven POM/pom.xml b/test/fixtures/Maven POM/pom.xml new file mode 100644 index 0000000000..36e0666407 --- /dev/null +++ b/test/fixtures/Maven POM/pom.xml @@ -0,0 +1,57 @@ + + 4.0.0 +awilbur.personal + hudsel + 1.0-SNAPSHOT + jar +hudsel + + src/test/resources/testng.xml + false + + + + + org.testng + testng + 6.8 + + + + org.seleniumhq.selenium + selenium-server + 2.41.0 + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.6 + 1.6 + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.6 + + + + + ${suiteXmlFile} + + + ${skipTests} + true + + + + + diff --git a/test/test_language.rb b/test/test_language.rb index 6adca26351..8e7253ea88 100644 --- a/test/test_language.rb +++ b/test/test_language.rb @@ -170,10 +170,16 @@ def test_find_all_by_alias def test_find_by_extension assert_equal [], Language.find_by_extension('.factor-rc') - assert_equal [], Language.find_by_extension('foo.rb') - assert_equal [Language['Ruby']], Language.find_by_extension('rb') - assert_equal [Language['Ruby']], Language.find_by_extension('.rb') - assert_equal [Language['Limbo'], Language['M'], Language['MUF'], Language['Mathematica'], Language['Matlab'], Language['Mercury'], Language['Objective-C']], Language.find_by_extension('.m') + assert_equal [Language['Limbo'], Language['M'], Language['MUF'], Language['Mathematica'], Language['Matlab'], Language['Mercury'], Language['Objective-C']], Language.find_by_extension('foo.m') + assert_equal [Language['Ruby']], Language.find_by_extension('foo.rb') + assert_equal [Language['Ruby']], Language.find_by_extension('foo/bar.rb') + assert_equal [Language['Ruby']], Language.find_by_extension('PKGBUILD.rb') + assert_equal ['C', 'C++', 'Objective-C'], Language.find_by_extension('foo.h').map(&:name).sort + assert_equal [], Language.find_by_extension('rb') + assert_equal [], Language.find_by_extension('.null') + assert_equal [Language['HTML+Django']], Language.find_by_extension('index.jinja') + assert_equal [Language['Chapel']], Language.find_by_extension('examples/hello.chpl') + assert_equal [], Language.find_by_filename('F.I.L.E.') end def test_find_all_by_extension @@ -186,23 +192,17 @@ def test_find_all_by_extension def test_find_by_filename assert_equal [Language['Shell']], Language.find_by_filename('PKGBUILD') - assert_equal [Language['Ruby']], Language.find_by_filename('foo.rb') - assert_equal [Language['Ruby']], Language.find_by_filename('foo/bar.rb') assert_equal [Language['Ruby']], Language.find_by_filename('Rakefile') - assert_equal [Language['Ruby']], Language.find_by_filename('PKGBUILD.rb') assert_equal Language['ApacheConf'], Language.find_by_filename('httpd.conf').first assert_equal [Language['ApacheConf']], Language.find_by_filename('.htaccess') assert_equal Language['Nginx'], Language.find_by_filename('nginx.conf').first - assert_equal ['C', 'C++', 'Objective-C'], Language.find_by_filename('foo.h').map(&:name).sort + assert_equal [], Language.find_by_filename('foo.rb') assert_equal [], Language.find_by_filename('rb') assert_equal [], Language.find_by_filename('.null') assert_equal [Language['Shell']], Language.find_by_filename('.bashrc') assert_equal [Language['Shell']], Language.find_by_filename('bash_profile') assert_equal [Language['Shell']], Language.find_by_filename('.zshrc') assert_equal [Language['Clojure']], Language.find_by_filename('riemann.config') - assert_equal [Language['HTML+Django']], Language.find_by_filename('index.jinja') - assert_equal [Language['Chapel']], Language.find_by_filename('examples/hello.chpl') - assert_equal [], Language.find_by_filename('F.I.L.E.') end def test_find_by_interpreter From d8b91bd5c4f3f0ad741952cdbadd02f3ab07c161 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Tue, 13 Dec 2016 16:39:27 -0500 Subject: [PATCH 0196/1214] The grand language renaming bonanza (#3278) * Removing FORTRAN samples because OS X case-insensitive filesystems :-\ * Adding Fotran samples back * FORTRAN -> Fortran * Groff -> Roff * GAS -> Unix Assembly * Cucumber -> Gherkin * Nimrod -> Nim * Ragel in Ruby Host -> Ragel * Jade -> Pug * VimL -> Vim script --- lib/linguist/languages.yml | 178 +++++++++--------- lib/linguist/popular.yml | 2 +- samples/{FORTRAN => Fortran}/bug-185631.f | 0 samples/{FORTRAN => Fortran}/sample1.f | 0 samples/{FORTRAN => Fortran}/sample1.for | 0 samples/{FORTRAN => Fortran}/sample2.f | 0 samples/{FORTRAN => Fortran}/sample3.F | 0 samples/{Nimrod => Nim}/foo.nim | 0 samples/{Jade => Pug}/hello.jade | 0 samples/{Jade => Pug}/hello.pug | 0 .../ephemeris_parser.rl | 0 .../simple_scanner.rl | 0 .../simple_tokenizer.rl | 0 samples/{Groff => Roff}/Tcl.n | 0 samples/{Groff => Roff}/an-ext.tmac | 0 samples/{Groff => Roff}/create_view.l | 0 samples/{Groff => Roff}/fsinterface.ms | 0 samples/{Groff => Roff}/refs.rno | 0 samples/{Groff => Roff}/sample.4 | 0 samples/{GAS => Unix Assembly}/hello.ms | 0 samples/{GAS => Unix Assembly}/hello.s | 0 .../{VimL => Vim script}/filenames/.gvimrc | 0 .../{VimL => Vim script}/filenames/.nvimrc | 0 samples/{VimL => Vim script}/filenames/.vimrc | 0 samples/{VimL => Vim script}/filenames/_vimrc | 0 samples/{VimL => Vim script}/solarized.vim | 0 test/test_language.rb | 6 +- 27 files changed, 93 insertions(+), 93 deletions(-) rename samples/{FORTRAN => Fortran}/bug-185631.f (100%) rename samples/{FORTRAN => Fortran}/sample1.f (100%) rename samples/{FORTRAN => Fortran}/sample1.for (100%) rename samples/{FORTRAN => Fortran}/sample2.f (100%) rename samples/{FORTRAN => Fortran}/sample3.F (100%) rename samples/{Nimrod => Nim}/foo.nim (100%) rename samples/{Jade => Pug}/hello.jade (100%) rename samples/{Jade => Pug}/hello.pug (100%) rename samples/{Ragel in Ruby Host => Ragel}/ephemeris_parser.rl (100%) rename samples/{Ragel in Ruby Host => Ragel}/simple_scanner.rl (100%) rename samples/{Ragel in Ruby Host => Ragel}/simple_tokenizer.rl (100%) rename samples/{Groff => Roff}/Tcl.n (100%) rename samples/{Groff => Roff}/an-ext.tmac (100%) rename samples/{Groff => Roff}/create_view.l (100%) rename samples/{Groff => Roff}/fsinterface.ms (100%) rename samples/{Groff => Roff}/refs.rno (100%) rename samples/{Groff => Roff}/sample.4 (100%) rename samples/{GAS => Unix Assembly}/hello.ms (100%) rename samples/{GAS => Unix Assembly}/hello.s (100%) rename samples/{VimL => Vim script}/filenames/.gvimrc (100%) rename samples/{VimL => Vim script}/filenames/.nvimrc (100%) rename samples/{VimL => Vim script}/filenames/.vimrc (100%) rename samples/{VimL => Vim script}/filenames/_vimrc (100%) rename samples/{VimL => Vim script}/solarized.vim (100%) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 02784542c3..e56720042a 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -844,16 +844,6 @@ Csound Score: tm_scope: source.csound-score ace_mode: text language_id: 75 -Cucumber: - type: programming - extensions: - - ".feature" - tm_scope: text.gherkin.feature - aliases: - - gherkin - ace_mode: text - color: "#5B2063" - language_id: 76 Cuda: type: programming extensions: @@ -1196,23 +1186,6 @@ FLUX: tm_scope: none ace_mode: text language_id: 106 -FORTRAN: - type: programming - color: "#4d41b1" - extensions: - - ".f90" - - ".f" - - ".f03" - - ".f08" - - ".f77" - - ".f95" - - ".for" - - ".fpp" - tm_scope: source.fortran.modern - ace_mode: text - codemirror_mode: fortran - codemirror_mime_type: text/x-fortran - language_id: 107 Factor: type: programming color: "#636746" @@ -1282,6 +1255,23 @@ Forth: codemirror_mode: forth codemirror_mime_type: text/x-forth language_id: 114 +Fortran: + type: programming + color: "#4d41b1" + extensions: + - ".f90" + - ".f" + - ".f03" + - ".f08" + - ".f77" + - ".f95" + - ".for" + - ".fpp" + tm_scope: source.fortran.modern + ace_mode: text + codemirror_mode: fortran + codemirror_mime_type: text/x-fortran + language_id: 107 FreeMarker: type: programming color: "#0050b2" @@ -1327,15 +1317,6 @@ GAP: tm_scope: source.gap ace_mode: text language_id: 119 -GAS: - type: programming - group: Assembly - extensions: - - ".s" - - ".ms" - tm_scope: source.assembly - ace_mode: assembly_x86 - language_id: 120 GCC Machine Description: type: programming extensions: @@ -1446,6 +1427,16 @@ Gettext Catalog: tm_scope: source.po ace_mode: text language_id: 129 +Gherkin: + type: programming + extensions: + - ".feature" + tm_scope: text.gherkin.feature + aliases: + - cucumber + ace_mode: text + color: "#5B2063" + language_id: 76 Glyph: type: programming color: "#e4cc98" @@ -1549,45 +1540,6 @@ Graphviz (DOT): - ".gv" ace_mode: text language_id: 140 -Groff: - type: markup - color: "#ecdebe" - extensions: - - ".man" - - ".1" - - ".1in" - - ".1m" - - ".1x" - - ".2" - - ".3" - - ".3in" - - ".3m" - - ".3qt" - - ".3x" - - ".4" - - ".5" - - ".6" - - ".7" - - ".8" - - ".9" - - ".l" - - ".me" - - ".ms" - - ".n" - - ".rno" - - ".roff" - - ".tmac" - filenames: - - mmn - - mmt - tm_scope: text.roff - aliases: - - nroff - - troff - ace_mode: text - codemirror_mode: troff - codemirror_mime_type: text/troff - language_id: 141 Groovy: type: programming ace_mode: groovy @@ -1997,17 +1949,6 @@ JSX: codemirror_mode: jsx codemirror_mime_type: text/jsx language_id: 178 -Jade: - group: HTML - type: markup - extensions: - - ".jade" - - ".pug" - tm_scope: text.jade - ace_mode: jade - codemirror_mode: pug - codemirror_mime_type: text/x-pug - language_id: 179 Jasmin: type: programming ace_mode: java @@ -2759,7 +2700,7 @@ Nginx: codemirror_mime_type: text/x-nginx-conf color: "#9469E9" language_id: 248 -Nimrod: +Nim: type: programming color: "#37775b" extensions: @@ -3336,6 +3277,17 @@ Public Key: codemirror_mode: asciiarmor codemirror_mime_type: application/pgp language_id: 298 +Pug: + group: HTML + type: markup + extensions: + - ".jade" + - ".pug" + tm_scope: text.jade + ace_mode: jade + codemirror_mode: pug + codemirror_mime_type: text/x-pug + language_id: 179 Puppet: type: programming color: "#302B6D" @@ -3568,7 +3520,7 @@ Racket: tm_scope: source.racket ace_mode: lisp language_id: 316 -Ragel in Ruby Host: +Ragel: type: programming color: "#9d5200" extensions: @@ -3651,6 +3603,44 @@ RobotFramework: tm_scope: text.robot ace_mode: text language_id: 324 +Roff: + type: markup + color: "#ecdebe" + extensions: + - ".man" + - ".1" + - ".1in" + - ".1m" + - ".1x" + - ".2" + - ".3" + - ".3in" + - ".3m" + - ".3qt" + - ".3x" + - ".4" + - ".5" + - ".6" + - ".7" + - ".8" + - ".9" + - ".l" + - ".me" + - ".ms" + - ".n" + - ".rno" + - ".roff" + - ".tmac" + filenames: + - mmn + - mmt + tm_scope: text.roff + aliases: + - nroff + ace_mode: text + codemirror_mode: troff + codemirror_mime_type: text/troff + language_id: 141 Rouge: type: programming ace_mode: clojure @@ -4380,6 +4370,15 @@ Unity3D Asset: - ".unity" tm_scope: source.yaml language_id: 380 +Unix Assembly: + type: programming + group: Assembly + extensions: + - ".s" + - ".ms" + tm_scope: source.assembly + ace_mode: assembly_x86 + language_id: 120 Uno: type: programming extensions: @@ -4452,12 +4451,13 @@ Verilog: codemirror_mode: verilog codemirror_mime_type: text/x-verilog language_id: 387 -VimL: +Vim script: type: programming color: "#199f4b" tm_scope: source.viml aliases: - vim + - viml - nvim extensions: - ".vim" diff --git a/lib/linguist/popular.yml b/lib/linguist/popular.yml index afb68021f5..80e6504af4 100644 --- a/lib/linguist/popular.yml +++ b/lib/linguist/popular.yml @@ -26,4 +26,4 @@ - Shell - Swift - TeX -- VimL +- Vim script diff --git a/samples/FORTRAN/bug-185631.f b/samples/Fortran/bug-185631.f similarity index 100% rename from samples/FORTRAN/bug-185631.f rename to samples/Fortran/bug-185631.f diff --git a/samples/FORTRAN/sample1.f b/samples/Fortran/sample1.f similarity index 100% rename from samples/FORTRAN/sample1.f rename to samples/Fortran/sample1.f diff --git a/samples/FORTRAN/sample1.for b/samples/Fortran/sample1.for similarity index 100% rename from samples/FORTRAN/sample1.for rename to samples/Fortran/sample1.for diff --git a/samples/FORTRAN/sample2.f b/samples/Fortran/sample2.f similarity index 100% rename from samples/FORTRAN/sample2.f rename to samples/Fortran/sample2.f diff --git a/samples/FORTRAN/sample3.F b/samples/Fortran/sample3.F similarity index 100% rename from samples/FORTRAN/sample3.F rename to samples/Fortran/sample3.F diff --git a/samples/Nimrod/foo.nim b/samples/Nim/foo.nim similarity index 100% rename from samples/Nimrod/foo.nim rename to samples/Nim/foo.nim diff --git a/samples/Jade/hello.jade b/samples/Pug/hello.jade similarity index 100% rename from samples/Jade/hello.jade rename to samples/Pug/hello.jade diff --git a/samples/Jade/hello.pug b/samples/Pug/hello.pug similarity index 100% rename from samples/Jade/hello.pug rename to samples/Pug/hello.pug diff --git a/samples/Ragel in Ruby Host/ephemeris_parser.rl b/samples/Ragel/ephemeris_parser.rl similarity index 100% rename from samples/Ragel in Ruby Host/ephemeris_parser.rl rename to samples/Ragel/ephemeris_parser.rl diff --git a/samples/Ragel in Ruby Host/simple_scanner.rl b/samples/Ragel/simple_scanner.rl similarity index 100% rename from samples/Ragel in Ruby Host/simple_scanner.rl rename to samples/Ragel/simple_scanner.rl diff --git a/samples/Ragel in Ruby Host/simple_tokenizer.rl b/samples/Ragel/simple_tokenizer.rl similarity index 100% rename from samples/Ragel in Ruby Host/simple_tokenizer.rl rename to samples/Ragel/simple_tokenizer.rl diff --git a/samples/Groff/Tcl.n b/samples/Roff/Tcl.n similarity index 100% rename from samples/Groff/Tcl.n rename to samples/Roff/Tcl.n diff --git a/samples/Groff/an-ext.tmac b/samples/Roff/an-ext.tmac similarity index 100% rename from samples/Groff/an-ext.tmac rename to samples/Roff/an-ext.tmac diff --git a/samples/Groff/create_view.l b/samples/Roff/create_view.l similarity index 100% rename from samples/Groff/create_view.l rename to samples/Roff/create_view.l diff --git a/samples/Groff/fsinterface.ms b/samples/Roff/fsinterface.ms similarity index 100% rename from samples/Groff/fsinterface.ms rename to samples/Roff/fsinterface.ms diff --git a/samples/Groff/refs.rno b/samples/Roff/refs.rno similarity index 100% rename from samples/Groff/refs.rno rename to samples/Roff/refs.rno diff --git a/samples/Groff/sample.4 b/samples/Roff/sample.4 similarity index 100% rename from samples/Groff/sample.4 rename to samples/Roff/sample.4 diff --git a/samples/GAS/hello.ms b/samples/Unix Assembly/hello.ms similarity index 100% rename from samples/GAS/hello.ms rename to samples/Unix Assembly/hello.ms diff --git a/samples/GAS/hello.s b/samples/Unix Assembly/hello.s similarity index 100% rename from samples/GAS/hello.s rename to samples/Unix Assembly/hello.s diff --git a/samples/VimL/filenames/.gvimrc b/samples/Vim script/filenames/.gvimrc similarity index 100% rename from samples/VimL/filenames/.gvimrc rename to samples/Vim script/filenames/.gvimrc diff --git a/samples/VimL/filenames/.nvimrc b/samples/Vim script/filenames/.nvimrc similarity index 100% rename from samples/VimL/filenames/.nvimrc rename to samples/Vim script/filenames/.nvimrc diff --git a/samples/VimL/filenames/.vimrc b/samples/Vim script/filenames/.vimrc similarity index 100% rename from samples/VimL/filenames/.vimrc rename to samples/Vim script/filenames/.vimrc diff --git a/samples/VimL/filenames/_vimrc b/samples/Vim script/filenames/_vimrc similarity index 100% rename from samples/VimL/filenames/_vimrc rename to samples/Vim script/filenames/_vimrc diff --git a/samples/VimL/solarized.vim b/samples/Vim script/solarized.vim similarity index 100% rename from samples/VimL/solarized.vim rename to samples/Vim script/solarized.vim diff --git a/test/test_language.rb b/test/test_language.rb index 8e7253ea88..ea6230f9a6 100644 --- a/test/test_language.rb +++ b/test/test_language.rb @@ -60,8 +60,8 @@ def test_find_by_alias assert_equal Language['SuperCollider'], Language.find_by_alias('supercollider') assert_equal Language['TeX'], Language.find_by_alias('tex') assert_equal Language['TypeScript'], Language.find_by_alias('ts') - assert_equal Language['VimL'], Language.find_by_alias('vim') - assert_equal Language['VimL'], Language.find_by_alias('viml') + assert_equal Language['Vim script'], Language.find_by_alias('vim') + assert_equal Language['Vim script'], Language.find_by_alias('viml') assert_equal Language['reStructuredText'], Language.find_by_alias('rst') assert_equal Language['YAML'], Language.find_by_alias('yml') assert_nil Language.find_by_alias(nil) @@ -90,7 +90,7 @@ def test_groups assert_equal Language['Ruby'], Language['Ruby'].group # Test a few special groups - assert_equal Language['Assembly'], Language['GAS'].group + assert_equal Language['Assembly'], Language['Unix Assembly'].group assert_equal Language['C'], Language['OpenCL'].group assert_equal Language['Haskell'], Language['Literate Haskell'].group assert_equal Language['Java'], Language['Java Server Pages'].group From 0fa1fa558146b3e819a94d3edd4056c7424fc999 Mon Sep 17 00:00:00 2001 From: Brandon Black Date: Tue, 13 Dec 2016 16:36:51 -0800 Subject: [PATCH 0197/1214] fixing groff reference --- lib/linguist/languages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index e56720042a..a57bb4bcb3 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3123,7 +3123,7 @@ Perl6: language_id: 283 Pic: type: markup - group: Groff + group: Roff tm_scope: source.pic extensions: - ".pic" From a1165b74b1c34f9776f762593ea62f4ce3c19c2e Mon Sep 17 00:00:00 2001 From: Brandon Black Date: Thu, 15 Dec 2016 13:55:40 -0800 Subject: [PATCH 0198/1214] reverting accidental changes to language ids cc @twp --- lib/linguist/languages.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index a57bb4bcb3..096c7b1013 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2894,7 +2894,7 @@ OpenSCAD: - ".scad" tm_scope: none ace_mode: scad - language_id: 431 + language_id: 266 OpenType Feature File: type: data aliases: @@ -2903,7 +2903,7 @@ OpenType Feature File: - ".fea" tm_scope: source.opentype ace_mode: text - language_id: 266 + language_id: 374317347 Org: type: prose wrap: true @@ -3352,7 +3352,7 @@ Python: - ".wsgi" - ".xpy" filenames: - - .gclient + - ".gclient" - BUCK - BUILD - SConscript @@ -4036,14 +4036,14 @@ SourcePawn: - ".sma" tm_scope: source.sp ace_mode: text - language_id: 432 + language_id: 354 Spline Font Database: type: data extensions: - ".sfd" tm_scope: text.sfd ace_mode: yaml - language_id: 354 + language_id: 767169629 Squirrel: type: programming color: "#800000" From a4d12cc8e42aae26a9469edb9fedb25a7cdbc9e9 Mon Sep 17 00:00:00 2001 From: Brandon Black Date: Thu, 22 Dec 2016 16:55:22 -0800 Subject: [PATCH 0199/1214] Release v5.0.0 (#3388) * bumping version to v5.0.0 * updating license information * reverting accidental changes to language ids cc @twp * Updating grammars --- grammars.yml | 1 - lib/linguist/version.rb | 2 +- vendor/CodeMirror | 2 +- vendor/grammars/ABNF.tmbundle | 2 +- vendor/grammars/AutoHotkey | 2 +- vendor/grammars/Handlebars | 2 +- vendor/grammars/Lean.tmbundle | 2 +- vendor/grammars/MagicPython | 2 +- vendor/grammars/PHP-Twig.tmbundle | 2 +- vendor/grammars/SublimePapyrus | 2 +- vendor/grammars/atom-language-1c-bsl | 2 +- vendor/grammars/atomic-dreams | 2 +- vendor/grammars/c.tmbundle | 2 +- vendor/grammars/language-blade | 2 +- vendor/grammars/language-coffee-script | 2 +- vendor/grammars/language-csharp | 2 +- vendor/grammars/language-csound | 2 +- vendor/grammars/language-haskell | 2 +- vendor/grammars/language-javascript | 2 +- vendor/grammars/language-jsoniq | 2 +- vendor/grammars/language-less | 2 +- vendor/grammars/language-renpy | 2 +- vendor/grammars/language-shellscript | 2 +- vendor/grammars/language-viml | 2 +- vendor/grammars/language-yaml | 2 +- vendor/grammars/latex.tmbundle | 2 +- vendor/grammars/llvm.tmbundle | 2 +- vendor/grammars/objective-c.tmbundle | 2 +- vendor/grammars/pawn-sublime-language | 2 +- vendor/grammars/perl.tmbundle | 2 +- vendor/grammars/perl6fe | 2 +- vendor/grammars/php.tmbundle | 2 +- vendor/grammars/rascal-syntax-highlighting | 2 +- vendor/grammars/sublime-mask | 2 +- vendor/grammars/sublime-pony | 2 +- vendor/grammars/sublime-rexx | 2 +- vendor/grammars/sublime-rust | 2 +- vendor/grammars/sublime-typescript | 2 +- vendor/grammars/sublimeassembly | 2 +- vendor/grammars/swift.tmbundle | 2 +- vendor/grammars/vue-syntax-highlight | 2 +- vendor/licenses/grammar/ninja.tmbundle.txt | 5 +++++ 42 files changed, 45 insertions(+), 41 deletions(-) create mode 100644 vendor/licenses/grammar/ninja.tmbundle.txt diff --git a/grammars.yml b/grammars.yml index b83a7e0fbc..030961fbea 100755 --- a/grammars.yml +++ b/grammars.yml @@ -390,7 +390,6 @@ vendor/grammars/language-inform7: - source.inform7 vendor/grammars/language-javascript: - source.js -- source.js.embedded.html - source.js.regexp - source.js.regexp.replacement vendor/grammars/language-jsoniq: diff --git a/lib/linguist/version.rb b/lib/linguist/version.rb index 6e7db9100f..42e8834350 100644 --- a/lib/linguist/version.rb +++ b/lib/linguist/version.rb @@ -1,3 +1,3 @@ module Linguist - VERSION = "4.8.18" + VERSION = "5.0.0" end diff --git a/vendor/CodeMirror b/vendor/CodeMirror index db12d64243..900659feeb 160000 --- a/vendor/CodeMirror +++ b/vendor/CodeMirror @@ -1 +1 @@ -Subproject commit db12d64243ee9d2994e12ffb2935ebac0cbf3c1c +Subproject commit 900659feeb6d4ce95abb68c7d68767c1bb586111 diff --git a/vendor/grammars/ABNF.tmbundle b/vendor/grammars/ABNF.tmbundle index 86a961c91b..0042b3d7ee 160000 --- a/vendor/grammars/ABNF.tmbundle +++ b/vendor/grammars/ABNF.tmbundle @@ -1 +1 @@ -Subproject commit 86a961c91ba7a48cd9a07bcac5cb63196f0bfe63 +Subproject commit 0042b3d7ee21b2f800a8f80d42761513f16d9a52 diff --git a/vendor/grammars/AutoHotkey b/vendor/grammars/AutoHotkey index 6ba0aedaf8..dc20ea3b61 160000 --- a/vendor/grammars/AutoHotkey +++ b/vendor/grammars/AutoHotkey @@ -1 +1 @@ -Subproject commit 6ba0aedaf8bdbdbe69b9bc1876ebd3668c8e1cca +Subproject commit dc20ea3b615d902fc43045c1073353af5f9e0edf diff --git a/vendor/grammars/Handlebars b/vendor/grammars/Handlebars index 48053b9263..ed851e0c67 160000 --- a/vendor/grammars/Handlebars +++ b/vendor/grammars/Handlebars @@ -1 +1 @@ -Subproject commit 48053b926339fcbadc9ddb4415f6f885b7439de5 +Subproject commit ed851e0c67c2b674b6ca00c49414544aebbfbc07 diff --git a/vendor/grammars/Lean.tmbundle b/vendor/grammars/Lean.tmbundle index fa8fcd2856..e56b352bfc 160000 --- a/vendor/grammars/Lean.tmbundle +++ b/vendor/grammars/Lean.tmbundle @@ -1 +1 @@ -Subproject commit fa8fcd2856945972a64dcba6f288cfb632a424c8 +Subproject commit e56b352bfc2bfc6b28154a8d7d68e469a454386b diff --git a/vendor/grammars/MagicPython b/vendor/grammars/MagicPython index 94a6bb00db..a605599caf 160000 --- a/vendor/grammars/MagicPython +++ b/vendor/grammars/MagicPython @@ -1 +1 @@ -Subproject commit 94a6bb00db9362157b864b5be71f5f6f6ebe70ac +Subproject commit a605599caf04f031ba3ca08af307d927b1295635 diff --git a/vendor/grammars/PHP-Twig.tmbundle b/vendor/grammars/PHP-Twig.tmbundle index 9e802d525e..77def406d7 160000 --- a/vendor/grammars/PHP-Twig.tmbundle +++ b/vendor/grammars/PHP-Twig.tmbundle @@ -1 +1 @@ -Subproject commit 9e802d525ed87a90ec7ff842f44c0c992fd56521 +Subproject commit 77def406d70b90dff33d006478198b729e23d22c diff --git a/vendor/grammars/SublimePapyrus b/vendor/grammars/SublimePapyrus index a08e2c0d76..aaef57c245 160000 --- a/vendor/grammars/SublimePapyrus +++ b/vendor/grammars/SublimePapyrus @@ -1 +1 @@ -Subproject commit a08e2c0d76b75874ab7bc68145635130c6f004f4 +Subproject commit aaef57c245ee648b4f638fcb07f5d9c40191713f diff --git a/vendor/grammars/atom-language-1c-bsl b/vendor/grammars/atom-language-1c-bsl index 9f2fbd73dd..12edd3a54c 160000 --- a/vendor/grammars/atom-language-1c-bsl +++ b/vendor/grammars/atom-language-1c-bsl @@ -1 +1 @@ -Subproject commit 9f2fbd73ddd65d06fd15e18861e263f9d92b8b12 +Subproject commit 12edd3a54c9132b190d2c817d3d8ec1846b2a65b diff --git a/vendor/grammars/atomic-dreams b/vendor/grammars/atomic-dreams index 7a4fb5a692..234b52d482 160000 --- a/vendor/grammars/atomic-dreams +++ b/vendor/grammars/atomic-dreams @@ -1 +1 @@ -Subproject commit 7a4fb5a692e44b82115a0fb5415333b5d12e2b99 +Subproject commit 234b52d4828230d7741c35af2681619b55e972eb diff --git a/vendor/grammars/c.tmbundle b/vendor/grammars/c.tmbundle index 936e4347d2..9aa3658822 160000 --- a/vendor/grammars/c.tmbundle +++ b/vendor/grammars/c.tmbundle @@ -1 +1 @@ -Subproject commit 936e4347d22d1a821588551ca8f7e960c1242120 +Subproject commit 9aa365882274ca52f01722f3dbb169b9539a20ee diff --git a/vendor/grammars/language-blade b/vendor/grammars/language-blade index a5cdd44eb0..14104c18a9 160000 --- a/vendor/grammars/language-blade +++ b/vendor/grammars/language-blade @@ -1 +1 @@ -Subproject commit a5cdd44eb03cbbba43e634079dec851f06efcc25 +Subproject commit 14104c18a9e1ebc9228c551b34f30d71a4da3e4d diff --git a/vendor/grammars/language-coffee-script b/vendor/grammars/language-coffee-script index 1c528b5929..f480a6b985 160000 --- a/vendor/grammars/language-coffee-script +++ b/vendor/grammars/language-coffee-script @@ -1 +1 @@ -Subproject commit 1c528b59298832db23e60915826fddd1463bd310 +Subproject commit f480a6b98584ead689a6a1a0143c5ec6d05e7122 diff --git a/vendor/grammars/language-csharp b/vendor/grammars/language-csharp index daf3fe2d64..8ae27bcae8 160000 --- a/vendor/grammars/language-csharp +++ b/vendor/grammars/language-csharp @@ -1 +1 @@ -Subproject commit daf3fe2d64d7e9892836fdf7e1bf509f8b8bfbdf +Subproject commit 8ae27bcae845933c438678c0825fc4bbfca7ea7e diff --git a/vendor/grammars/language-csound b/vendor/grammars/language-csound index 29d8eca1a8..2f112c9f60 160000 --- a/vendor/grammars/language-csound +++ b/vendor/grammars/language-csound @@ -1 +1 @@ -Subproject commit 29d8eca1a8366295b9c7f052cbc667983d337a75 +Subproject commit 2f112c9f60f03b1f2fc24454c127891b46eac5b3 diff --git a/vendor/grammars/language-haskell b/vendor/grammars/language-haskell index 04b140b2ae..78189f5b71 160000 --- a/vendor/grammars/language-haskell +++ b/vendor/grammars/language-haskell @@ -1 +1 @@ -Subproject commit 04b140b2aeb631c4a739c687a6e3d51188c2647e +Subproject commit 78189f5b7183d2190a15ccc7872811ceb0932918 diff --git a/vendor/grammars/language-javascript b/vendor/grammars/language-javascript index f1cf9a61e8..ea15b19139 160000 --- a/vendor/grammars/language-javascript +++ b/vendor/grammars/language-javascript @@ -1 +1 @@ -Subproject commit f1cf9a61e8f7ef55dd85a8564928f1b36bef4d39 +Subproject commit ea15b19139b531f4cf55e8e3ad63949d20bce200 diff --git a/vendor/grammars/language-jsoniq b/vendor/grammars/language-jsoniq index 7e2a77f372..5e400b06f1 160000 --- a/vendor/grammars/language-jsoniq +++ b/vendor/grammars/language-jsoniq @@ -1 +1 @@ -Subproject commit 7e2a77f3720f5a221bc9aaa2a136c26a38af3f6a +Subproject commit 5e400b06f1b417746c4c6aff42a2a938b6ef2f82 diff --git a/vendor/grammars/language-less b/vendor/grammars/language-less index 256cb078f8..c671f35467 160000 --- a/vendor/grammars/language-less +++ b/vendor/grammars/language-less @@ -1 +1 @@ -Subproject commit 256cb078f8a5c2d2db40f79c5781b01194a97cbd +Subproject commit c671f35467ac1fb2dbc4f3e5c9c20d982a9bf5bf diff --git a/vendor/grammars/language-renpy b/vendor/grammars/language-renpy index 82a4b91306..16b9983bda 160000 --- a/vendor/grammars/language-renpy +++ b/vendor/grammars/language-renpy @@ -1 +1 @@ -Subproject commit 82a4b9130679d6602b9b3908fe938f9c50a04476 +Subproject commit 16b9983bdaeabb7ec41a9c5bd7c44b285449bed6 diff --git a/vendor/grammars/language-shellscript b/vendor/grammars/language-shellscript index 201d9b827e..77fd446cc1 160000 --- a/vendor/grammars/language-shellscript +++ b/vendor/grammars/language-shellscript @@ -1 +1 @@ -Subproject commit 201d9b827ebe733902f5d7d4bc628c62e0bb0e1d +Subproject commit 77fd446cc1122b6a2b358a48913b2b80f6299be7 diff --git a/vendor/grammars/language-viml b/vendor/grammars/language-viml index cec8c86334..c4bd6d26af 160000 --- a/vendor/grammars/language-viml +++ b/vendor/grammars/language-viml @@ -1 +1 @@ -Subproject commit cec8c86334ff5b57ad1d0bdc51323eabd26423d5 +Subproject commit c4bd6d26afcd539e6499a2076a1c617647187644 diff --git a/vendor/grammars/language-yaml b/vendor/grammars/language-yaml index bfc075c017..d63dffb62b 160000 --- a/vendor/grammars/language-yaml +++ b/vendor/grammars/language-yaml @@ -1 +1 @@ -Subproject commit bfc075c01786ace17e1224a9c131a72f8607d12a +Subproject commit d63dffb62bc5eeb0681e8c886ec639cd80722563 diff --git a/vendor/grammars/latex.tmbundle b/vendor/grammars/latex.tmbundle index 68f128d4cd..acbc3453c4 160000 --- a/vendor/grammars/latex.tmbundle +++ b/vendor/grammars/latex.tmbundle @@ -1 +1 @@ -Subproject commit 68f128d4cd339acf5274a9c9f0fd456a7a7beff8 +Subproject commit acbc3453c4aa044ee3bfb940d791d445bae40b6f diff --git a/vendor/grammars/llvm.tmbundle b/vendor/grammars/llvm.tmbundle index 203c955af9..5db1a160f0 160000 --- a/vendor/grammars/llvm.tmbundle +++ b/vendor/grammars/llvm.tmbundle @@ -1 +1 @@ -Subproject commit 203c955af9c8c48c2bb3808a9ebb547ce3cead1c +Subproject commit 5db1a160f09b041777d1ed8f1a98a4386a363e38 diff --git a/vendor/grammars/objective-c.tmbundle b/vendor/grammars/objective-c.tmbundle index e4ade8721f..fb27129049 160000 --- a/vendor/grammars/objective-c.tmbundle +++ b/vendor/grammars/objective-c.tmbundle @@ -1 +1 @@ -Subproject commit e4ade8721f205363fac2a3412807cfc50f726d9e +Subproject commit fb271290491fda66730f5dd90abd5c3787fb7c5e diff --git a/vendor/grammars/pawn-sublime-language b/vendor/grammars/pawn-sublime-language index 2940b429a6..bfac000d59 160000 --- a/vendor/grammars/pawn-sublime-language +++ b/vendor/grammars/pawn-sublime-language @@ -1 +1 @@ -Subproject commit 2940b429a66f300ccf07020e63a799afab6522bd +Subproject commit bfac000d591ab10fb3d2f984a69d8184c4315d12 diff --git a/vendor/grammars/perl.tmbundle b/vendor/grammars/perl.tmbundle index dedebdcfd4..7a786e331d 160000 --- a/vendor/grammars/perl.tmbundle +++ b/vendor/grammars/perl.tmbundle @@ -1 +1 @@ -Subproject commit dedebdcfd43e7be93ea713c1932eb770fcbcea0d +Subproject commit 7a786e331dec2012f2f4321e26cdf8b946a5ae75 diff --git a/vendor/grammars/perl6fe b/vendor/grammars/perl6fe index 7f646ac13a..84aa57300b 160000 --- a/vendor/grammars/perl6fe +++ b/vendor/grammars/perl6fe @@ -1 +1 @@ -Subproject commit 7f646ac13afbe87957e3ab9326d415031ce92b9a +Subproject commit 84aa57300bc012f75e7a394aa02cd3805bcc5ca8 diff --git a/vendor/grammars/php.tmbundle b/vendor/grammars/php.tmbundle index 3ed4837b43..010cc1c22c 160000 --- a/vendor/grammars/php.tmbundle +++ b/vendor/grammars/php.tmbundle @@ -1 +1 @@ -Subproject commit 3ed4837b43d3f650ebb525b068636281942883a0 +Subproject commit 010cc1c22c89c117ad4c985997668c3903dc37f0 diff --git a/vendor/grammars/rascal-syntax-highlighting b/vendor/grammars/rascal-syntax-highlighting index 13f2e4040c..3388b060f4 160000 --- a/vendor/grammars/rascal-syntax-highlighting +++ b/vendor/grammars/rascal-syntax-highlighting @@ -1 +1 @@ -Subproject commit 13f2e4040cb91ea720d04a46357cdb0a0b73c862 +Subproject commit 3388b060f41ac2de986a05f3b19000cb03877fa9 diff --git a/vendor/grammars/sublime-mask b/vendor/grammars/sublime-mask index 8b2a4b3300..647cf75a8f 160000 --- a/vendor/grammars/sublime-mask +++ b/vendor/grammars/sublime-mask @@ -1 +1 @@ -Subproject commit 8b2a4b3300ef30f293218521cd2aa94335cad114 +Subproject commit 647cf75a8f4041e99a0f24b030babb9d926eb7a1 diff --git a/vendor/grammars/sublime-pony b/vendor/grammars/sublime-pony index a4fe061d26..a23b3b3187 160000 --- a/vendor/grammars/sublime-pony +++ b/vendor/grammars/sublime-pony @@ -1 +1 @@ -Subproject commit a4fe061d2648037b45e2e50490c33e677f78f464 +Subproject commit a23b3b318789d32941af340ae7253506a22a0591 diff --git a/vendor/grammars/sublime-rexx b/vendor/grammars/sublime-rexx index a649cf3aef..c263f248ee 160000 --- a/vendor/grammars/sublime-rexx +++ b/vendor/grammars/sublime-rexx @@ -1 +1 @@ -Subproject commit a649cf3aefdade911e71f3cf086678c16b47fbbd +Subproject commit c263f248ee82b98545819d0a618edec8229165ab diff --git a/vendor/grammars/sublime-rust b/vendor/grammars/sublime-rust index 9792e3be0e..3bc8200ec7 160000 --- a/vendor/grammars/sublime-rust +++ b/vendor/grammars/sublime-rust @@ -1 +1 @@ -Subproject commit 9792e3be0e470231f8c36eff19441a1813950f7c +Subproject commit 3bc8200ec709ce9ceaa9f73117f6c2efa3265a0b diff --git a/vendor/grammars/sublime-typescript b/vendor/grammars/sublime-typescript index 3475f8febc..ac15373c6c 160000 --- a/vendor/grammars/sublime-typescript +++ b/vendor/grammars/sublime-typescript @@ -1 +1 @@ -Subproject commit 3475f8febcdd02b10477903652dd82a03cb3acac +Subproject commit ac15373c6cdb62decb2c296db9916e7a420bb39e diff --git a/vendor/grammars/sublimeassembly b/vendor/grammars/sublimeassembly index 2599ced076..41f2b92d32 160000 --- a/vendor/grammars/sublimeassembly +++ b/vendor/grammars/sublimeassembly @@ -1 +1 @@ -Subproject commit 2599ced076f6147d6456a60de9ff83f2507c9e6e +Subproject commit 41f2b92d326d35c3a9261da4f99a43b4ad7f07e8 diff --git a/vendor/grammars/swift.tmbundle b/vendor/grammars/swift.tmbundle index 0d618bff2b..c7aca87ccb 160000 --- a/vendor/grammars/swift.tmbundle +++ b/vendor/grammars/swift.tmbundle @@ -1 +1 @@ -Subproject commit 0d618bff2bf15aca63a5d529ac00b5b4f2e99918 +Subproject commit c7aca87ccb7887cb5f5510c6dfe914d9bb073dae diff --git a/vendor/grammars/vue-syntax-highlight b/vendor/grammars/vue-syntax-highlight index e6f8cd9668..ef872e4f1c 160000 --- a/vendor/grammars/vue-syntax-highlight +++ b/vendor/grammars/vue-syntax-highlight @@ -1 +1 @@ -Subproject commit e6f8cd966813296bc1b9eb63a82eda3d206fe171 +Subproject commit ef872e4f1c54724970dba4d9f7d2dcb3b522a084 diff --git a/vendor/licenses/grammar/ninja.tmbundle.txt b/vendor/licenses/grammar/ninja.tmbundle.txt new file mode 100644 index 0000000000..238a07eac0 --- /dev/null +++ b/vendor/licenses/grammar/ninja.tmbundle.txt @@ -0,0 +1,5 @@ +--- +type: grammar +name: ninja.tmbundle +license: other +--- From 7867b946b92e7953ff71f41a53176fabcc36cc71 Mon Sep 17 00:00:00 2001 From: Darin Morrison Date: Thu, 22 Dec 2016 18:03:18 -0700 Subject: [PATCH 0200/1214] Add support for Reason (#3336) --- .gitmodules | 4 +- grammars.yml | 3 + lib/linguist/languages.yml | 14 + samples/C++/bug1163046.--skeleton.re | 46 + samples/C++/cnokw.re | 239 +++++ samples/C++/cvsignore.re | 63 ++ samples/C++/simple.re | 13 + samples/Reason/JSX.re | 483 ++++++++++ samples/Reason/Layout.re | 1326 ++++++++++++++++++++++++++ samples/Reason/Machine.re | 344 +++++++ samples/Reason/SuperMerlin.re | 308 ++++++ samples/Reason/Syntax.re | 989 +++++++++++++++++++ vendor/grammars/reason | 1 + vendor/licenses/grammar/reason.txt | 35 + 14 files changed, 3867 insertions(+), 1 deletion(-) create mode 100644 samples/C++/bug1163046.--skeleton.re create mode 100644 samples/C++/cnokw.re create mode 100644 samples/C++/cvsignore.re create mode 100644 samples/C++/simple.re create mode 100644 samples/Reason/JSX.re create mode 100644 samples/Reason/Layout.re create mode 100644 samples/Reason/Machine.re create mode 100644 samples/Reason/SuperMerlin.re create mode 100644 samples/Reason/Syntax.re create mode 160000 vendor/grammars/reason create mode 100644 vendor/licenses/grammar/reason.txt diff --git a/.gitmodules b/.gitmodules index 8a4ae9fee2..c268e964af 100644 --- a/.gitmodules +++ b/.gitmodules @@ -809,4 +809,6 @@ [submodule "vendor/grammars/rascal-syntax-highlighting"] path = vendor/grammars/rascal-syntax-highlighting url = https://github.com/usethesource/rascal-syntax-highlighting - +[submodule "vendor/grammars/reason"] + path = vendor/grammars/reason + url = https://github.com/facebook/reason diff --git a/grammars.yml b/grammars.yml index 030961fbea..097989ba57 100755 --- a/grammars.yml +++ b/grammars.yml @@ -541,6 +541,9 @@ vendor/grammars/r.tmbundle: - text.tex.latex.rd vendor/grammars/rascal-syntax-highlighting: - source.rascal +vendor/grammars/reason: +- source.reason +- source.reason.hover.type vendor/grammars/ruby-slim.tmbundle: - text.slim vendor/grammars/ruby.tmbundle: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 096c7b1013..19d30ed25e 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -499,6 +499,7 @@ C++: - ".inc" - ".inl" - ".ipp" + - ".re" - ".tcc" - ".tpp" language_id: 43 @@ -3548,6 +3549,19 @@ Raw token data: tm_scope: none ace_mode: text language_id: 318 +Reason: + type: programming + group: OCaml + ace_mode: rust + codemirror_mode: rust + codemirror_mime_type: text/x-rustsrc + extensions: + - ".re" + - ".rei" + interpreters: + - ocaml + tm_scope: source.reason + language_id: 869538413 Rebol: type: programming color: "#358a5b" diff --git a/samples/C++/bug1163046.--skeleton.re b/samples/C++/bug1163046.--skeleton.re new file mode 100644 index 0000000000..fee9bd6c7f --- /dev/null +++ b/samples/C++/bug1163046.--skeleton.re @@ -0,0 +1,46 @@ +#include + +#define YYCTYPE unsigned char +#define YYCURSOR cursor +#define YYLIMIT cursor +#define YYMARKER marker +#define YYFILL(n) + +bool scan(const char *text) +{ + YYCTYPE *start = (YYCTYPE *)text; + YYCTYPE *cursor = (YYCTYPE *)text; + YYCTYPE *marker = (YYCTYPE *)text; +next: + YYCTYPE *token = cursor; +/*!re2c +'(This file must be converted with BinHex 4.0)' + { + if (token == start || *(token - 1) == '\n') + return true; else goto next; + } +[\001-\377] + { goto next; } +[\000] + { return false; } +*/ + return false; +} + +#define do_scan(str, expect) \ + res = scan(str) == expect ? 0 : 1; \ + std::cerr << str << "\t-\t" << (res ? "fail" : "ok") << std::endl; \ + result += res + +/*!max:re2c */ + +int main(int,void**) +{ + int res, result = 0; + do_scan("(This file must be converted with BinHex 4.0)", 1); + do_scan("x(This file must be converted with BinHex 4.0)", 0); + do_scan("(This file must be converted with BinHex 4.0)x", 1); + do_scan("x(This file must be converted with BinHex 4.0)x", 0); + + return result; +} diff --git a/samples/C++/cnokw.re b/samples/C++/cnokw.re new file mode 100644 index 0000000000..bdc1279323 --- /dev/null +++ b/samples/C++/cnokw.re @@ -0,0 +1,239 @@ +#include +#include +#include + +#define ADDEQ 257 +#define ANDAND 258 +#define ANDEQ 259 +#define ARRAY 260 +#define ASM 261 +#define AUTO 262 +#define BREAK 263 +#define CASE 264 +#define CHAR 265 +#define CONST 266 +#define CONTINUE 267 +#define DECR 268 +#define DEFAULT 269 +#define DEREF 270 +#define DIVEQ 271 +#define DO 272 +#define DOUBLE 273 +#define ELLIPSIS 274 +#define ELSE 275 +#define ENUM 276 +#define EQL 277 +#define EXTERN 278 +#define FCON 279 +#define FLOAT 280 +#define FOR 281 +#define FUNCTION 282 +#define GEQ 283 +#define GOTO 284 +#define ICON 285 +#define ID 286 +#define IF 287 +#define INCR 288 +#define INT 289 +#define LEQ 290 +#define LONG 291 +#define LSHIFT 292 +#define LSHIFTEQ 293 +#define MODEQ 294 +#define MULEQ 295 +#define NEQ 296 +#define OREQ 297 +#define OROR 298 +#define POINTER 299 +#define REGISTER 300 +#define RETURN 301 +#define RSHIFT 302 +#define RSHIFTEQ 303 +#define SCON 304 +#define SHORT 305 +#define SIGNED 306 +#define SIZEOF 307 +#define STATIC 308 +#define STRUCT 309 +#define SUBEQ 310 +#define SWITCH 311 +#define TYPEDEF 312 +#define UNION 313 +#define UNSIGNED 314 +#define VOID 315 +#define VOLATILE 316 +#define WHILE 317 +#define XOREQ 318 +#define EOI 319 + +typedef unsigned int uint; +typedef unsigned char uchar; + +#define BSIZE 8192 + +#define YYCTYPE uchar +#define YYCURSOR cursor +#define YYLIMIT s->lim +#define YYMARKER s->ptr +#define YYFILL(n) {cursor = fill(s, cursor);} + +#define RET(i) {s->cur = cursor; return i;} + +typedef struct Scanner { + int fd; + uchar *bot, *tok, *ptr, *cur, *pos, *lim, *top, *eof; + uint line; +} Scanner; + +uchar *fill(Scanner *s, uchar *cursor){ + if(!s->eof){ + uint cnt = s->tok - s->bot; + if(cnt){ + memcpy(s->bot, s->tok, s->lim - s->tok); + s->tok = s->bot; + s->ptr -= cnt; + cursor -= cnt; + s->pos -= cnt; + s->lim -= cnt; + } + if((s->top - s->lim) < BSIZE){ + uchar *buf = (uchar*) malloc(((s->lim - s->bot) + BSIZE)*sizeof(uchar)); + memcpy(buf, s->tok, s->lim - s->tok); + s->tok = buf; + s->ptr = &buf[s->ptr - s->bot]; + cursor = &buf[cursor - s->bot]; + s->pos = &buf[s->pos - s->bot]; + s->lim = &buf[s->lim - s->bot]; + s->top = &s->lim[BSIZE]; + free(s->bot); + s->bot = buf; + } + if((cnt = read(s->fd, (char*) s->lim, BSIZE)) != BSIZE){ + s->eof = &s->lim[cnt]; *(s->eof)++ = '\n'; + } + s->lim += cnt; + } + return cursor; +} + +int scan(Scanner *s){ + uchar *cursor = s->cur; +std: + s->tok = cursor; +/*!re2c +any = [\000-\377]; +O = [0-7]; +D = [0-9]; +L = [a-zA-Z_]; +H = [a-fA-F0-9]; +E = [Ee] [+-]? D+; +FS = [fFlL]; +IS = [uUlL]*; +ESC = [\\] ([abfnrtv?'"\\] | "x" H+ | O+); +*/ + +/*!re2c + "/*" { goto comment; } + + L (L|D)* { RET(ID); } + + ("0" [xX] H+ IS?) | ("0" D+ IS?) | (D+ IS?) | + (['] (ESC|any\[\n\\'])* [']) + { RET(ICON); } + + (D+ E FS?) | (D* "." D+ E? FS?) | (D+ "." D* E? FS?) + { RET(FCON); } + + (["] (ESC|any\[\n\\"])* ["]) + { RET(SCON); } + + "..." { RET(ELLIPSIS); } + ">>=" { RET(RSHIFTEQ); } + "<<=" { RET(LSHIFTEQ); } + "+=" { RET(ADDEQ); } + "-=" { RET(SUBEQ); } + "*=" { RET(MULEQ); } + "/=" { RET(DIVEQ); } + "%=" { RET(MODEQ); } + "&=" { RET(ANDEQ); } + "^=" { RET(XOREQ); } + "|=" { RET(OREQ); } + ">>" { RET(RSHIFT); } + "<<" { RET(LSHIFT); } + "++" { RET(INCR); } + "--" { RET(DECR); } + "->" { RET(DEREF); } + "&&" { RET(ANDAND); } + "||" { RET(OROR); } + "<=" { RET(LEQ); } + ">=" { RET(GEQ); } + "==" { RET(EQL); } + "!=" { RET(NEQ); } + ";" { RET(';'); } + "{" { RET('{'); } + "}" { RET('}'); } + "," { RET(','); } + ":" { RET(':'); } + "=" { RET('='); } + "(" { RET('('); } + ")" { RET(')'); } + "[" { RET('['); } + "]" { RET(']'); } + "." { RET('.'); } + "&" { RET('&'); } + "!" { RET('!'); } + "~" { RET('~'); } + "-" { RET('-'); } + "+" { RET('+'); } + "*" { RET('*'); } + "/" { RET('/'); } + "%" { RET('%'); } + "<" { RET('<'); } + ">" { RET('>'); } + "^" { RET('^'); } + "|" { RET('|'); } + "?" { RET('?'); } + + + [ \t\v\f]+ { goto std; } + + "\n" + { + if(cursor == s->eof) RET(EOI); + s->pos = cursor; s->line++; + goto std; + } + + any + { + printf("unexpected character: %c\n", *s->tok); + goto std; + } +*/ + +comment: +/*!re2c + "*/" { goto std; } + "\n" + { + if(cursor == s->eof) RET(EOI); + s->tok = s->pos = cursor; s->line++; + goto comment; + } + any { goto comment; } +*/ +} + +main(){ + Scanner in; + int t; + memset((char*) &in, 0, sizeof(in)); + in.fd = 0; + while((t = scan(&in)) != EOI){ +/* + printf("%d\t%.*s\n", t, in.cur - in.tok, in.tok); + printf("%d\n", t); +*/ + } + close(in.fd); +} diff --git a/samples/C++/cvsignore.re b/samples/C++/cvsignore.re new file mode 100644 index 0000000000..1de9e16a58 --- /dev/null +++ b/samples/C++/cvsignore.re @@ -0,0 +1,63 @@ + +#define YYFILL(n) if (cursor >= limit) break; +#define YYCTYPE char +#define YYCURSOR cursor +#define YYLIMIT limit +#define YYMARKER marker + +/*!re2c +any = (.|"\n"); +value = (":" (.\"$")+)?; +cvsdat = "Date"; +cvsid = "Id"; +cvslog = "Log"; +cvsrev = "Revision"; +cvssrc = "Source"; +*/ + +#define APPEND(text) \ + append(output, outsize, text, sizeof(text) - sizeof(YYCTYPE)) + +inline void append(YYCTYPE *output, size_t & outsize, const YYCTYPE * text, size_t len) +{ + memcpy(output + outsize, text, len); + outsize += (len / sizeof(YYCTYPE)); +} + +void scan(YYCTYPE *pText, size_t *pSize, int *pbChanged) +{ + // rule + // scan lines + // find $ in lines + // compact $: .. $ to $$ + + YYCTYPE *output; + const YYCTYPE *cursor, *limit, *marker; + + cursor = marker = output = *pText; + + size_t insize = *pSize; + size_t outsize = 0; + + limit = cursor + insize; + + while(1) { +loop: +/*!re2c + +"$" cvsdat value "$" { APPEND(L"$" L"Date$"); goto loop; } +"$" cvsid value "$" { APPEND(L"$" L"Id$"); goto loop; } +"$" cvslog value "$" { APPEND(L"$" L"Log$"); goto loop; } +"$" cvsrev value "$" { APPEND(L"$" L"Revision$"); goto loop; } +"$" cvssrc value "$" { APPEND(L"$" L"Source$"); goto loop; } +any { output[outsize++] = cursor[-1]; if (cursor >= limit) break; goto loop; } + +*/ + } + output[outsize] = '\0'; + + // set the new size + *pSize = outsize; + + *pbChanged = (insize == outsize) ? 0 : 1; +} diff --git a/samples/C++/simple.re b/samples/C++/simple.re new file mode 100644 index 0000000000..5fd8891fdb --- /dev/null +++ b/samples/C++/simple.re @@ -0,0 +1,13 @@ +#define NULL ((char*) 0) +char *scan(char *p){ +char *q; +#define YYCTYPE char +#define YYCURSOR p +#define YYLIMIT p +#define YYMARKER q +#define YYFILL(n) +/*!re2c + [0-9]+ {return YYCURSOR;} + [\000-\377] {return NULL;} +*/ +} diff --git a/samples/Reason/JSX.re b/samples/Reason/JSX.re new file mode 100644 index 0000000000..ad2871d77c --- /dev/null +++ b/samples/Reason/JSX.re @@ -0,0 +1,483 @@ +type component = {displayName: string}; + +let module Bar = { + let createElement c::c=? children => { + displayName: "test" + }; +}; + +let module Nesting = { + let createElement children => { + displayName: "test" + }; +}; + +let module Much = { + let createElement children => { + displayName: "test" + }; +}; + +let module Foo = { + let createElement a::a=? b::b=? children => { + displayName: "test" + }; +}; + +let module One = { + let createElement + test::test=? + foo::foo=? + children => { + displayName: "test" + }; + let createElementobvioustypo + test::test + children => { + displayName: "test" + }; +}; + +let module Two = { + let createElement foo::foo=? children => { + displayName: "test" + }; +}; + +let module Sibling = { + let createElement + foo::foo=? + (children: list component) => { + displayName: "test" + }; +}; + +let module Test = { + let createElement yo::yo=? children => { + displayName: "test" + }; +}; + +let module So = { + let createElement children => { + displayName: "test" + }; +}; + +let module Foo2 = { + let createElement children => { + displayName: "test" + }; +}; + +let module Text = { + let createElement children => { + displayName: "test" + }; +}; + +let module Exp = { + let createElement children => { + displayName: "test" + }; +}; + +let module Pun = { + let createElement intended::intended=? children => { + displayName: "test" + }; +}; + +let module Namespace = { + let module Foo = { + let createElement + intended::intended=? + anotherOptional::x=100 + children => { + displayName: "test" + }; + }; +}; + +let module LotsOfArguments = { + let createElement + argument1::argument1=? + argument2::argument2=? + argument3::argument3=? + argument4::argument4=? + argument5::argument5=? + argument6::argument6=? + children => { + displayName: "test" + }; +}; + +let div argument1::argument1=? children => { + displayName: "test" +}; + +let module List1 = { + let createElement children => { + displayName: "test" + }; +}; + +let module List2 = { + let createElement children => { + displayName: "test" + }; +}; + +let module List3 = { + let createElement children => { + displayName: "test" + }; +}; + +let (/><) a b => a + b; + +let (><) a b => a + b; + +let (/>) a b => a + b; + +let (><\/) a b => a + b; + +let tag1 = 5 />< 6; + +let tag2 = 5 >< 7; + +let tag3 = 5 /> 7; + +let tag4 = 5 ><\/ 7; + +let b = 2; + +let selfClosing = ; + +let selfClosing2 = ; + +let selfClosing3 = + ; + +let a = a + 2) /> ; + +let a3 = ; + +let a4 = + + + + ; + +let a5 = "testing a string here" ; + +let a6 = + + "testing a string here" + + "another string" + + (2 + 4) + ; + +let intended = true; + +let punning = ; + +let namespace = ; + +let c = ; + +let d = ; + +let spaceBefore = + ; + +let spaceBefore2 = ; + +let siblingNotSpaced = + ; + +let jsxInList = []; + +let jsxInList2 = []; + +let jsxInListA = []; + +let jsxInListB = []; + +let jsxInListC = []; + +let jsxInListD = []; + +let jsxInList3 = [, , ]; + +let jsxInList4 = [, , ]; + +let jsxInList5 = [, ]; + +let jsxInList6 = [, ]; + +let jsxInList7 = [, ]; + +let jsxInList8 = [, ]; + +let testFunc b => b; + +let jsxInFnCall = testFunc ; + +let lotsOfArguments = + + + ; + +let lowerCase =
; + +let b = 0; + +let d = 0; + +/* + * Should pun the first example: + */ +let a = 5 ; + +let a = 5 ; + +let a = 5 ; + +let a = 0.55 ; + +let a = Foo.createElement "" [@JSX]; + +let ident = a ; + +let fragment1 = <> ; + +let fragment2 = <> ; + +let fragment3 = <> ; + +let fragment4 = <> ; + +let fragment5 = <> ; + +let fragment6 = <> ; + +let fragment7 = <> ; + +let fragment8 = <> ; + +let fragment9 = <> 2 2 2 2 ; + +let fragment10 = <> 2.2 3.2 4.6 1.2 ; + +let fragment11 = <> "str" ; + +let fragment12 = <> (6 + 2) (6 + 2) (6 + 2) ; + +let fragment13 = <> fragment11 fragment11 ; + +let listOfItems1 = 1 2 3 4 5 ; + +let listOfItems2 = + 1.0 2.8 3.8 4.0 5.1 ; + +let listOfItems3 = + fragment11 fragment11 ; + +/* + * Several sequential simple jsx expressions must be separated with a space. + */ +let thisIsRight a b => (); + +let tagOne children => (); + +let tagTwo children => (); + +/* thisIsWrong ; */ +thisIsRight ; + +/* thisIsWrong ; */ +thisIsRight ; + +let a children => (); + +let b children => (); + +let thisIsOkay = + ; + +let thisIsAlsoOkay = + ; + +/* Doesn't make any sense, but suppose you defined an + infix operator to compare jsx */ + < ; + + > ; + + < ; + + > ; + +let listOfListOfJsx = [<> ]; + +let listOfListOfJsx = [<> ]; + +let listOfListOfJsx = [ + <> , + <> +]; + +let listOfListOfJsx = [ + <> , + <> , + ...listOfListOfJsx +]; + +let sameButWithSpaces = [<> ]; + +let sameButWithSpaces = [<> ]; + +let sameButWithSpaces = [ + <> , + <> +]; + +let sameButWithSpaces = [ + <> , + <> , + ...sameButWithSpaces +]; + +/* + * Test named tag right next to an open bracket. + */ +let listOfJsx = []; + +let listOfJsx = []; + +let listOfJsx = [, ]; + +let listOfJsx = [, , ...listOfJsx]; + +let sameButWithSpaces = []; + +let sameButWithSpaces = []; + +let sameButWithSpaces = [, ]; + +let sameButWithSpaces = [ + , + , + ...sameButWithSpaces +]; + + +/** + * Test no conflict with polymorphic variant types. + */ +type thisType = [ | `Foo | `Bar]; + +type t 'a = [< thisType] as 'a; + +let asd = + "a" "b" [@foo]; + +let asd2 = + One.createElementobvioustypo + test::false + ["a", "b"] + [@JSX] + [@foo]; + +let span + test::(test: bool) + foo::(foo: int) + children => 1; + +let asd = + "a" "b" [@foo]; + +/* "video" call doesn't end with a list, so the expression isn't converted to JSX */ +let video test::(test: bool) children => children; + +let asd2 = video test::false 10 [@JSX] [@foo]; + +let div children => 1; + +((fun () => div) ()) [] [@JSX]; + +let myFun () => + <> + + + + + + + + + + + + ; + +let myFun () => <> ; + +let myFun () => + <> + + + + + + + + + + + + ; + + +/** + * Children should wrap without forcing attributes to. + */ + + + + + +; +/** + * Failing test cases: + */ +/* let res = ) > */ +/* */ +/* ; */ +/* let res = ) />; */ diff --git a/samples/Reason/Layout.re b/samples/Reason/Layout.re new file mode 100644 index 0000000000..f9d813881d --- /dev/null +++ b/samples/Reason/Layout.re @@ -0,0 +1,1326 @@ +/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ +/* + * From css-layout comments: + * The spec describes four different layout modes: "fill available", "max + * content", "min content", and "fit content". Of these, we don't use + * "min content" because we don't support default minimum main sizes (see + * above for details). Each of our measure modes maps to a layout mode + * from the spec (https://www.w3.org/TR/css3-sizing/#terms): + * + * -.CssMeasureModeUndefined: `max-content` + * -.CssMeasureModeExactly: `fill-available` + * -.CssMeasureModeAtMost: `fit-content` + * If infinite space available in that axis, then `max-content.` + * Else, `min(max-content size, max(min-content size, fill-available size))` + * (Although, we don't support min-content) + */ +open LayoutTypes; + +open LayoutValue; + +open LayoutSupport; + +let gCurrentGenerationCount = ref 0; + +let gDepth = ref 0; + +let gPrintTree = {contents: false}; + +let gPrintChanges = {contents: false}; + +let gPrintSkips = {contents: false}; + +let measureString = "measure"; + +let stretchString = "stretch"; + +let absMeasureString = "abs-measure"; + +let absLayoutString = "abs-layout"; + +let initialString = "initial"; + +let flexString = "flex"; + +let spacer = " "; + +let getSpacer level => { + let spacerLen = String.length spacer; + let lvl = level > spacerLen ? level : spacerLen; + String.sub spacer lvl (String.length spacer) +}; + +let getModeName (mode, isLayoutInsteadOfMeasure) => + switch mode { + | CSS_MEASURE_MODE_NEGATIVE_ONE_WHATEVER_THAT_MEANS => + isLayoutInsteadOfMeasure ? + "CSS_MEASURE_MODE_NEGATIVE_ONE_WHATEVER_THAT_MEANS" : + "CSS_MEASURE_MODE_NEGATIVE_ONE_WHATEVER_THAT_MEANS" + | CssMeasureModeUndefined => isLayoutInsteadOfMeasure ? "LAY_UNDEFINED" : "UNDEFINED" + | CssMeasureModeExactly => isLayoutInsteadOfMeasure ? "LAY_EXACTLY" : "EXACTLY" + | CssMeasureModeAtMost => isLayoutInsteadOfMeasure ? "LAY_AT_MOST" : "AT_MOST" + }; + +let canUseCachedMeasurement + ( + availableWidth, + availableHeight, + marginRow, + marginColumn, + widthMeasureMode, + heightMeasureMode, + cachedLayout + ) => + if ( + cachedLayout.availableWidth == availableWidth && + cachedLayout.availableHeight == availableHeight && + cachedLayout.widthMeasureMode == widthMeasureMode && cachedLayout.heightMeasureMode == heightMeasureMode + ) { + true + } else if + /* Is it an exact match?*/ + /* If the width is an exact match, try a fuzzy match on the height.*/ + ( + cachedLayout.widthMeasureMode == widthMeasureMode && + cachedLayout.availableWidth == availableWidth && + heightMeasureMode === CssMeasureModeExactly && + availableHeight -. marginColumn == cachedLayout.computedHeight + ) { + true + } else if + /* If the height is an exact match, try a fuzzy match on the width.*/ + ( + cachedLayout.heightMeasureMode == heightMeasureMode && + cachedLayout.availableHeight == availableHeight && + widthMeasureMode === CssMeasureModeExactly && availableWidth -. marginRow == cachedLayout.computedWidth + ) { + true + } else { + false + }; + +let cachedMeasurementAt layout i => + switch i { + | 0 => layout.cachedMeasurement1 + | 1 => layout.cachedMeasurement2 + | 2 => layout.cachedMeasurement3 + | 3 => layout.cachedMeasurement4 + | 4 => layout.cachedMeasurement5 + | 5 => layout.cachedMeasurement6 + | _ => raise (Invalid_argument ("No cached measurement at " ^ string_of_int i)) + }; + + +/** + * This is a wrapper around the layoutNodeImpl function. It determines + * whether the layout request is redundant and can be skipped. + * + * Parameters: + * Input parameters are the same as layoutNodeImpl (see above) + * Return parameter is true if layout was performed, false if skipped + */ +let rec layoutNodeInternal + node + availableWidth + availableHeight + parentDirection + widthMeasureMode + heightMeasureMode + performLayout + reason => { + let layout = node.layout; + gDepth.contents = gDepth.contents + 1; + let needToVisitNode = + node.isDirty node.context && layout.generationCount != gCurrentGenerationCount.contents || + layout.lastParentDirection != parentDirection; + if needToVisitNode { + /* Invalidate the cached results.*/ + layout.nextCachedMeasurementsIndex = 0; + layout.cachedLayout.widthMeasureMode = CSS_MEASURE_MODE_NEGATIVE_ONE_WHATEVER_THAT_MEANS; + layout.cachedLayout.heightMeasureMode = CSS_MEASURE_MODE_NEGATIVE_ONE_WHATEVER_THAT_MEANS + }; + let cachedResults = ref None; + /* Determine whether the results are already cached. We maintain a separate*/ + /* cache for layouts and measurements. A layout operation modifies the positions*/ + /* and dimensions for nodes in the subtree. The algorithm assumes that each node*/ + /* gets layed out a maximum of one time per tree layout, but multiple measurements*/ + /* may be required to resolve all of the flex dimensions.*/ + /* We handle nodes with measure functions specially here because they are the most + * expensive to measure, so it's worth avoiding redundant measurements if at all possible.*/ + if (node.measure !== dummyMeasure && node.childrenCount === 0) { + let marginAxisRow = getMarginAxis node CssFlexDirectionRow; + let marginAxisColumn = getMarginAxis node CssFlexDirectionColumn; + /* First, try to use the layout cache.*/ + if ( + canUseCachedMeasurement ( + availableWidth, + availableHeight, + marginAxisRow, + marginAxisColumn, + widthMeasureMode, + heightMeasureMode, + layout.cachedLayout + ) + ) { + cachedResults.contents = Some layout.cachedLayout + } else { + /* Try to use the measurement cache.*/ + let foundCached = {contents: false}; + for i in 0 to (layout.nextCachedMeasurementsIndex - 1) { + /* This is basically the "break" */ + if (not foundCached.contents) { + let cachedMeasurementAtIndex = cachedMeasurementAt layout i; + if ( + canUseCachedMeasurement ( + availableWidth, + availableHeight, + marginAxisRow, + marginAxisColumn, + widthMeasureMode, + heightMeasureMode, + cachedMeasurementAtIndex + ) + ) { + cachedResults.contents = Some cachedMeasurementAtIndex; + foundCached.contents = true + } + } + } + } + } else if performLayout { + if ( + layout.cachedLayout.availableWidth == availableWidth && + layout.cachedLayout.availableHeight == availableHeight && + layout.cachedLayout.widthMeasureMode == widthMeasureMode && + layout.cachedLayout.heightMeasureMode == heightMeasureMode + ) { + cachedResults.contents = Some layout.cachedLayout + } + } else { + let foundCached = {contents: false}; + for i in 0 to (layout.nextCachedMeasurementsIndex - 1) { + /* This is basically the "break" */ + if (not foundCached.contents) { + let cachedMeasurementAtIndex = cachedMeasurementAt layout i; + if ( + cachedMeasurementAtIndex.availableWidth == availableWidth && + cachedMeasurementAtIndex.availableHeight == availableHeight && + cachedMeasurementAtIndex.widthMeasureMode == widthMeasureMode && + cachedMeasurementAtIndex.heightMeasureMode == heightMeasureMode + ) { + cachedResults.contents = Some cachedMeasurementAtIndex; + foundCached.contents = true + } + } + } + }; + if (not needToVisitNode && cachedResults.contents != None) { + let cachedResults_ = + switch cachedResults.contents { + | None => raise (Invalid_argument "Not possible") + | Some cr => cr + }; + layout.measuredWidth = cachedResults_.computedWidth; + layout.measuredHeight = cachedResults_.computedHeight; + if (gPrintChanges.contents && gPrintSkips.contents) { + Printf.printf "%s%d.{[skipped] " (getSpacer gDepth.contents) gDepth.contents; + switch node.print { + | None => () + | Some printer => printer node.context + }; + Printf.printf + "wm: %s, hm: %s, aw: %s ah: %s => d: (%s, %s) %s\n" + (getModeName (widthMeasureMode, performLayout)) + (getModeName (heightMeasureMode, performLayout)) + (scalarToString availableWidth) + (scalarToString availableHeight) + (scalarToString cachedResults_.computedWidth) + (scalarToString cachedResults_.computedHeight) + reason + } + } else { + if gPrintChanges.contents { + Printf.printf "%s%d.{%s" (getSpacer gDepth.contents) gDepth.contents (needToVisitNode ? "*" : ""); + switch node.print { + | None => () + | Some printer => printer node.context + }; + Printf.printf + "wm: %s, hm: %s, aw: %s ah: %s %s\n" + (getModeName (widthMeasureMode, performLayout)) + (getModeName (heightMeasureMode, performLayout)) + (scalarToString availableWidth) + (scalarToString availableHeight) + reason + }; + layoutNodeImpl ( + node, + availableWidth, + availableHeight, + parentDirection, + widthMeasureMode, + heightMeasureMode, + performLayout + ); + if gPrintChanges.contents { + Printf.printf "%s%d.}%s" (getSpacer gDepth.contents) gDepth.contents (needToVisitNode ? "*" : ""); + switch node.print { + | None => () + | Some printer => printer node.context + }; + Printf.printf + "wm: %s, hm: %s, d: (%s, %s) %s\n" + (getModeName (widthMeasureMode, performLayout)) + (getModeName (heightMeasureMode, performLayout)) + (scalarToString layout.measuredWidth) + (scalarToString layout.measuredHeight) + reason + }; + layout.lastParentDirection = parentDirection; + if (cachedResults.contents === None) { + if (layout.nextCachedMeasurementsIndex == css_max_cached_result_count) { + if gPrintChanges.contents { + Printf.printf "Out of cache entries!\n" + }; + layout.nextCachedMeasurementsIndex = 0 + }; + let newCacheEntry = + performLayout ? + /* Use the single layout cache entry.*/ + layout.cachedLayout : + { + /* Allocate a new measurement cache entry.*/ + let newCacheEntry_ = cachedMeasurementAt layout layout.nextCachedMeasurementsIndex; + layout.nextCachedMeasurementsIndex = layout.nextCachedMeasurementsIndex + 1; + newCacheEntry_ + }; + newCacheEntry.availableWidth = availableWidth; + newCacheEntry.availableHeight = availableHeight; + newCacheEntry.widthMeasureMode = widthMeasureMode; + newCacheEntry.heightMeasureMode = heightMeasureMode; + newCacheEntry.computedWidth = layout.measuredWidth; + newCacheEntry.computedHeight = layout.measuredHeight + } + }; + if performLayout { + node.layout.width = node.layout.measuredWidth; + node.layout.height = node.layout.measuredHeight; + layout.hasNewLayout = true + }; + gDepth.contents = gDepth.contents - 1; + layout.generationCount = gCurrentGenerationCount.contents; + needToVisitNode || cachedResults.contents === None +} +and computeChildFlexBasis node child width widthMode height heightMode direction => { + let mainAxis = resolveAxis node.style.flexDirection direction; + let isMainAxisRow = isRowDirection mainAxis; + let childWidth = {contents: zero}; + let childHeight = {contents: zero}; + let childWidthMeasureMode = {contents: CssMeasureModeUndefined}; + let childHeightMeasureMode = {contents: CssMeasureModeUndefined}; + if (isMainAxisRow && isStyleDimDefined child.contents CssFlexDirectionRow) { + child.contents.layout.computedFlexBasis = + fmaxf child.contents.style.width (getPaddingAndBorderAxis child.contents CssFlexDirectionRow) + } else if ( + not isMainAxisRow && isStyleDimDefined child.contents CssFlexDirectionColumn + ) { + child.contents.layout.computedFlexBasis = + fmaxf child.contents.style.height (getPaddingAndBorderAxis child.contents CssFlexDirectionColumn) + } else if ( + not (isUndefined child.contents.style.flexBasis) + ) { + if (isUndefined child.contents.layout.computedFlexBasis) { + child.contents.layout.computedFlexBasis = + fmaxf child.contents.style.flexBasis (getPaddingAndBorderAxis child.contents mainAxis) + } + } else { + childWidth.contents = cssUndefined; + childHeight.contents = cssUndefined; + childWidthMeasureMode.contents = CssMeasureModeUndefined; + childHeightMeasureMode.contents = CssMeasureModeUndefined; + if (isStyleDimDefined child.contents CssFlexDirectionRow) { + childWidth.contents = child.contents.style.width +. getMarginAxis child.contents CssFlexDirectionRow; + childWidthMeasureMode.contents = CssMeasureModeExactly + }; + + /** + * Why can't this just be inlined to .height !== cssUndefined. + */ + if (isStyleDimDefined child.contents CssFlexDirectionColumn) { + childHeight.contents = + child.contents.style.height +. getMarginAxis child.contents CssFlexDirectionColumn; + childHeightMeasureMode.contents = CssMeasureModeExactly + }; + if (not isMainAxisRow && node.style.overflow === Scroll || node.style.overflow !== Scroll) { + if (isUndefined childWidth.contents && not (isUndefined width)) { + childWidth.contents = width; + childWidthMeasureMode.contents = CssMeasureModeAtMost + } + }; + if (isMainAxisRow && node.style.overflow === Scroll || node.style.overflow !== Scroll) { + if (isUndefined childHeight.contents && not (isUndefined height)) { + childHeight.contents = height; + childHeightMeasureMode.contents = CssMeasureModeAtMost + } + }; + /* + * If child has no defined size in the cross axis and is set to + * stretch, set the cross axis to be measured exactly with the + * available inner width. + */ + if ( + not isMainAxisRow && + not (isUndefined width) && + not (isStyleDimDefined child.contents CssFlexDirectionRow) && + widthMode === CssMeasureModeExactly && getAlignItem node child.contents === CssAlignStretch + ) { + childWidth.contents = width; + childWidthMeasureMode.contents = CssMeasureModeExactly + }; + if ( + isMainAxisRow && + not (isUndefined height) && + not (isStyleDimDefined child.contents CssFlexDirectionColumn) && + heightMode === CssMeasureModeExactly && getAlignItem node child.contents === CssAlignStretch + ) { + childHeight.contents = height; + childHeightMeasureMode.contents = CssMeasureModeExactly + }; + let _ = + layoutNodeInternal + child.contents + childWidth.contents + childHeight.contents + direction + childWidthMeasureMode.contents + childHeightMeasureMode.contents + false + measureString; + child.contents.layout.computedFlexBasis = + fmaxf + (isMainAxisRow ? child.contents.layout.measuredWidth : child.contents.layout.measuredHeight) + (getPaddingAndBorderAxis child.contents mainAxis) + } +} +/** + * By default, mathematical operations are floating point. + */ +and layoutNodeImpl + ( + node, + availableWidth, + availableHeight, + parentDirection, + widthMeasureMode, + heightMeasureMode, + performLayout + ) => { + + /** START_GENERATED **/ + /* re_assert */ + /* (isUndefined availableWidth ? widthMeasureMode === CssMeasureModeUndefined : true) */ + /* "availableWidth is indefinite so widthMeasureMode must be CssMeasureModeUndefined"; */ + /* re_assert */ + /* (isUndefined availableHeight ? heightMeasureMode === CssMeasureModeUndefined : true) */ + /* "availableHeight is indefinite so heightMeasureMode must be CssMeasureModeUndefined"; */ + let paddingAndBorderAxisRow = getPaddingAndBorderAxis node CssFlexDirectionRow; + let paddingAndBorderAxisColumn = getPaddingAndBorderAxis node CssFlexDirectionColumn; + let marginAxisRow = getMarginAxis node CssFlexDirectionRow; + let marginAxisColumn = getMarginAxis node CssFlexDirectionColumn; + let direction = resolveDirection node parentDirection; + node.layout.direction = direction; + /* For content (text) nodes, determine the dimensions based on the text + contents. */ + if (node.measure !== dummyMeasure && node.childrenCount === 0) { + let innerWidth = availableWidth -. marginAxisRow -. paddingAndBorderAxisRow; + let innerHeight = availableHeight -. marginAxisColumn -. paddingAndBorderAxisColumn; + if (widthMeasureMode === CssMeasureModeExactly && heightMeasureMode === CssMeasureModeExactly) { + node.layout.measuredWidth = boundAxis node CssFlexDirectionRow (availableWidth -. marginAxisRow); + node.layout.measuredHeight = + boundAxis node CssFlexDirectionColumn (availableHeight -. marginAxisColumn) + } else if ( + not (isUndefined innerWidth) && innerWidth <= zero || + not (isUndefined innerHeight) && innerHeight <= zero + ) { + node.layout.measuredWidth = boundAxis node CssFlexDirectionRow zero; + node.layout.measuredHeight = boundAxis node CssFlexDirectionColumn zero + } else { + let measureDim = node.measure node innerWidth widthMeasureMode innerHeight heightMeasureMode; + node.layout.measuredWidth = + boundAxis + node + CssFlexDirectionRow + ( + widthMeasureMode === CssMeasureModeUndefined || widthMeasureMode === CssMeasureModeAtMost ? + measureDim.width +. paddingAndBorderAxisRow : availableWidth -. marginAxisRow + ); + node.layout.measuredHeight = + boundAxis + node + CssFlexDirectionColumn + ( + heightMeasureMode === CssMeasureModeUndefined || heightMeasureMode === CssMeasureModeAtMost ? + measureDim.height +. paddingAndBorderAxisColumn : availableHeight -. marginAxisColumn + ) + } + } else { + let childCount = Array.length node.children; + if (childCount === 0) { + node.layout.measuredWidth = + boundAxis + node + CssFlexDirectionRow + ( + widthMeasureMode === CssMeasureModeUndefined || widthMeasureMode === CssMeasureModeAtMost ? + paddingAndBorderAxisRow : availableWidth -. marginAxisRow + ); + node.layout.measuredHeight = + boundAxis + node + CssFlexDirectionColumn + ( + heightMeasureMode === CssMeasureModeUndefined || heightMeasureMode === CssMeasureModeAtMost ? + paddingAndBorderAxisColumn : availableHeight -. marginAxisColumn + ) + } else { + let shouldContinue = {contents: true}; + if (not performLayout) { + if ( + ( + ( + widthMeasureMode === CssMeasureModeAtMost && + not (isUndefined availableWidth) && availableWidth <= zero + ) && + heightMeasureMode === CssMeasureModeAtMost + ) && + not (isUndefined availableHeight) && availableHeight <= zero + ) { + node.layout.measuredWidth = boundAxis node CssFlexDirectionRow zero; + node.layout.measuredHeight = boundAxis node CssFlexDirectionColumn zero; + shouldContinue.contents = false + } else if ( + widthMeasureMode === CssMeasureModeAtMost && + not (isUndefined availableWidth) && availableWidth <= zero + ) { + node.layout.measuredWidth = boundAxis node CssFlexDirectionRow zero; + node.layout.measuredHeight = + boundAxis + node + CssFlexDirectionColumn + (isUndefined availableHeight ? zero : availableHeight -. marginAxisColumn); + shouldContinue.contents = false + } else if ( + heightMeasureMode === CssMeasureModeAtMost && + not (isUndefined availableHeight) && availableHeight <= zero + ) { + node.layout.measuredWidth = + boundAxis + node CssFlexDirectionRow (isUndefined availableWidth ? zero : availableWidth -. marginAxisRow); + node.layout.measuredHeight = boundAxis node CssFlexDirectionColumn zero; + shouldContinue.contents = false + } else if ( + widthMeasureMode === CssMeasureModeExactly && heightMeasureMode === CssMeasureModeExactly + ) { + node.layout.measuredWidth = boundAxis node CssFlexDirectionRow (availableWidth -. marginAxisRow); + node.layout.measuredHeight = + boundAxis node CssFlexDirectionColumn (availableHeight -. marginAxisColumn); + shouldContinue.contents = false + } + }; + if shouldContinue.contents { + let mainAxis = resolveAxis node.style.flexDirection direction; + let crossAxis = getCrossFlexDirection mainAxis direction; + let isMainAxisRow = isRowDirection mainAxis; + let justifyContent = node.style.justifyContent; + let isNodeFlexWrap = node.style.flexWrap === CssWrap; + let firstAbsoluteChild = {contents: theNullNode}; + let currentAbsoluteChild = {contents: theNullNode}; + let leadingPaddingAndBorderMain = getLeadingPaddingAndBorder node mainAxis; + let trailingPaddingAndBorderMain = getTrailingPaddingAndBorder node mainAxis; + let leadingPaddingAndBorderCross = getLeadingPaddingAndBorder node crossAxis; + let paddingAndBorderAxisMain = getPaddingAndBorderAxis node mainAxis; + let paddingAndBorderAxisCross = getPaddingAndBorderAxis node crossAxis; + let measureModeMainDim = isMainAxisRow ? widthMeasureMode : heightMeasureMode; + let measureModeCrossDim = isMainAxisRow ? heightMeasureMode : widthMeasureMode; + let availableInnerWidth = availableWidth -. marginAxisRow -. paddingAndBorderAxisRow; + let availableInnerHeight = availableHeight -. marginAxisColumn -. paddingAndBorderAxisColumn; + let availableInnerMainDim = isMainAxisRow ? availableInnerWidth : availableInnerHeight; + let availableInnerCrossDim = isMainAxisRow ? availableInnerHeight : availableInnerWidth; + let child = {contents: theNullNode}; + /* let i = 0; */ + /* STEP 3: DETERMINE FLEX BASIS FOR EACH ITEM */ + for i in 0 to (childCount - 1) { + child.contents = node.children.(i); + if performLayout { + let childDirection = resolveDirection child.contents direction; + setPosition child.contents childDirection + }; + if (child.contents.style.positionType === CssPositionAbsolute) { + if (firstAbsoluteChild.contents === theNullNode) { + firstAbsoluteChild.contents = child.contents + }; + if (currentAbsoluteChild.contents !== theNullNode) { + currentAbsoluteChild.contents.nextChild = child.contents + }; + currentAbsoluteChild.contents = child.contents; + child.contents.nextChild = theNullNode + } else { + computeChildFlexBasis + node + child + availableInnerWidth + widthMeasureMode + availableInnerHeight + heightMeasureMode + direction + } + }; + /* STEP 4: COLLECT FLEX ITEMS INTO FLEX LINES */ + let startOfLineIndex = {contents: 0}; + let endOfLineIndex = {contents: 0}; + let lineCount = {contents: 0}; + let totalLineCrossDim = {contents: zero}; + let maxLineMainDim = {contents: zero}; + while (endOfLineIndex.contents < childCount) { + let itemsOnLine = {contents: 0}; + let sizeConsumedOnCurrentLine = {contents: zero}; + let totalFlexGrowFactors = {contents: zero}; + let totalFlexShrinkScaledFactors = {contents: zero}; + let curIndex = {contents: startOfLineIndex.contents}; + let firstRelativeChild = {contents: theNullNode}; + let currentRelativeChild = {contents: theNullNode}; + let shouldContinue = {contents: true}; + while (curIndex.contents < childCount && shouldContinue.contents) { + child.contents = node.children.(curIndex.contents); + child.contents.lineIndex = lineCount.contents; + if (child.contents.style.positionType !== CssPositionAbsolute) { + let outerFlexBasis = + child.contents.layout.computedFlexBasis +. getMarginAxis child.contents mainAxis; + if ( + ( + sizeConsumedOnCurrentLine.contents +. outerFlexBasis > availableInnerMainDim && isNodeFlexWrap + ) && + itemsOnLine.contents > 0 + ) { + shouldContinue.contents = false + } else { + sizeConsumedOnCurrentLine.contents = sizeConsumedOnCurrentLine.contents +. outerFlexBasis; + itemsOnLine.contents = itemsOnLine.contents + 1; + if (isFlex child.contents) { + totalFlexGrowFactors.contents = + totalFlexGrowFactors.contents +. child.contents.style.flexGrow; + totalFlexShrinkScaledFactors.contents = + totalFlexShrinkScaledFactors.contents +. + -. child.contents.style.flexShrink *. child.contents.layout.computedFlexBasis + }; + if (firstRelativeChild.contents === theNullNode) { + firstRelativeChild.contents = child.contents + }; + if (currentRelativeChild.contents !== theNullNode) { + currentRelativeChild.contents.nextChild = child.contents + }; + currentRelativeChild.contents = child.contents; + child.contents.nextChild = theNullNode; + curIndex.contents = curIndex.contents + 1; + endOfLineIndex.contents = endOfLineIndex.contents + 1 + } + } else { + curIndex.contents = curIndex.contents + 1; + endOfLineIndex.contents = endOfLineIndex.contents + 1 + } + }; + let canSkipFlex = not performLayout && measureModeCrossDim === CssMeasureModeExactly; + let leadingMainDim = {contents: zero}; + let betweenMainDim = {contents: zero}; + let remainingFreeSpace = {contents: zero}; + if (not (isUndefined availableInnerMainDim)) { + remainingFreeSpace.contents = availableInnerMainDim -. sizeConsumedOnCurrentLine.contents + } else if ( + sizeConsumedOnCurrentLine.contents < zero + ) { + remainingFreeSpace.contents = -. sizeConsumedOnCurrentLine.contents + }; + let originalRemainingFreeSpace = remainingFreeSpace.contents; + let deltaFreeSpace = {contents: zero}; + if (not canSkipFlex) { + let childFlexBasis = {contents: zero}; + let flexShrinkScaledFactor = {contents: zero}; + let flexGrowFactor = {contents: zero}; + let baseMainSize = {contents: zero}; + let boundMainSize = {contents: zero}; + let deltaFlexShrinkScaledFactors = {contents: zero}; + let deltaFlexGrowFactors = {contents: zero}; + currentRelativeChild.contents = firstRelativeChild.contents; + while (currentRelativeChild.contents !== theNullNode) { + childFlexBasis.contents = currentRelativeChild.contents.layout.computedFlexBasis; + if (remainingFreeSpace.contents < zero) { + flexShrinkScaledFactor.contents = + -. currentRelativeChild.contents.style.flexShrink *. childFlexBasis.contents; + if (flexShrinkScaledFactor.contents != zero) { + baseMainSize.contents = + childFlexBasis.contents +. + /* + * Important to first scale, then divide - to support fixed + * point encoding. + */ + flexShrinkScaledFactor.contents *. remainingFreeSpace.contents /. + totalFlexShrinkScaledFactors.contents; + boundMainSize.contents = + boundAxis currentRelativeChild.contents mainAxis baseMainSize.contents; + if (baseMainSize.contents != boundMainSize.contents) { + deltaFreeSpace.contents = + deltaFreeSpace.contents -. (boundMainSize.contents -. childFlexBasis.contents); + deltaFlexShrinkScaledFactors.contents = + deltaFlexShrinkScaledFactors.contents -. flexShrinkScaledFactor.contents + } + } + } else if ( + remainingFreeSpace.contents > zero + ) { + flexGrowFactor.contents = currentRelativeChild.contents.style.flexGrow; + if (flexGrowFactor.contents != zero) { + baseMainSize.contents = + childFlexBasis.contents +. + /* + * Important to first scale, then divide - to support fixed + * point encoding. + */ + flexGrowFactor.contents *. remainingFreeSpace.contents /. totalFlexGrowFactors.contents; + boundMainSize.contents = + boundAxis currentRelativeChild.contents mainAxis baseMainSize.contents; + if (baseMainSize.contents != boundMainSize.contents) { + deltaFreeSpace.contents = + deltaFreeSpace.contents -. (boundMainSize.contents -. childFlexBasis.contents); + deltaFlexGrowFactors.contents = deltaFlexGrowFactors.contents -. flexGrowFactor.contents + } + } + }; + currentRelativeChild.contents = currentRelativeChild.contents.nextChild + }; + totalFlexShrinkScaledFactors.contents = + totalFlexShrinkScaledFactors.contents +. deltaFlexShrinkScaledFactors.contents; + totalFlexGrowFactors.contents = totalFlexGrowFactors.contents +. deltaFlexGrowFactors.contents; + remainingFreeSpace.contents = remainingFreeSpace.contents +. deltaFreeSpace.contents; + deltaFreeSpace.contents = zero; + currentRelativeChild.contents = firstRelativeChild.contents; + while (currentRelativeChild.contents !== theNullNode) { + childFlexBasis.contents = currentRelativeChild.contents.layout.computedFlexBasis; + let updatedMainSize = {contents: childFlexBasis.contents}; + if (remainingFreeSpace.contents < zero) { + flexShrinkScaledFactor.contents = + -. currentRelativeChild.contents.style.flexShrink *. childFlexBasis.contents; + if (flexShrinkScaledFactor.contents != zero) { + updatedMainSize.contents = + boundAxis + currentRelativeChild.contents + mainAxis + ( + childFlexBasis.contents +. + /* + * Important to first scale, then divide - to support + * fixed point encoding. + */ + flexShrinkScaledFactor.contents *. remainingFreeSpace.contents /. + totalFlexShrinkScaledFactors.contents + ) + } + } else if ( + remainingFreeSpace.contents > zero + ) { + flexGrowFactor.contents = currentRelativeChild.contents.style.flexGrow; + if (flexGrowFactor.contents != zero) { + updatedMainSize.contents = + boundAxis + currentRelativeChild.contents + mainAxis + ( + childFlexBasis.contents +. + /* + * Important to first scale, then divide - to support + * fixed point encoding. + */ + flexGrowFactor.contents *. remainingFreeSpace.contents /. + totalFlexGrowFactors.contents + ) + } + }; + deltaFreeSpace.contents = + deltaFreeSpace.contents -. (updatedMainSize.contents -. childFlexBasis.contents); + let childWidth = {contents: zero}; + let childHeight = {contents: zero}; + let childWidthMeasureMode = {contents: CssMeasureModeUndefined}; + let childHeightMeasureMode = {contents: CssMeasureModeUndefined}; + if isMainAxisRow { + childWidth.contents = + updatedMainSize.contents +. + getMarginAxis currentRelativeChild.contents CssFlexDirectionRow; + childWidthMeasureMode.contents = CssMeasureModeExactly; + if ( + not (isUndefined availableInnerCrossDim) && + not (isStyleDimDefined currentRelativeChild.contents CssFlexDirectionColumn) && + heightMeasureMode === CssMeasureModeExactly && + getAlignItem node currentRelativeChild.contents === CssAlignStretch + ) { + childHeight.contents = availableInnerCrossDim; + childHeightMeasureMode.contents = CssMeasureModeExactly + } else if ( + not (isStyleDimDefined currentRelativeChild.contents CssFlexDirectionColumn) + ) { + childHeight.contents = availableInnerCrossDim; + childHeightMeasureMode.contents = + isUndefined childHeight.contents ? CssMeasureModeUndefined : CssMeasureModeAtMost + } else { + childHeight.contents = + currentRelativeChild.contents.style.height +. + getMarginAxis currentRelativeChild.contents CssFlexDirectionColumn; + childHeightMeasureMode.contents = CssMeasureModeExactly + } + } else { + childHeight.contents = + updatedMainSize.contents +. + getMarginAxis currentRelativeChild.contents CssFlexDirectionColumn; + childHeightMeasureMode.contents = CssMeasureModeExactly; + if ( + not (isUndefined availableInnerCrossDim) && + not (isStyleDimDefined currentRelativeChild.contents CssFlexDirectionRow) && + widthMeasureMode === CssMeasureModeExactly && + getAlignItem node currentRelativeChild.contents === CssAlignStretch + ) { + childWidth.contents = availableInnerCrossDim; + childWidthMeasureMode.contents = CssMeasureModeExactly + } else if ( + not (isStyleDimDefined currentRelativeChild.contents CssFlexDirectionRow) + ) { + childWidth.contents = availableInnerCrossDim; + childWidthMeasureMode.contents = + isUndefined childWidth.contents ? CssMeasureModeUndefined : CssMeasureModeAtMost + } else { + childWidth.contents = + currentRelativeChild.contents.style.width +. + getMarginAxis currentRelativeChild.contents CssFlexDirectionRow; + childWidthMeasureMode.contents = CssMeasureModeExactly + } + }; + let requiresStretchLayout = + not (isStyleDimDefined currentRelativeChild.contents crossAxis) && + getAlignItem node currentRelativeChild.contents === CssAlignStretch; + let _ = + layoutNodeInternal + currentRelativeChild.contents + childWidth.contents + childHeight.contents + direction + childWidthMeasureMode.contents + childHeightMeasureMode.contents + (performLayout && not requiresStretchLayout) + flexString; + currentRelativeChild.contents = currentRelativeChild.contents.nextChild + } + }; + remainingFreeSpace.contents = originalRemainingFreeSpace +. deltaFreeSpace.contents; + /* If we are using "at most" rules in the main axis. Calculate the remaining space when + constraint by the min size defined for the main axis. */ + if (measureModeMainDim === CssMeasureModeAtMost) { + let minDim = styleMinDimensionForAxis node mainAxis; + if (not (isUndefined minDim) && minDim >= 0) { + remainingFreeSpace.contents = + fmaxf 0 (minDim - (availableInnerMainDim -. remainingFreeSpace.contents)) + } else { + remainingFreeSpace.contents = zero + } + }; + switch justifyContent { + | CssJustifyCenter => leadingMainDim.contents = divideScalarByInt remainingFreeSpace.contents 2 + | CssJustifyFlexEnd => leadingMainDim.contents = remainingFreeSpace.contents + | CssJustifySpaceBetween => + if (itemsOnLine.contents > 1) { + betweenMainDim.contents = + divideScalarByInt (fmaxf remainingFreeSpace.contents zero) (itemsOnLine.contents - 1) + } else { + betweenMainDim.contents = zero + } + | CssJustifySpaceAround => + betweenMainDim.contents = divideScalarByInt remainingFreeSpace.contents itemsOnLine.contents; + leadingMainDim.contents = divideScalarByInt betweenMainDim.contents 2 + | CssJustifyFlexStart => () + }; + let mainDim = {contents: leadingPaddingAndBorderMain +. leadingMainDim.contents}; + let crossDim = {contents: zero}; + for i in startOfLineIndex.contents to (endOfLineIndex.contents - 1) { + child.contents = node.children.(i); + if ( + child.contents.style.positionType === CssPositionAbsolute && + isLeadingPosDefinedWithFallback child.contents mainAxis + ) { + if performLayout { + setLayoutLeadingPositionForAxis + child.contents + mainAxis + ( + getLeadingPositionWithFallback child.contents mainAxis +. getLeadingBorder node mainAxis +. + getLeadingMargin child.contents mainAxis + ) + } + } else { + if performLayout { + setLayoutLeadingPositionForAxis + child.contents + mainAxis + (layoutPosPositionForAxis child.contents mainAxis +. mainDim.contents) + }; + if (child.contents.style.positionType === CssPositionRelative) { + if canSkipFlex { + mainDim.contents = + mainDim.contents +. betweenMainDim.contents +. getMarginAxis child.contents mainAxis +. + child.contents.layout.computedFlexBasis; + crossDim.contents = availableInnerCrossDim + } else { + mainDim.contents = + mainDim.contents +. betweenMainDim.contents +. getDimWithMargin child.contents mainAxis; + crossDim.contents = fmaxf crossDim.contents (getDimWithMargin child.contents crossAxis) + } + } + } + }; + mainDim.contents = mainDim.contents +. trailingPaddingAndBorderMain; + let containerCrossAxis = {contents: availableInnerCrossDim}; + if ( + measureModeCrossDim === CssMeasureModeUndefined || measureModeCrossDim === CssMeasureModeAtMost + ) { + containerCrossAxis.contents = + boundAxis node crossAxis (crossDim.contents +. paddingAndBorderAxisCross) -. paddingAndBorderAxisCross; + if (measureModeCrossDim === CssMeasureModeAtMost) { + containerCrossAxis.contents = fminf containerCrossAxis.contents availableInnerCrossDim + } + }; + if (not isNodeFlexWrap && measureModeCrossDim === CssMeasureModeExactly) { + crossDim.contents = availableInnerCrossDim + }; + crossDim.contents = + boundAxis node crossAxis (crossDim.contents +. paddingAndBorderAxisCross) -. paddingAndBorderAxisCross; + /* + * STEP 7: CROSS-AXIS ALIGNMENT We can skip child alignment if we're + * just measuring the container. + */ + if performLayout { + for i in startOfLineIndex.contents to (endOfLineIndex.contents - 1) { + child.contents = node.children.(i); + if (child.contents.style.positionType === CssPositionAbsolute) { + if (isLeadingPosDefinedWithFallback child.contents crossAxis) { + setLayoutLeadingPositionForAxis + child.contents + crossAxis + ( + getLeadingPositionWithFallback child.contents crossAxis +. + getLeadingBorder node crossAxis +. + getLeadingMargin child.contents crossAxis + ) + } else { + setLayoutLeadingPositionForAxis + child.contents + crossAxis + (leadingPaddingAndBorderCross +. getLeadingMargin child.contents crossAxis) + } + } else { + let leadingCrossDim = {contents: leadingPaddingAndBorderCross}; + let alignItem = getAlignItem node child.contents; + if (alignItem === CssAlignStretch) { + let childWidth = {contents: zero}; + let childHeight = {contents: zero}; + let childWidthMeasureMode = {contents: CssMeasureModeUndefined}; + let childHeightMeasureMode = {contents: CssMeasureModeUndefined}; + childWidth.contents = + child.contents.layout.measuredWidth +. getMarginAxis child.contents CssFlexDirectionRow; + childHeight.contents = + child.contents.layout.measuredHeight +. + getMarginAxis child.contents CssFlexDirectionColumn; + let isCrossSizeDefinite = {contents: false}; + if isMainAxisRow { + isCrossSizeDefinite.contents = isStyleDimDefined child.contents CssFlexDirectionColumn; + childHeight.contents = crossDim.contents + } else { + isCrossSizeDefinite.contents = isStyleDimDefined child.contents CssFlexDirectionRow; + childWidth.contents = crossDim.contents + }; + if (not isCrossSizeDefinite.contents) { + childWidthMeasureMode.contents = + isUndefined childWidth.contents ? CssMeasureModeUndefined : CssMeasureModeExactly; + childHeightMeasureMode.contents = + isUndefined childHeight.contents ? CssMeasureModeUndefined : CssMeasureModeExactly; + let _ = + layoutNodeInternal + child.contents + childWidth.contents + childHeight.contents + direction + childWidthMeasureMode.contents + childHeightMeasureMode.contents + true + stretchString; + () + } + } else if ( + alignItem !== CssAlignFlexStart + ) { + let remainingCrossDim = + containerCrossAxis.contents -. getDimWithMargin child.contents crossAxis; + if (alignItem === CssAlignCenter) { + leadingCrossDim.contents = + leadingCrossDim.contents +. divideScalarByInt remainingCrossDim 2 + } else { + leadingCrossDim.contents = leadingCrossDim.contents +. remainingCrossDim + } + }; + setLayoutLeadingPositionForAxis + child.contents + crossAxis + ( + layoutPosPositionForAxis child.contents crossAxis +. totalLineCrossDim.contents +. + leadingCrossDim.contents + ) + } + } + }; + totalLineCrossDim.contents = totalLineCrossDim.contents +. crossDim.contents; + maxLineMainDim.contents = fmaxf maxLineMainDim.contents mainDim.contents; + lineCount.contents = lineCount.contents + 1; + startOfLineIndex.contents = endOfLineIndex.contents + }; + if (lineCount.contents > 1 && performLayout && not (isUndefined availableInnerCrossDim)) { + let remainingAlignContentDim = availableInnerCrossDim -. totalLineCrossDim.contents; + let crossDimLead = {contents: zero}; + let currentLead = {contents: leadingPaddingAndBorderCross}; + let alignContent = node.style.alignContent; + if (alignContent === CssAlignFlexEnd) { + currentLead.contents = currentLead.contents +. remainingAlignContentDim + } else if ( + alignContent === CssAlignCenter + ) { + currentLead.contents = currentLead.contents +. divideScalarByInt remainingAlignContentDim 2 + } else if ( + alignContent === CssAlignStretch + ) { + if (availableInnerCrossDim > totalLineCrossDim.contents) { + crossDimLead.contents = divideScalarByInt remainingAlignContentDim lineCount.contents + } + }; + let endIndex = {contents: 0}; + for i in 0 to (lineCount.contents - 1) { + let startIndex = endIndex.contents; + let j = {contents: startIndex}; + let lineHeight = {contents: zero}; + let shouldContinue = {contents: false}; + while (j.contents < childCount && shouldContinue.contents) { + child.contents = node.children.(j.contents); + if (child.contents.style.positionType === CssPositionRelative) { + if (child.contents.lineIndex !== i) { + shouldContinue.contents = false + } else if ( + isLayoutDimDefined child.contents crossAxis + ) { + lineHeight.contents = + fmaxf + lineHeight.contents + ( + layoutMeasuredDimensionForAxis child.contents crossAxis +. + getMarginAxis child.contents crossAxis + ) + } + }; + j.contents = j.contents + 1 + }; + endIndex.contents = j.contents; + lineHeight.contents = lineHeight.contents +. crossDimLead.contents; + if performLayout { + for j in startIndex to (endIndex.contents - 1) { + child.contents = node.children.(j); + if (child.contents.style.positionType === CssPositionRelative) { + switch (getAlignItem node child.contents) { + | CssAlignFlexStart => + setLayoutLeadingPositionForAxis + child.contents + crossAxis + (currentLead.contents +. getLeadingMargin child.contents crossAxis) + | CssAlignFlexEnd => + setLayoutLeadingPositionForAxis + child.contents + crossAxis + ( + currentLead.contents +. lineHeight.contents -. + getTrailingMargin child.contents crossAxis -. + layoutMeasuredDimensionForAxis child.contents crossAxis + ) + | CssAlignCenter => + let childHeight = layoutMeasuredDimensionForAxis child.contents crossAxis; + setLayoutLeadingPositionForAxis + child.contents + crossAxis + (currentLead.contents +. divideScalarByInt (lineHeight.contents -. childHeight) 2) + | CssAlignStretch => + setLayoutLeadingPositionForAxis + child.contents + crossAxis + (currentLead.contents +. getLeadingMargin child.contents crossAxis) + | CssAlignAuto => raise (Invalid_argument "getAlignItem should never return auto") + } + } + } + }; + currentLead.contents = currentLead.contents +. lineHeight.contents + } + }; + /* STEP 9: COMPUTING FINAL DIMENSIONS */ + node.layout.measuredWidth = boundAxis node CssFlexDirectionRow (availableWidth -. marginAxisRow); + node.layout.measuredHeight = + boundAxis node CssFlexDirectionColumn (availableHeight -. marginAxisColumn); + /* If the user didn't specify a width or height for the node, set the + * dimensions based on the children. */ + if (measureModeMainDim === CssMeasureModeUndefined) { + setLayoutMeasuredDimensionForAxis node mainAxis (boundAxis node mainAxis maxLineMainDim.contents) + } else if ( + measureModeMainDim === CssMeasureModeAtMost + ) { + setLayoutMeasuredDimensionForAxis + node + mainAxis + ( + fmaxf + ( + fminf + (availableInnerMainDim +. paddingAndBorderAxisMain) + (boundAxisWithinMinAndMax node mainAxis maxLineMainDim.contents) + ) + paddingAndBorderAxisMain + ) + }; + if (measureModeCrossDim === CssMeasureModeUndefined) { + setLayoutMeasuredDimensionForAxis + node + crossAxis + (boundAxis node crossAxis (totalLineCrossDim.contents +. paddingAndBorderAxisCross)) + } else if ( + measureModeCrossDim === CssMeasureModeAtMost + ) { + setLayoutMeasuredDimensionForAxis + node + crossAxis + ( + fmaxf + ( + fminf + (availableInnerCrossDim +. paddingAndBorderAxisCross) + ( + boundAxisWithinMinAndMax + node crossAxis (totalLineCrossDim.contents +. paddingAndBorderAxisCross) + ) + ) + paddingAndBorderAxisCross + ) + }; + currentAbsoluteChild.contents = firstAbsoluteChild.contents; + while (currentAbsoluteChild.contents !== theNullNode) { + if performLayout { + let childWidth = {contents: cssUndefined}; + let childHeight = {contents: cssUndefined}; + let childWidthMeasureMode = {contents: CssMeasureModeUndefined}; + let childHeightMeasureMode = {contents: CssMeasureModeUndefined}; + if (isStyleDimDefined currentAbsoluteChild.contents CssFlexDirectionRow) { + childWidth.contents = + currentAbsoluteChild.contents.style.width +. + getMarginAxis currentAbsoluteChild.contents CssFlexDirectionRow + } else if ( + isLeadingPosDefinedWithFallback currentAbsoluteChild.contents CssFlexDirectionRow && + isTrailingPosDefinedWithFallback currentAbsoluteChild.contents CssFlexDirectionRow + ) { + childWidth.contents = + node.layout.measuredWidth -. ( + getLeadingBorder node CssFlexDirectionRow +. getTrailingBorder node CssFlexDirectionRow + ) -. ( + getLeadingPositionWithFallback currentAbsoluteChild.contents CssFlexDirectionRow +. + getTrailingPositionWithFallback currentAbsoluteChild.contents CssFlexDirectionRow + ); + childWidth.contents = + boundAxis currentAbsoluteChild.contents CssFlexDirectionRow childWidth.contents + }; + if (isStyleDimDefined currentAbsoluteChild.contents CssFlexDirectionColumn) { + childHeight.contents = + currentAbsoluteChild.contents.style.height +. + getMarginAxis currentAbsoluteChild.contents CssFlexDirectionColumn + } else if ( + /* If the child doesn't have a specified height, compute the height based on the top/bottom offsets if they're defined. */ + isLeadingPosDefinedWithFallback currentAbsoluteChild.contents CssFlexDirectionColumn && + isTrailingPosDefinedWithFallback currentAbsoluteChild.contents CssFlexDirectionColumn + ) { + childHeight.contents = + node.layout.measuredHeight -. ( + getLeadingBorder node CssFlexDirectionColumn +. + getTrailingBorder node CssFlexDirectionColumn + ) -. ( + getLeadingPositionWithFallback currentAbsoluteChild.contents CssFlexDirectionColumn +. + getTrailingPositionWithFallback currentAbsoluteChild.contents CssFlexDirectionColumn + ); + childHeight.contents = + boundAxis currentAbsoluteChild.contents CssFlexDirectionColumn childHeight.contents + }; + if (isUndefined childWidth.contents || isUndefined childHeight.contents) { + childWidthMeasureMode.contents = + isUndefined childWidth.contents ? CssMeasureModeUndefined : CssMeasureModeExactly; + childHeightMeasureMode.contents = + isUndefined childHeight.contents ? CssMeasureModeUndefined : CssMeasureModeExactly; + /* + * According to the spec, if the main size is not definite and the + * child's inline axis is parallel to the main axis (i.e. it's + * horizontal), the child should be sized using "UNDEFINED" in + * the main size. Otherwise use "AT_MOST" in the cross axis. + */ + if ( + (not isMainAxisRow && isUndefined childWidth.contents) && + not (isUndefined availableInnerWidth) + ) { + childWidth.contents = availableInnerWidth; + childWidthMeasureMode.contents = CssMeasureModeAtMost + }; + /* + * If child has no defined size in the cross axis and is set to stretch, set the cross + * axis to be measured exactly with the available inner width + */ + let _ = + layoutNodeInternal + currentAbsoluteChild.contents + childWidth.contents + childHeight.contents + direction + childWidthMeasureMode.contents + childHeightMeasureMode.contents + false + absMeasureString; + childWidth.contents = + currentAbsoluteChild.contents.layout.measuredWidth +. + getMarginAxis currentAbsoluteChild.contents CssFlexDirectionRow; + childHeight.contents = + currentAbsoluteChild.contents.layout.measuredHeight +. + getMarginAxis currentAbsoluteChild.contents CssFlexDirectionColumn + }; + let _ = + layoutNodeInternal + currentAbsoluteChild.contents + childWidth.contents + childHeight.contents + direction + CssMeasureModeExactly + CssMeasureModeExactly + true + absLayoutString; + if ( + isTrailingPosDefinedWithFallback currentAbsoluteChild.contents mainAxis && + not (isLeadingPosDefinedWithFallback currentAbsoluteChild.contents mainAxis) + ) { + setLayoutLeadingPositionForAxis + currentAbsoluteChild.contents + mainAxis + ( + layoutMeasuredDimensionForAxis node mainAxis -. + layoutMeasuredDimensionForAxis currentAbsoluteChild.contents mainAxis -. + getTrailingPositionWithFallback currentAbsoluteChild.contents mainAxis + ) + }; + if ( + isTrailingPosDefinedWithFallback currentAbsoluteChild.contents crossAxis && + not (isLeadingPosDefinedWithFallback currentAbsoluteChild.contents crossAxis) + ) { + setLayoutLeadingPositionForAxis + currentAbsoluteChild.contents + crossAxis + ( + layoutMeasuredDimensionForAxis node crossAxis -. + layoutMeasuredDimensionForAxis currentAbsoluteChild.contents crossAxis -. + getTrailingPositionWithFallback currentAbsoluteChild.contents crossAxis + ) + } + }; + currentAbsoluteChild.contents = currentAbsoluteChild.contents.nextChild + }; + /* STEP 11: SETTING TRAILING POSITIONS FOR CHILDREN */ + if performLayout { + let needsMainTrailingPos = + mainAxis == CssFlexDirectionRowReverse || mainAxis == CssFlexDirectionColumnReverse; + let needsCrossTrailingPos = + crossAxis == CssFlexDirectionRowReverse || crossAxis == CssFlexDirectionColumnReverse; + /* Set trailing position if necessary. */ + if (needsMainTrailingPos || needsCrossTrailingPos) { + for i in 0 to (childCount - 1) { + let child = node.children.(i); + if needsMainTrailingPos { + setTrailingPosition node child mainAxis + }; + if needsCrossTrailingPos { + setTrailingPosition node child crossAxis + } + } + } + } + } + } + } + /** END_GENERATED **/ +}; + +let layoutNode node availableWidth availableHeight parentDirection => { + /* Increment the generation count. This will force the recursive routine to visit*/ + /* all dirty nodes at least once. Subsequent visits will be skipped if the input*/ + /* parameters don't change.*/ + gCurrentGenerationCount.contents = gCurrentGenerationCount.contents + 1; + /* If the caller didn't specify a height/width, use the dimensions*/ + /* specified in the style.*/ + let (availableWidth, widthMeasureMode) = + if (not (isUndefined availableWidth)) { + (availableWidth, CssMeasureModeExactly) + } else if ( + isStyleDimDefined node CssFlexDirectionRow + ) { + (node.style.width +. getMarginAxis node CssFlexDirectionRow, CssMeasureModeExactly) + } else if ( + node.style.maxWidth >= zero + ) { + (node.style.maxWidth, CssMeasureModeAtMost) + } else { + (availableWidth, CssMeasureModeUndefined) + }; + let (availableHeight, heightMeasureMode) = + if (not (isUndefined availableHeight)) { + (availableHeight, CssMeasureModeExactly) + } else if ( + isStyleDimDefined node CssFlexDirectionColumn + ) { + (node.style.height +. getMarginAxis node CssFlexDirectionColumn, CssMeasureModeExactly) + } else if ( + node.style.maxHeight >= zero + ) { + (node.style.maxHeight, CssMeasureModeAtMost) + } else { + (availableHeight, CssMeasureModeUndefined) + }; + if ( + layoutNodeInternal + node + availableWidth + availableHeight + parentDirection + widthMeasureMode + heightMeasureMode + true + initialString + ) { + setPosition node node.layout.direction; + if gPrintTree.contents { + LayoutPrint.printCssNode (node, {printLayout: true, printChildren: true, printStyle: true}) + } + } +}; \ No newline at end of file diff --git a/samples/Reason/Machine.re b/samples/Reason/Machine.re new file mode 100644 index 0000000000..11cb57433c --- /dev/null +++ b/samples/Reason/Machine.re @@ -0,0 +1,344 @@ +open Format; + +let module Endo = { + type t 'a = 'a => 'a; +}; + +let module Syntax = { + let module Var = { + type t = int; + }; + let module Term = { + type t = + | App t t + | Lam t + | Var Var.t + ; + }; + let module Sub = { + type t 'a = + | Cmp (t 'a) (t 'a) + | Dot 'a (t 'a) + | Id + | Shift + ; + + let map f sgm => { + let rec go = fun + | Cmp sgm0 sgm1 => Cmp (go sgm0) (go sgm1) + | Dot a sgm => Dot (f a) (go sgm) + | Id => Id + | Shift => Shift + ; + go sgm; + }; + + let rec apply sgm e => + switch (sgm, e) { + | (sgm, Term.App e0 e1) => Term.App (apply sgm e0) (apply sgm e1) + | (sgm, Term.Lam e) => Term.Lam (apply (Dot (Term.Var 0) (Cmp sgm Shift)) e) + | (Dot e _, Term.Var 0) => e + | (Dot _ sgm, Term.Var i) => apply sgm (Term.Var (i - 1)) + | (Id, Term.Var i) => Term.Var i + | (Shift, Term.Var i) => Term.Var (i + 1) + | (Cmp rho sgm, e) => apply sgm (apply rho e) + }; + }; +}; + +let module Zip = { + open Syntax; + type t 'a = + | App0 (t 'a) 'a + | App1 'a (t 'a) + | Halt + | Lam (t 'a) + ; + + let map f sgm => { + let rec go = fun + | App0 zip e1 => App0 (go zip) (f e1) + | App1 e0 zip => App1 (f e0) (go zip) + | Halt => Halt + | Lam zip => Lam (go zip) + ; + go sgm; + }; + + let rec apply zip acc => switch zip { + | App0 zip e1 => apply zip (Term.App acc e1) + | App1 e0 zip => apply zip (Term.App e0 acc) + | Halt => acc + | Lam zip => apply zip (Term.Lam acc) + }; +}; + +let module Clo = { + open Syntax; + type t = + | Clo Term.t (Sub.t t); + let rec from (Clo term sgm) => Sub.apply (Sub.map from sgm) term; +}; + +let module Pretty = { + let module Delim = { + type t = string; + let pp prev next fmt token => if (prev < next) { fprintf fmt "%s" token }; + }; + let module Prec = { + type t = int; + open Syntax.Term; + let calc = fun + | App _ _ => 1 + | Lam _ => 2 + | Var _ => 0 + ; + }; + let module Name = { + type t = string; + + let suffix = { + let script = fun + | 0 => "₀" + | 1 => "₁" + | 2 => "₂" + | 3 => "₃" + | 4 => "₄" + | 5 => "₅" + | 6 => "₆" + | 7 => "₇" + | 8 => "₈" + | 9 => "₉" + | _ => failwith "bad subscript"; + let rec go acc => fun + | 0 => acc + | n => go (script (n mod 10) ^ acc) (n / 10); + go "" + }; + + let gen = { + let offset = 97; + let width = 26; + fun () i => { + let code = i mod width + offset; + let char = Char.chr code; + let prime = i / width; + let suffix = suffix prime; + let name = Char.escaped char ^ suffix; + Some name; + } + }; + }; + + let module Env = { + type t = { + used: list Name.t, + rest: Stream.t Name.t, + }; + let mk () => { + let used = []; + let rest = Stream.from @@ Name.gen (); + { used, rest }; + }; + }; + + type printer 'a = Env.t => Prec.t => formatter => 'a => unit; + + let module Term = { + open Syntax.Term; + let rec pp ({ Env.used: used, rest } as env) prev fmt e => { + let next = Prec.calc e; + switch e { + | App e0 e1 => + fprintf fmt "@[%a%a@ %a%a@]" + (Delim.pp prev next) "(" + (pp env 1) e0 + (pp env 0) e1 + (Delim.pp prev next) ")" + | Lam e => + let name = Stream.next rest; + let env = { ...env, Env.used: [name, ...used] }; + fprintf fmt "%aλ%a.%a%a" + (Delim.pp prev next) "(" + (pp_print_string) name + (pp env next) e + (Delim.pp prev next) ")" + | Var index => + fprintf fmt "%s" @@ try (List.nth used index) { + | _ => "#" ^ string_of_int index + } + } + }; + }; + + let module Sub = { + open Syntax.Sub; + let rec pp pp_elem env prev fmt => fun + | Cmp sgm1 sgm0 => + fprintf fmt "@[%a;@ %a@]" + (pp pp_elem env prev) sgm1 + (pp pp_elem env prev) sgm0 + | Dot e sgm => + fprintf fmt "@[%a@ ·@ %a@]" + (pp_elem env prev) e + (pp pp_elem env prev) sgm + | Id => + fprintf fmt "ι" + | Shift => + fprintf fmt "↑" + ; + }; + + let module Clo = { + let rec pp env prev fmt (Clo.Clo e sgm) => { + let next = Prec.calc e; + fprintf fmt "@[%a%a%a[%a]@]" + (Delim.pp prev next) "(" + (Term.pp env next) e + (Delim.pp prev next) ")" + (Sub.pp pp env next) sgm + }; + }; + + let module Zip = { + open Zip; + let rec pp pp_elem env prev fmt => fun + | App0 zip elem => + fprintf fmt "inl@[⟨@,%a@,%a⟩@]" + (pp pp_elem env prev) zip + (pp_elem env prev) elem + | App1 elem zip => + fprintf fmt "inr@[⟨@,%a@,%a⟩@]" + (pp_elem env prev) elem + (pp pp_elem env prev) zip + | Halt => + fprintf fmt "halt" + | Lam zip => + fprintf fmt "lam@[⟨@,%a⟩@]" + (pp pp_elem env prev) zip + ; + }; +}; + +let module Machine = { + type t = { + clo: Clo.t, + ctx: Zip.t Clo.t, + }; + + let into e => { + open Clo; + open Syntax.Sub; + let clo = Clo e Id; + let ctx = Zip.Halt; + { clo, ctx } + }; + + let from { clo, ctx } => Zip.apply (Zip.map Clo.from ctx) (Clo.from clo); + + let pp fmt rule state => { + fprintf fmt "@[ctx ::@[@,%a@]@,clo ::@[@,%a@]@,rule ::@[@,%a@]@,term ::@[@,%a@]@]@." + (Pretty.Zip.pp Pretty.Clo.pp (Pretty.Env.mk ()) 2) state.ctx + (Pretty.Clo.pp (Pretty.Env.mk ()) 2) state.clo + (pp_print_string) rule + (Pretty.Term.pp (Pretty.Env.mk ()) 2) (from state) + }; + + let halted state => { + open Clo; + open Syntax.Sub; + open Syntax.Term; + switch state { + | { clo: Clo (Var _) Id, _ } => true + | _ => false + } [@warning "-4"]; + }; + + let step state => { + open Clo; + open Syntax.Sub; + open Syntax.Term; + let rule = ref ""; + let state = switch state { + /* left */ + | { clo: Clo (App e0 e1) sgm, ctx } => + let clo = Clo e0 sgm; + let ctx = Zip.App0 ctx (Clo e1 sgm); + rule := "LEFT"; + { clo, ctx }; + /* beta */ + | { clo: Clo (Lam e) sgm, ctx: Zip.App0 ctx c0 } => + let clo = Clo e (Cmp (Dot c0 sgm) Id); + rule := "BETA"; + { clo, ctx }; + /* lambda */ + | { clo: Clo (Lam e) sgm, ctx } => + let clo = Clo e (Cmp (Dot (Clo (Var 0) Id) (Cmp sgm Shift)) Id); + let ctx = Zip.Lam ctx; + rule := "LAMBDA"; + { clo, ctx }; + /* associate */ + | { clo: Clo (Var n) (Cmp (Cmp pi rho) sgm), ctx } => + let clo = Clo (Var n) (Cmp pi (Cmp rho sgm)); + rule := "ASSOCIATE"; + { clo, ctx }; + /* head */ + | { clo: Clo (Var 0) (Cmp (Dot (Clo e pi) _) sgm), ctx } => + let clo = Clo e (Cmp pi sgm); + rule := "HEAD"; + { clo, ctx }; + /* tail */ + | { clo: Clo (Var n) (Cmp (Dot (Clo _ _) rho) sgm), ctx } => + let clo = Clo (Var (n - 1)) (Cmp rho sgm); + rule := "TAIL"; + { clo, ctx }; + /* shift */ + | { clo: Clo (Var n) (Cmp Shift sgm), ctx } => + let clo = Clo (Var (n + 1)) sgm; + rule := "SHIFT"; + { clo, ctx }; + /* id */ + | { clo: Clo (Var n) (Cmp Id sgm), ctx } => + let clo = Clo (Var n) sgm; + rule := "ID"; + { clo, ctx }; + | _ => + pp std_formatter !rule state; + failwith "bad state"; + } [@warning "-4"]; + pp std_formatter !rule state; + state; + }; + + let norm e => { + let count = ref 0; + let state = ref (into e); + while (not (halted !state)) { + fprintf std_formatter "@\n--- step[%d] ---@\n" !count; + incr count; + state := step !state; + }; + from !state; + }; +}; + +let module Test = { + open Syntax.Term; + let l e => Lam e; + let ( *@ ) e0 e1 => App e0 e1; + let ff = l (l (Var 1)); + let tt = l (l (Var 0)); + let zero = l (l (Var 1)); + let succ = l (l (l (Var 0 *@ Var 2))); + let one = succ *@ zero; + let two = succ *@ one; + let three = succ *@ two; + let const = l (l (Var 1)); + let fix = l (l (Var 1 *@ (Var 0 *@ Var 0)) *@ l (Var 1 *@ (Var 0 *@ Var 0))); + let add = fix *@ l (l (l (Var 1 *@ Var 0 *@ l (succ *@ Var 3 *@ Var 0 *@ Var 1)))); + let init = l (l (Var 0) *@ l (l (Var 1))); +}; + +let module Run = { + let go () => Machine.norm Test.init; +}; \ No newline at end of file diff --git a/samples/Reason/SuperMerlin.re b/samples/Reason/SuperMerlin.re new file mode 100644 index 0000000000..feec78bccc --- /dev/null +++ b/samples/Reason/SuperMerlin.re @@ -0,0 +1,308 @@ +/* + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + */ +let startedMerlin: ref (option Js.Unsafe.any) = {contents: None}; + +let fixedEnv = Js.Unsafe.js_expr "require('../lib/fixedEnv')"; + +/* This and the subsequent big js blocks are copied over from Nuclide. More convenient for now. */ +let findNearestMerlinFile' = Js.Unsafe.js_expr {| + function findNearestMerlinFile(beginAtFilePath) { + var path = require('path'); + var fs = require('fs'); + var fileDir = path.dirname(beginAtFilePath); + var currentPath = path.resolve(fileDir); + do { + var fileToFind = path.join(currentPath, '.merlin'); + var hasFile = fs.existsSync(fileToFind); + if (hasFile) { + return path.dirname(currentPath); + } + + if (path.dirname(currentPath) === currentPath) { + // Bail + return '.'; + } + currentPath = path.dirname(currentPath); + } while (true); + } +|}; + +let findNearestMerlinFile beginAtFilePath::path => { + let result = Js.Unsafe.fun_call findNearestMerlinFile' [|Js.Unsafe.inject (Js.string path)|]; + Js.to_string result +}; + +let createMerlinReaderFnOnce' = Js.Unsafe.js_expr {| + function(ocamlMerlinPath, ocamlMerlinFlags, dotMerlinDir, fixedEnv) { + var spawn = require('child_process').spawn; + // To split while stripping out any leading/trailing space, we match on all + // *non*-whitespace. + var items = ocamlMerlinFlags === '' ? [] : ocamlMerlinFlags.split(/\s+/); + var merlinProcess = spawn(ocamlMerlinPath, items, {cwd: dotMerlinDir}); + merlinProcess.stderr.on('data', function(d) { + console.error('Ocamlmerlin: something wrong happened:'); + console.error(d.toString()); + }); + + merlinProcess.stdout.on('close', function(d) { + console.error('Ocamlmerlin: closed.'); + }); + + var cmdQueue = []; + var hasStartedReading = false; + + var readline = require('readline'); + var reader = readline.createInterface({ + input: merlinProcess.stdout, + terminal: false, + }); + + return function(cmd, resolve, reject) { + cmdQueue.push([resolve, reject]); + + if (!hasStartedReading) { + hasStartedReading = true; + reader.on('line', function(line) { + var response; + try { + response = JSON.parse(line); + } catch (err) { + response = null; + } + var resolveReject = cmdQueue.shift(); + var resolve = resolveReject[0]; + var reject = resolveReject[1]; + + if (!response || !Array.isArray(response) || response.length !== 2) { + reject(new Error('Unexpected ocamlmerlin output format: ' + line)); + return; + } + + var status = response[0]; + var content = response[1]; + + var errorResponses = { + 'failure': true, + 'error': true, + 'exception': true, + }; + + if (errorResponses[status]) { + reject(new Error('Ocamlmerlin returned an error: ' + line)); + return; + } + + resolve(content); + }); + } + + merlinProcess.stdin.write(JSON.stringify(cmd)); + }; + } +|}; + +let createMerlinReaderFnOnce + pathToMerlin::pathToMerlin + merlinFlags::merlinFlags + dotMerlinPath::dotMerlinPath => + Js.Unsafe.fun_call + createMerlinReaderFnOnce' + [| + Js.Unsafe.inject (Js.string pathToMerlin), + Js.Unsafe.inject (Js.string merlinFlags), + Js.Unsafe.inject (Js.string dotMerlinPath), + Js.Unsafe.inject fixedEnv + |]; + +let startMerlinProcess path::path => + switch startedMerlin.contents { + | Some readerFn => () + | None => + let atomReasonPathToMerlin = Atom.Config.get "atom-reason.pathToMerlin"; + let atomReasonMerlinFlags = Atom.Config.get "atom-reason.merlinFlags"; + let atomReasonMerlinLogFile = Atom.Config.get "atom-reason.merlinLogFile"; + switch atomReasonMerlinLogFile { + | JsonString "" => () + | JsonString s => Atom.Env.setEnvVar "MERLIN_LOG" s + | _ => () + }; + let readerFn = + createMerlinReaderFnOnce + pathToMerlin::(Atom.JsonValue.unsafeExtractString atomReasonPathToMerlin) + merlinFlags::(Atom.JsonValue.unsafeExtractString atomReasonMerlinFlags) + dotMerlinPath::(findNearestMerlinFile beginAtFilePath::path); + startedMerlin.contents = Some readerFn + }; + +let readOneLine cmd::cmd resolve reject => + switch startedMerlin.contents { + | None => raise Not_found + | Some readerFn => + Js.Unsafe.fun_call + readerFn + [| + Js.Unsafe.inject cmd, + Js.Unsafe.inject (Js.wrap_callback resolve), + Js.Unsafe.inject (Js.wrap_callback reject) + |] + }; + +/* contextify is important for avoiding different buffers calling the backing merlin at the same time. */ +/* https://github.com/the-lambda-church/merlin/blob/d98a08d318ca14d9c702bbd6eeadbb762d325ce7/doc/dev/PROTOCOL.md#contextual-commands */ +let contextify query::query path::path => Js.Unsafe.obj [| + ("query", Js.Unsafe.inject query), + ("context", Js.Unsafe.inject (Js.array [|Js.string "auto", Js.string path|])) +|]; + +let prepareCommand text::text path::path query::query resolve reject => { + startMerlinProcess path; + /* These two commands should be run before every main command. */ + readOneLine + cmd::( + contextify + /* The protocol command tells Merlin which API version we want to use. (2 for us) */ + query::( + Js.array [| + Js.Unsafe.inject (Js.string "protocol"), + Js.Unsafe.inject (Js.string "version"), + Js.Unsafe.inject (Js.number_of_float 2.) + |] + ) + path::path + ) + ( + fun _ => + readOneLine + cmd::( + contextify + /* The tell command allows us to synchronize our text with Merlin's internal buffer. */ + query::( + Js.array [|Js.string "tell", Js.string "start", Js.string "end", Js.string text|] + ) + path::path + ) + (fun _ => readOneLine cmd::(contextify query::query path::path) resolve reject) + reject + ) + reject +}; + +let positionToJsMerlinPosition (line, col) => Js.Unsafe.obj [| + /* lines (rows) are 1-based for merlin, not 0-based, like for Atom */ + ("line", Js.Unsafe.inject (Js.number_of_float (float_of_int (line + 1)))), + ("col", Js.Unsafe.inject (Js.number_of_float (float_of_int col))) +|]; + +/* Actual merlin commands we'll use. */ +let getTypeHint path::path text::text position::position resolve reject => + prepareCommand + text::text + path::path + query::( + Js.array [| + Js.Unsafe.inject (Js.string "type"), + Js.Unsafe.inject (Js.string "enclosing"), + Js.Unsafe.inject (Js.string "at"), + Js.Unsafe.inject (positionToJsMerlinPosition position) + |] + ) + resolve + reject; + +let getAutoCompleteSuggestions + path::path + text::text + position::position + prefix::prefix + resolve + reject => + prepareCommand + text::text + path::path + query::( + Js.array [| + Js.Unsafe.inject (Js.string "complete"), + Js.Unsafe.inject (Js.string "prefix"), + Js.Unsafe.inject (Js.string prefix), + Js.Unsafe.inject (Js.string "at"), + Js.Unsafe.inject (positionToJsMerlinPosition position), + Js.Unsafe.inject (Js.string "with"), + Js.Unsafe.inject (Js.string "doc") + |] + ) + resolve + reject; + +let getDiagnostics path::path text::text resolve reject => + prepareCommand + text::text + path::path + query::(Js.array [|Js.Unsafe.inject (Js.string "errors")|]) + resolve + reject; + +let locate path::path text::text extension::extension position::position resolve reject => + prepareCommand + text::text + path::path + query::( + Js.array [| + Js.Unsafe.inject (Js.string "locate"), + Js.Unsafe.inject (Js.string ""), + Js.Unsafe.inject (Js.string extension), + Js.Unsafe.inject (Js.string "at"), + Js.Unsafe.inject (positionToJsMerlinPosition position) + |] + ) + resolve + reject; + +/* reject */ +let getOccurrences path::path text::text position::position resolve reject => + prepareCommand + text::text + path::path + query::( + Js.array [| + Js.Unsafe.inject (Js.string "occurrences"), + Js.Unsafe.inject (Js.string "ident"), + Js.Unsafe.inject (Js.string "at"), + Js.Unsafe.inject (positionToJsMerlinPosition position) + |] + ) + resolve + reject; + +let destruct + path::path + text::text + startPosition::startPosition + endPosition::endPosition + resolve + reject => + prepareCommand + text::text + path::path + query::( + Js.array [| + Js.Unsafe.inject (Js.string "case"), + Js.Unsafe.inject (Js.string "analysis"), + Js.Unsafe.inject (Js.string "from"), + Js.Unsafe.inject (positionToJsMerlinPosition startPosition), + Js.Unsafe.inject (Js.string "to"), + Js.Unsafe.inject (positionToJsMerlinPosition endPosition) + |] + ) + resolve + reject; + +let getOutline path::path text::text resolve reject => + prepareCommand + text::text + path::path + query::(Js.array [|Js.Unsafe.inject (Js.string "outline")|]) + resolve + reject; \ No newline at end of file diff --git a/samples/Reason/Syntax.re b/samples/Reason/Syntax.re new file mode 100644 index 0000000000..bdda48b2f2 --- /dev/null +++ b/samples/Reason/Syntax.re @@ -0,0 +1,989 @@ +/* Copyright (c) 2015-present, Facebook, Inc. All rights reserved. */ +[@@@autoFormat let wrap = 80; let shift = 2]; + +Modules.run (); + +Polymorphism.run (); + +Variants.run (); + +BasicStructures.run (); + +TestUtils.printSection "General Syntax"; + +/* Won't work! */ +/* let matchingFunc a = match a with */ +/* `Thingy x => (print_string "matched thingy x"); x */ +/* | `Other x => (print_string "matched other x"); x;; */ +/* */ +let matchingFunc a => + switch a { + | `Thingy x => + print_string "matched thingy x"; + let zz = 10; + zz + | `Other x => + print_string "matched other x"; + x + }; + +type firstTwoShouldBeGroupedInParens = + (int => int) => int => int; + +type allParensCanBeRemoved = + int => int => int => int; + +type firstTwoShouldBeGroupedAndFirstThree = + ((int => int) => int) => int; + +/* Same thing now but with type constructors instead of each int */ +type firstTwoShouldBeGroupedInParens = + (list int => list int) => list int => list int; + +type allParensCanBeRemoved = + list int => list int => list int => list int; + +type firstTwoShouldBeGroupedAndFirstThree = + ((list int => list int) => list int) => + list int; + +type myRecordType = { + firstTwoShouldBeGroupedInParens: + (int => int) => int => int, + allParensCanBeRemoved: + int => int => int => int, + firstTwoShouldBeGroupedAndFirstThree: + ((int => int) => int) => int +}; + +type firstNamedArgShouldBeGroupedInParens = + first::(int => int) => second::int => int; + +type allParensCanBeRemoved = + first::int => second::int => third::int => int; + +type firstTwoShouldBeGroupedAndFirstThree = + first::((int => int) => int) => int; + +/* Same thing now, but with type constructors instead of int */ +type firstNamedArgShouldBeGroupedInParens = + first::(list int => list int) => + second::list int => + list int; + +type allParensCanBeRemoved = + first::list int => + second::list int => + third::list int => + list int; + +type firstTwoShouldBeGroupedAndFirstThree = + first::((list int => list int) => list int) => + list int; + +type firstNamedArgShouldBeGroupedInParens = + first::(int => int)? => + second::int list? => + int; + +/* The arrow necessitates parens around the next two args. The ? isn't what + * makes the parens necessary. */ +type firstNamedArgShouldBeGroupedInParensAndSecondNamedArg = + first::(int => int)? => + second::(int => int)? => + int; + +type allParensCanBeRemoved = + first::int? => + second::int? => + third::int? => + int; + +type firstTwoShouldBeGroupedAndFirstThree = + first::((int => int) => int) => int; + +type noParens = + one::int => int => int => two::int => int; + +type noParensNeeded = + one::int => int => int => two::int => int; + +type firstNamedArgNeedsParens = + one::(int => int => int) => two::int => int; + +/* Now, let's try type aliasing */ +/* Unless wrapped in parens, types between arrows may not be aliased, may not + * themselves be arrows. */ +type parensRequiredAroundFirstArg = + (list int as 'a) => int as 'a; + +type parensRequiredAroundReturnType = + (list int as 'a) => (int as 'a); + +type parensRequiredAroundReturnType = + (list int as 'a) => (int as 'a) as 'b; + +type noParensNeededWhenInTuple = + (list int as 'a, list int as 'b) as 'entireThing; + +type myTypeDef 'a = list 'a; + +type instatiatedTypeDef = myTypeDef int => int; + +/* Test a type attribute for good measure */ +/* We should clean up all of the attribute tagging eventually, but for now, + * let's make it super ugly to get out of the way of all the formatting/parsing + * implementations (fewer conflicts during parsing, fewer edge cases during + * printing). + */ +type something = ( + int, + int [@lookAtThisAttribute] +); + +type longWrappingTypeDefinitionExample = + M_RK__G.Types.instance + (TGRecognizer.tGFields unit unit) + (TGRecognizer.tGMethods unit unit); + +type semiLongWrappingTypeDefinitionExample = + M_RK__Gesture.Types.instance + TGRecognizerFinal.tGFields + TGRecognizerFinal.tGMethods; + +type semiLongWrappingTypeWithConstraint = + M_RK__Gesture.Types.instance + 'a + TGRecognizerFinal.tGFields + TGRecognizerFinal.tGMethods +constraint 'a = (unit, unit); + +type onelineConstrain = 'a constraint 'a = int; + +/* This must be in trunk but not in this branch of OCaml */ +/* type withNestedRecords = MyConstructor {myField: int} */ +type colors = + | Red int + | Black int + | Green int; + +/* Another approach is to require declared variants to wrap any record */ +/* type myRecord = MyRecord {name: int}; */ +/* let myValue = MyRecord {name: int}; */ +/* This would force importing of the module */ +/* This would also lend itself naturally to pattern matching - and avoid having + to use `.` operator at all since you normally destructure. */ +type nameBlahType = {nameBlah: int}; + +let myRecord = {nameBlah: 20}; + +let myRecordName = myRecord.nameBlah; + +let {nameBlah}: nameBlahType = {nameBlah: 20}; + +print_int nameBlah; + +let {nameBlah: aliasedToThisVar}: nameBlahType = { + nameBlah: 20 +}; + +print_int aliasedToThisVar; + +let desiredFormattingForWrappedLambda: + int => int => int => nameBlahType = + /* + + fun is + pre- /firstarg\ + fix /-coupled--\ + |-\ /-to-prefix--\ */ + fun curriedArg anotherArg lastArg => { + nameBlah: 10 + }; + +type longerInt = int; + +let desiredFormattingForWrappedLambdaWrappedArrow: + longerInt => + longerInt => + longerInt => + nameBlahType = + /* + + fun is + pre- /firstarg\ + fix /-coupled--\ + |-\ /-to-prefix--\ */ + fun curriedArg anotherArg lastArg => { + nameBlah: 10 + }; + +let desiredFormattingForWrappedLambdaReturnOnNewLine + /* + + fun is + pre- /firstarg\ + fix /-coupled--\ + |-\ /-to-prefix--\ */ + curriedArg + anotherArg + lastArg => { + nameBlah: 10 +}; + +/* + let is + pre- + fix /-function binding name---\ + |-\ / is coupled to prefix \ */ +let desiredFormattingForWrappedSugar + curriedArg + anotherArg + lastArg => { + nameBlah: 10 +}; + +/* + let is + pre- + fix /-function binding name---\ + |-\ / is coupled to prefix \ */ +let desiredFormattingForWrappedSugarReturnOnNewLine + curriedArg + anotherArg + lastArg => { + nameBlah: 10 +}; + +/* + let : type t1 t2. t1 * t2 list -> t1 = ... + let rec f : 't1 't2. 't1 * 't2 list -> 't1 = + fun (type t1) (type t2) -> (... : t1 * t2 list -> t1) + */ +type point = {x: int, y: int}; + +type point3D = {x: int, y: int, z: int}; + +let point2D = {x: 20, y: 30}; + +let point3D: point3D = { + x: 10, + y: 11, + z: 80 /* Optional Comma */ +}; + +let printPoint (p: point) => { + print_int p.x; + print_int p.y +}; + +let addPoints (p1: point, p2: point) => { + x: p1.x + p2.x, + y: p1.y + p2.y +}; + +let res1 = printPoint point2D; + +let res2 = + printPoint {x: point3D.x, y: point3D.y}; + +/* + When () were used to indicate sequences, the parser used seq_expr not only + for grouping sequences, but also to form standard precedences. + /------- sequence_expr ------\ + let res3 = printPoint (addPoints (point2D, point3D)); + + Interestingly, it knew that tuples aren't sequences. + + To move towards semi delimited, semi-terminated, braces-grouped sequences: + while allowing any non-sequence expression to be grouped on parens, we make + an explicit rule that allows one single non-semi ended expression to be + grouped in parens. + + Actually: We will allow an arbitrary number of semi-delimited expressions to + be wrapped in parens, but the braces grouped semi delimited (sequence) + expressions must *also* be terminated with a semicolon. + + This allows the parser to distinguish between + + let x = {a}; /* Record {a:a} */ + let x = {a;}; /* Single item sequence returning identifier {a} */ + */ +let res3 = + printPoint ( + addPoints ( + point2D, + {x: point3D.x, y: point3D.y} + ) + ); + +type person = {age: int, name: string}; + +type hiredPerson = { + age: string, + name: string, + dateHired: int +}; + +let o: person = {name: "bob", age: 10}; + +/* Parens needed? Nope! */ +let o: person = {name: "bob", age: 10}; + +let printPerson (p: person) => { + let q: person = p; + p.name ^ p.name +}; + +/* let dontParseMeBro x y:int = x = y;*/ +/* With this unification, anywhere eyou see `= fun` you can just ommit it */ +let blah a => a; /* Done */ + +let blah a => a; /* Done (almost) */ + +let blah a b => a; /* Done */ + +let blah a b => a; /* Done (almost) */ + +/* More than one consecutive pattern must have a single case */ +type blah = {blahBlah: int}; + +let blah a {blahBlah} => a; + +let blah a {blahBlah} => a; + +let module TryToExportTwice = { + let myVal = "hello"; +}; + +/* + Unifying top level module syntax with local module syntax is probably a bad + idea at the moment because it makes it more difficult to continue to support + `let .. in` bindings. We can distinguish local modules for `let..in` that + just happen to be defined at the top level (but not exported). + + let MyModule = {let myVal = 20;} in + MyModule.x + + Wait, where would this ever be valid, even if we continued to support + `let..in`? + */ +let onlyDoingThisTopLevelLetToBypassTopLevelSequence = { + let x = { + print_int 1; + print_int 20 /* Missing trailing SEMI */ + }; + let x = { + print_int 1; + print_int 20; /* Ensure missing middle SEMI reported well */ + print_int 20 + }; + let x = { + print_int 1; + print_int 20; + 10 + /* Comment in final position */ + }; /* Missing final SEMI */ + x + x +}; + +type hasA = {a: int}; + +let a = 10; + +let returnsASequenceExpressionWithASingleIdentifier + () => a; + +let thisReturnsA () => a; + +let thisReturnsAAsWell () => a; + +let recordVal: int = (thisReturnsARecord ()).a; + +Printf.printf + "\nproof that thisReturnsARecord: %n\n" + recordVal; + +Printf.printf + "\nproof that thisReturnsA: %n\n" + (thisReturnsA ()); + +/* Pattern matching */ +let blah arg => + switch arg { + /* Comment before Bar */ + | /* Comment between bar/pattern */ Red _ => 1 + /* Comment Before non-first bar */ + | /* Comment betwen bar/pattern */ Black _ => 0 + | Green _ => 0 + }; + +/* Any function that pattern matches a multicase match is interpretted as a + * single arg that is then matched on. Instead of the above `blah` example:*/ +let blah = + fun + | Red _ => 1 + | Black _ => 0 + | Green _ => 1; + +/* `fun a => a` is read as "a function that maps a to a". Then the */ +/* above example is read: "a function that 'either maps' Red to.. or maps .." */ +/* Thc00f564e first bar is read as "either maps" */ +/* Curried form is not supported: + let blah x | Red _ => 1 | Black _ => 0; + Theres no sugar rule for dropping => fun, only = fun + */ +/* let blahCurriedX x => fun /* See, nothing says we can drop the => fun */ */ +/* |(Red x | Black x | Green x) => 1 /* With some effort, we can ammend the sugar rule that would */ */ +/* | Black x => 0 /* Allow us to drop any => fun.. Just need to make pattern matching */ */ +/* | Green x => 0; /* Support that */ */ +/* */ +let blahCurriedX x => + fun + | Red x + | Black x + | Green x => + 1 /* With some effort, we can ammend the sugar rule that would */ + | Black x => 0 /* Allow us to drop any => fun.. Just need to make pattern matching */ + | Green x => 0; /* Support that */ + +let sameThingInLocal = { + let blahCurriedX x => + fun + | Red x + | Black x + | Green x => + 1 /* With some effort, we can ammend the sugar rule that would */ + | Black x => 0 /* Allow us to drop any => fun.. Just need to make pattern matching */ + | Green x => 0; /* Support that */ + blahCurriedX +}; + +/* This should be parsed/printed exactly as the previous */ +let blahCurriedX x => + fun + | Red x + | Black x + | Green x => 1 + | Black x => 0 + | Green x => 0; + +/* Any time there are multiple match cases we require a leading BAR */ +let v = Red 10; + +let Black x | Red x | Green x = v; /* So this NON-function still parses */ + +/* This doesn't parse, however (and it doesn't in OCaml either): + let | Black x | Red x | Green x = v; + */ +print_int x; + +/* Scoping: Let sequences. Familiar syntax for lexical ML style scope and + sequences. */ +let res = { + let a = "a starts out as"; + { + print_string a; + let a = 20; + print_int a + }; + print_string a +}; + +let res = { + let a = "first its a string"; + let a = 20; + print_int a; + print_int a; + print_int a +}; + +let res = { + let a = "a is always a string"; + print_string a; + let b = 30; + print_int b +}; + +/* let result = LyList.map (fun | [] => true | _ => false) []; */ +/* OTHERWISE: You cannot tell if a is the first match case falling through or + * a curried first arg */ +/* let blah = fun a | patt => 0 | anotherPatt => 1; */ +/* let blah a patt => 0 | anotherPatt => 1; */ +/*simple pattern EQUALGREATER expr */ +let blah a {blahBlah} => a; + +/* match_case */ +/* pattern EQUALGREATER expr */ +let blah = + fun + | Red _ => 1 + | Black _ => 0 + | Green _ => 0; + +/* Won't work! */ +/* let arrowFunc = fun a b => print_string "returning aplusb from arrow"; a + b;; */ +let arrowFunc a b => { + print_string "returning aplusb from arrow"; + a + b +}; + +let add a b => { + let extra = { + print_string "adding"; + 0 + }; + let anotherExtra = 0; + extra + a + b + anotherExtra +}; + +print_string (string_of_int (add 4 34)); + +let dummy _ => 10; + +dummy res1; + +dummy res2; + +dummy res3; + +/* Some edge cases */ +let myFun firstArg (Red x | Black x | Green x) => + firstArg + x; + +let matchesWithWhen a => + switch a { + | Red x when 1 > 0 => 10 + | Red _ => 10 + | Black x => 10 + | Green x => 10 + }; + +let matchesWithWhen = + fun + | Red x when 1 > 0 => 10 + | Red _ => 10 + | Black x => 10 + | Green x => 10; + +let matchesOne (`Red x) => 10; + +/* + Typical OCaml would make you *wrap the functions in parens*! This is because it + can't tell if a semicolon is a sequence operator. Even if we had records use + commas to separate fields, + */ +type adders = { + addTwoNumbers: int => int => int, + addThreeNumbers: int => int => int => int, + addThreeNumbersTupled: (int, int, int) => int +}; + +let myRecordWithFunctions = { + addTwoNumbers: fun a b => a + b, + addThreeNumbers: fun a b c => a + b + c, + addThreeNumbersTupled: fun (a, b, c) => + a + b + c +}; + +let result = + myRecordWithFunctions.addThreeNumbers 10 20 30; + +let result = + myRecordWithFunctions.addThreeNumbersTupled ( + 10, + 20, + 30 + ); + +let lookTuplesRequireParens = (1, 2); + +/* let thisDoesntParse = 1, 2; */ +let tupleInsideAParenSequence = { + print_string "look, a tuple inside a sequence"; + let x = 10; + (x, x) +}; + +let tupleInsideALetSequence = { + print_string "look, a tuple inside a sequence"; + let x = 10; + (x, x) +}; + +/* We *require* that function return types be wrapped in + parenthesis. In this example, there's no ambiguity */ +let makeIncrementer (delta: int) :(int => int) => + fun a => a + delta; + +/* We could even force that consistency with let bindings - it's allowed + currently but not forced. + */ +let myAnnotatedValBinding: int = 10; + +/* Class functions (constructors) and methods are unified in the same way */ +class classWithNoArg = { + method x = 0; + method y = 0; +}; + +/* This parses but doesn't type check + class myClass init => object + method x => init + method y => init + end; + */ +let myFunc (a: int) (b: int) :(int, int) => ( + a, + b +); + +let myFunc (a: int) (b: int) :list int => [1]; + +let myFunc (a: int) (b: int) :point => { + x: a, + y: b +}; + +let myFunc (a: int, b: int) :point => { + x: a, + y: b +}; + +type myThing = (int, int); + +type stillARecord = {name: string, age: int}; + +/* Rebase latest OCaml to get the following: And fixup + `generalized_constructor_arguments` according to master. */ +/* type ('a, 'b) myOtherThing = Leaf {first:'a, second: 'b} | Null; */ +type branch 'a 'b = {first: 'a, second: 'b}; + +type myOtherThing 'a 'b = + | Leaf (branch 'a 'b) + | Null; + +type yourThing = myOtherThing int int; + +/* Conveniently - this parses exactly how you would intend! No *need* to wrap + in an extra [], but it doesn't hurt */ +/* FIXME type lookAtThesePolyVariants = list [`Red] ; */ +/* FIXME type bracketsGroupMultipleParamsAndPrecedence = list (list (list [`Red])); */ +/* FIXME type youCanWrapExtraIfYouWant = (list [`Red]); */ +/* FIXME type hereAreMultiplePolyVariants = list [`Red | `Black]; */ +/* FIXME type hereAreMultiplePolyVariantsWithOptionalWrapping = list ([`Red | `Black]); */ +/* + /* Proposal: ES6 style lambdas: */ + + /* Currying */ + let lookES6Style = (`Red x) (`Black y) => { }; + let lookES6Style (`Red x) (`Black y) => { }; + + /* Matching the single argument */ + let lookES6Style = oneArg => match oneArg with + | `Red x => x + | `Black x => x; + + /* The "trick" to currying that we already have is basically the same - we just + * have to reword it a bit: + * From: + * "Any time you see [let x = fun ...] just replace it with [let x ...]" + * To: + * "Any time you see [let x = ... => ] just replace it with [let x ... => ]" + */ + let lookES6Style oneArg => match oneArg with + | `Red x => x + | `Black x => x; + + */ + +/** Current OCaml Named Arguments. Any aliasing is more than just aliasing! + OCaml allows full on pattern matching of named args. */ +/* + A: let named ~a ~b = aa + bb in + B: let namedAlias ~a:aa ~b:bb = aa + bb in + C: let namedAnnot ~(a:int) ~(b:int) = a + b in + D: let namedAliasAnnot ~a:(aa:int) ~b:(bb:int) = aa + bb in + E: let optional ?a ?b = 10 in + F: let optionalAlias ?a:aa ?b:bb = 10 in + G: let optionalAnnot ?(a:int option) ?(b:int option) = 10 in + H: let optionalAliasAnnot ?a:(aa:int option) ?b:(bb:int option) = 10 in + /* + Look! When a default is provided, annotation causes inferred type of argument + to not be "option" since it's automatically destructured (because we know it + will always be available one way or another.) + */ + I: let defOptional ?(a=10) ?(b=10) = 10 in + J: let defOptionalAlias ?a:(aa=10) ?b:(bb=10) = 10 in + K: let defOptionalAnnot ?(a:int=10) ?(b:int=10) = 10 in + \ \ + \label_let_pattern opt_default: no longer needed in SugarML + + L: let defOptionalAliasAnnot ?a:(aa:int=10) ?b:(bb:int=10) = 10 in + \ \ + \let_pattern: still a useful syntactic building block in SugarML + */ + +/** + * In Reason, the syntax for named args uses double semicolon, since + * the syntax for lists uses ES6 style [], freeing up the ::. + */ +let a = 10; + +let b = 20; + +/*A*/ +let named a::a b::b => a + b; + +type named = a::int => b::int => int; + +/*B*/ +let namedAlias a::aa b::bb => aa + bb; + +let namedAlias a::aa b::bb => aa + bb; + +type namedAlias = a::int => b::int => int; + +/*C*/ +let namedAnnot a::(a: int) b::(b: int) => 20; + +/*D*/ +let namedAliasAnnot a::(aa: int) b::(bb: int) => 20; + +/*E*/ +let myOptional a::a=? b::b=? () => 10; + +type named = a::int? => b::int? => unit => int; + +/*F*/ +let optionalAlias a::aa=? b::bb=? () => 10; + +/*G*/ +let optionalAnnot a::(a: int)=? b::(b: int)=? () => 10; + +/*H*/ +let optionalAliasAnnot + a::(aa: int)=? + b::(bb: int)=? + () => 10; + +/*I: */ +let defOptional a::a=10 b::b=10 () => 10; + +type named = a::int? => b::int? => unit => int; + +/*J*/ +let defOptionalAlias a::aa=10 b::bb=10 () => 10; + +/*K*/ +let defOptionalAnnot + a::(a: int)=10 + b::(b: int)=10 + () => 10; + +/*L*/ +let defOptionalAliasAnnot + a::(aa: int)=10 + b::(bb: int)=10 + () => 10; + +/*M: Invoking them - Punned */ +let resNotAnnotated = named a::a b::b; + +/*N:*/ +let resAnnotated: int = named a::a b::b; + +/*O: Invoking them */ +let resNotAnnotated = named a::a b::b; + +/*P: Invoking them */ +let resAnnotated: int = named a::a b::b; + +/*Q: Here's why "punning" doesn't work! */ +/* Is b:: punned with a final non-named arg, or is b:: supplied b as one named arg? */ +let b = 20; + +let resAnnotated = named a::a b::b; + +/*R: Proof that there are no ambiguities with return values being annotated */ +let resAnnotated: ty = named a::a b; + +/*S: Explicitly passed optionals are a nice way to say "use the default value"*/ +let explictlyPassed = + myOptional a::?None b::?None; + +/*T: Annotating the return value of the entire function call */ +let explictlyPassedAnnotated: int = + myOptional a::?None b::?None; + +/*U: Explicitly passing optional with identifier expression */ +let a = None; + +let explictlyPassed = myOptional a::?a b::?None; + +let explictlyPassedAnnotated: int = + myOptional a::?a b::?None; + +let nestedLet = { + let _ = 1; + () +}; + +let nestedLet = { + let _ = 1; + () +}; + +let nestedLet = { + let _ = 1; + () +}; + +let nestedLet = { + let _ = 1; + 2 +}; + +/* + * Showing many combinations of type annotations and named arguments. + */ +type typeWithNestedNamedArgs = + outerOne::( + innerOne::int => innerTwo::int => int + ) => + outerTwo::int => + int; + +type typeWithNestedOptionalNamedArgs = + outerOne:: + (innerOne::int => innerTwo::int => int)? => + outerTwo::int? => + int; + +type typeWithNestedOptionalNamedArgs = + outerOne::list string? => outerTwo::int? => int; + +let x = + callSomeFunction + withArg::10 andOtherArg::wrappedArg; + +let res = { + (constraintedSequenceItem: string); + (dontKnowWheYoudWantToActuallyDoThis: string) +}; + +let res = { + ( + butTheyWillBePrintedWithAppropriateSpacing: string + ); + (soAsToInstillBestDevelopmentPractices: string) +}; + +let x = [ + (eachItemInListCanBeAnnotated: int), + (typeConstraints: float), + ( + tupleConstraints: int, + andNotFunctionInvocations: int + ) +]; + +let x = [ + (butWeWillPrint: int), + (themAsSpaceSeparated: float), + (toInfluenceYour: int, developmentHabbits: int) +]; + +let newRecord = { + ...(annotatedSpreadRecord: someRec), + x: y +}; + +let newRecord = { + ...(annotatedSpreadRecord: someRec), + blah: 0, + foo: 1 +}; + +let newRecord = { + ...( + youCanEvenCallMethodsHereAndAnnotate them: someRec + ), + blah: 0, + foo: 1 +}; + +let newRecord = { + ...( + youCanEvenCallMethodsHereAndAnnotate + them named::10: someRec + ), + blah: 0, + foo: 1 +}; + +let something: thing blah = aTypeAnnotation; + +let something: thing blah = thisIsANamedArg; + +let something: thing blah = aTypeAnnotation; + +let something: blah = thisIsANamedArg thing; + +let something: blah = typeAnnotation thing; + +let newRecord = { + ...( + heresAFunctionWithNamedArgs argOne::i: annotatedResult + ), + soAsToInstill: 0, + developmentHabbits: 1 +}; + +[@@@thisIsAThing]; + +let x = 10; + +/* Ensure that the parenthesis are preserved here because they are + * important: + */ +let something = + fun + | None => ( + fun + | [] => "emptyList" + | [_, ..._] => "nonEmptyList" + ) + | Some _ => ( + fun + | [] => "emptyList" + | [_, ..._] => "nonEmptyList" + ); + +/* A | B = X; */ +let A | B = X; + +/* A | (B | C) = X; */ +let A | (B | C) = X; + +/* (A | B) | (C | D) = X; */ +let A | B | (C | D) = X; + +/* A | B | (C | D) = X; */ +let A | B | (C | D) = X; + +/* (A | B) | C = X; */ +let A | B | C = X; + +/* A | B | C = X; */ +let A | B | C = X; + + +/** External function declaration + * + */ +external f : int => int = "foo"; + +let x = {contents: 0}; + +let unitVal = x.contents = 210; diff --git a/vendor/grammars/reason b/vendor/grammars/reason new file mode 160000 index 0000000000..97d91c61d1 --- /dev/null +++ b/vendor/grammars/reason @@ -0,0 +1 @@ +Subproject commit 97d91c61d1947631b89024830bc43dad2931fabe diff --git a/vendor/licenses/grammar/reason.txt b/vendor/licenses/grammar/reason.txt new file mode 100644 index 0000000000..8534842de6 --- /dev/null +++ b/vendor/licenses/grammar/reason.txt @@ -0,0 +1,35 @@ +--- +type: grammar +name: reason +license: bsd-3-clause +--- +BSD License + +For Reason software + +Copyright (c) 2015-present, Facebook, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Facebook nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file From 08b63e703345498e589397293ce5170917ba8067 Mon Sep 17 00:00:00 2001 From: Samantha McVey Date: Fri, 23 Dec 2016 15:58:21 -0800 Subject: [PATCH 0201/1214] Change repository for Perl 6 grammar --- .gitmodules | 6 +++--- grammars.yml | 9 +++++---- vendor/README.md | 2 +- vendor/grammars/atom-language-perl6 | 1 + vendor/grammars/perl6fe | 1 - .../grammar/{perl6fe.txt => atom-language-perl6.txt} | 7 ++++++- 6 files changed, 16 insertions(+), 10 deletions(-) create mode 160000 vendor/grammars/atom-language-perl6 delete mode 160000 vendor/grammars/perl6fe rename vendor/licenses/grammar/{perl6fe.txt => atom-language-perl6.txt} (94%) diff --git a/.gitmodules b/.gitmodules index c268e964af..1d11d00d59 100644 --- a/.gitmodules +++ b/.gitmodules @@ -623,9 +623,6 @@ [submodule "vendor/grammars/language-yang"] path = vendor/grammars/language-yang url = https://github.com/DzonyKalafut/language-yang.git -[submodule "vendor/grammars/perl6fe"] - path = vendor/grammars/perl6fe - url = https://github.com/MadcapJake/language-perl6fe.git [submodule "vendor/grammars/language-less"] path = vendor/grammars/language-less url = https://github.com/atom/language-less.git @@ -809,6 +806,9 @@ [submodule "vendor/grammars/rascal-syntax-highlighting"] path = vendor/grammars/rascal-syntax-highlighting url = https://github.com/usethesource/rascal-syntax-highlighting +[submodule "vendor/grammars/atom-language-perl6"] + path = vendor/grammars/atom-language-perl6 + url = https://github.com/perl6/atom-language-perl6 [submodule "vendor/grammars/reason"] path = vendor/grammars/reason url = https://github.com/facebook/reason diff --git a/grammars.yml b/grammars.yml index 097989ba57..471c6497bc 100755 --- a/grammars.yml +++ b/grammars.yml @@ -178,6 +178,11 @@ vendor/grammars/atom-language-1c-bsl: - source.sdbl vendor/grammars/atom-language-clean: - source.clean +vendor/grammars/atom-language-perl6: +- source.meta-info +- source.perl6fe +- source.quoting.perl6fe +- source.regexp.perl6fe vendor/grammars/atom-language-purescript: - source.purescript vendor/grammars/atom-language-srt: @@ -513,10 +518,6 @@ vendor/grammars/pawn-sublime-language: vendor/grammars/perl.tmbundle: - source.perl - source.perl.6 -vendor/grammars/perl6fe: -- source.meta-info -- source.perl6fe -- source.regexp.perl6fe vendor/grammars/php-smarty.tmbundle: - text.html.smarty vendor/grammars/php.tmbundle: diff --git a/vendor/README.md b/vendor/README.md index e36a84c072..dfb3e60f3c 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -249,7 +249,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **Pascal:** [textmate/pascal.tmbundle](https://github.com/textmate/pascal.tmbundle) - **PAWN:** [Southclaw/pawn-sublime-language](https://github.com/Southclaw/pawn-sublime-language) - **Perl:** [textmate/perl.tmbundle](https://github.com/textmate/perl.tmbundle) -- **Perl6:** [MadcapJake/language-perl6fe](https://github.com/MadcapJake/language-perl6fe) +- **Perl6:** [perl6/atom-language-perl6](https://github.com/perl6/atom-language-perl6) - **PHP:** [textmate/php.tmbundle](https://github.com/textmate/php.tmbundle) - **Pic:** [Alhadis/language-roff](https://github.com/Alhadis/language-roff) - **PicoLisp:** [textmate/lisp.tmbundle](https://github.com/textmate/lisp.tmbundle) diff --git a/vendor/grammars/atom-language-perl6 b/vendor/grammars/atom-language-perl6 new file mode 160000 index 0000000000..12c6094831 --- /dev/null +++ b/vendor/grammars/atom-language-perl6 @@ -0,0 +1 @@ +Subproject commit 12c60948317ea32558b5e334bf46f50d99166867 diff --git a/vendor/grammars/perl6fe b/vendor/grammars/perl6fe deleted file mode 160000 index 84aa57300b..0000000000 --- a/vendor/grammars/perl6fe +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 84aa57300bc012f75e7a394aa02cd3805bcc5ca8 diff --git a/vendor/licenses/grammar/perl6fe.txt b/vendor/licenses/grammar/atom-language-perl6.txt similarity index 94% rename from vendor/licenses/grammar/perl6fe.txt rename to vendor/licenses/grammar/atom-language-perl6.txt index 9fd8f9aaa4..d079e26d68 100644 --- a/vendor/licenses/grammar/perl6fe.txt +++ b/vendor/licenses/grammar/atom-language-perl6.txt @@ -1,10 +1,15 @@ --- type: grammar -name: perl6fe +name: atom-language-perl6 license: mit --- + +MIT License + Copyright (c) 2015 Jacob Russo +Copyright (c) 2016 Samantha McVey + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including From ec749b3f8da76e5984488097ee7ebc33df219023 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Tue, 3 Jan 2017 20:38:44 +0100 Subject: [PATCH 0202/1214] Remove the Hy grammar (#3411) The grammar repository was recently deleted --- .gitmodules | 3 --- grammars.yml | 2 -- lib/linguist/languages.yml | 2 +- vendor/grammars/language-hy | 1 - 4 files changed, 1 insertion(+), 7 deletions(-) delete mode 160000 vendor/grammars/language-hy diff --git a/.gitmodules b/.gitmodules index 1d11d00d59..4b188e2e53 100644 --- a/.gitmodules +++ b/.gitmodules @@ -443,9 +443,6 @@ [submodule "vendor/grammars/Sublime-Nit"] path = vendor/grammars/Sublime-Nit url = https://github.com/R4PaSs/Sublime-Nit -[submodule "vendor/grammars/language-hy"] - path = vendor/grammars/language-hy - url = https://github.com/rwtolbert/language-hy [submodule "vendor/grammars/Racket"] path = vendor/grammars/Racket url = https://github.com/soegaard/racket-highlight-for-github diff --git a/grammars.yml b/grammars.yml index 471c6497bc..a60b1a08be 100755 --- a/grammars.yml +++ b/grammars.yml @@ -389,8 +389,6 @@ vendor/grammars/language-haskell: - source.haskell - source.hsc2hs - text.tex.latex.haskell -vendor/grammars/language-hy: -- source.hy vendor/grammars/language-inform7: - source.inform7 vendor/grammars/language-javascript: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 19d30ed25e..ed94ace605 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1755,7 +1755,7 @@ Hy: - ".hy" aliases: - hylang - tm_scope: source.hy + tm_scope: none language_id: 159 HyPhy: type: programming diff --git a/vendor/grammars/language-hy b/vendor/grammars/language-hy deleted file mode 160000 index 93d267de4c..0000000000 --- a/vendor/grammars/language-hy +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 93d267de4cdd8a099f34fb334bae0515a9734cd9 From 04c268e5354be2039894ab948ec56e30af97a46a Mon Sep 17 00:00:00 2001 From: Danila Malyutin Date: Tue, 3 Jan 2017 22:47:19 +0300 Subject: [PATCH 0203/1214] Add mysql extension for sql scripts (#3413) --- lib/linguist/languages.yml | 5 + samples/SQL/zipcodes.uk.mysql | 2934 ++++++++++++++++++++++++++ samples/Text/filenames/LICENSE.mysql | 339 +++ samples/Text/filenames/README.mysql | 24 + samples/YAML/database.yml.mysql | 42 + 5 files changed, 3344 insertions(+) create mode 100644 samples/SQL/zipcodes.uk.mysql create mode 100644 samples/Text/filenames/LICENSE.mysql create mode 100644 samples/Text/filenames/README.mysql create mode 100644 samples/YAML/database.yml.mysql diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index ed94ace605..4ef73a65e2 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3804,6 +3804,7 @@ SQL: - ".cql" - ".ddl" - ".inc" + - ".mysql" - ".prc" - ".tab" - ".udf" @@ -4290,10 +4291,13 @@ Text: - COPYING - FONTLOG - INSTALL + - INSTALL.mysql - LICENSE + - LICENSE.mysql - NEWS - README.1ST - README.me + - README.mysql - click.me - delete.me - keep.me @@ -4773,6 +4777,7 @@ YAML: - ".syntax" - ".yaml" - ".yaml-tmlanguage" + - ".yml.mysql" filenames: - ".clang-format" ace_mode: yaml diff --git a/samples/SQL/zipcodes.uk.mysql b/samples/SQL/zipcodes.uk.mysql new file mode 100644 index 0000000000..ad3a1ab735 --- /dev/null +++ b/samples/SQL/zipcodes.uk.mysql @@ -0,0 +1,2934 @@ +-- This information is public domain and comes from http://www.npemap.org.uk/ see http://drupal.org/node/19482 +-- This script was built using data from http://www.jibble.org/ukpostcodes/ and http://www.npemap.org.uk/data/outward1list + +INSERT INTO zipcodes (zip, city, state, latitude, longitude, timezone, dst, country) VALUES +('AB10', '', '', '57.135', '-2.117', 0, 1, 'uk'), +('AB11', '', '', '57.138', '-2.092', 0, 1, 'uk'), +('AB12', '', '', '57.101', '-2.111', 0, 1, 'uk'), +('AB13', '', '', '57.108', '-2.237', 0, 1, 'uk'), +('AB14', '', '', '57.101', '-2.27', 0, 1, 'uk'), +('AB15', '', '', '57.138', '-2.164', 0, 1, 'uk'), +('AB16', '', '', '57.161', '-2.156', 0, 1, 'uk'), +('AB21', '', '', '57.21', '-2.2', 0, 1, 'uk'), +('AB22', '', '', '57.187', '-2.119', 0, 1, 'uk'), +('AB23', '', '', '57.212', '-2.088', 0, 1, 'uk'), +('AB24', '', '', '57.174638', '-2.036434', 0, 1, 'uk'), +('AB25', '', '', '57.153', '-2.112', 0, 1, 'uk'), +('AB3', '', '', '56.966462', '-2.225953', 0, 1, 'uk'), +('AB30', '', '', '56.847', '-2.477', 0, 1, 'uk'), +('AB31', '', '', '57.074', '-2.527', 0, 1, 'uk'), +('AB32', '', '', '57.156', '-2.317', 0, 1, 'uk'), +('AB33', '', '', '57.225', '-2.741', 0, 1, 'uk'), +('AB34', '', '', '57.094', '-2.812', 0, 1, 'uk'), +('AB35', '', '', '57.038', '-3.149', 0, 1, 'uk'), +('AB36', '', '', '57.197', '-3.067', 0, 1, 'uk'), +('AB37', '', '', '57.331', '-3.351', 0, 1, 'uk'), +('AB38', '', '', '57.486', '-3.225', 0, 1, 'uk'), +('AB39', '', '', '56.978', '-2.217', 0, 1, 'uk'), +('AB41', '', '', '57.376', '-2.105', 0, 1, 'uk'), +('AB42', '', '', '57.501', '-1.888', 0, 1, 'uk'), +('AB43', '', '', '57.658', '-2.043', 0, 1, 'uk'), +('AB44', '', '', '57.669', '-2.492', 0, 1, 'uk'), +('AB45', '', '', '57.651', '-2.566', 0, 1, 'uk'), +('AB51', '', '', '57.289', '-2.405', 0, 1, 'uk'), +('AB52', '', '', '57.344', '-2.607', 0, 1, 'uk'), +('AB53', '', '', '57.525', '-2.393', 0, 1, 'uk'), +('AB54', '', '', '57.454', '-2.763', 0, 1, 'uk'), +('AB55', '', '', '57.524', '-2.99', 0, 1, 'uk'), +('AB56', '', '', '57.675', '-2.926', 0, 1, 'uk'), +('AB64', '', '', '57.356073', '-2.764582', 0, 1, 'uk'), +('AL1', '', '', '51.748', '-0.322', 0, 1, 'uk'), +('AL10', '', '', '51.76', '-0.23', 0, 1, 'uk'), +('AL2', '', '', '51.72', '-0.333', 0, 1, 'uk'), +('AL3', '', '', '51.778', '-0.37', 0, 1, 'uk'), +('AL4', '', '', '51.772', '-0.294', 0, 1, 'uk'), +('AL5', '', '', '51.816', '-0.351', 0, 1, 'uk'), +('AL6', '', '', '51.831', '-0.197', 0, 1, 'uk'), +('AL7', '', '', '51.797', '-0.186', 0, 1, 'uk'), +('AL8', '', '', '51.803', '-0.209', 0, 1, 'uk'), +('AL9', '', '', '51.745', '-0.199', 0, 1, 'uk'), +('B1', '', '', '52.478', '-1.907', 0, 1, 'uk'), +('B10', '', '', '52.47', '-1.851', 0, 1, 'uk'), +('B11', '', '', '52.454', '-1.858', 0, 1, 'uk'), +('B12', '', '', '52.46', '-1.882', 0, 1, 'uk'), +('B13', '', '', '52.437', '-1.878', 0, 1, 'uk'), +('B14', '', '', '52.417', '-1.889', 0, 1, 'uk'), +('B15', '', '', '52.467', '-1.924', 0, 1, 'uk'), +('B16', '', '', '52.476', '-1.933', 0, 1, 'uk'), +('B17', '', '', '52.461', '-1.961', 0, 1, 'uk'), +('B18', '', '', '52.491', '-1.924', 0, 1, 'uk'), +('B19', '', '', '52.496', '-1.905', 0, 1, 'uk'), +('B2', '', '', '52.479', '-1.897', 0, 1, 'uk'), +('B20', '', '', '52.514', '-1.918', 0, 1, 'uk'), +('B21', '', '', '52.506', '-1.939', 0, 1, 'uk'), +('B23', '', '', '52.528', '-1.854', 0, 1, 'uk'), +('B24', '', '', '52.519', '-1.827', 0, 1, 'uk'), +('B25', '', '', '52.465', '-1.82', 0, 1, 'uk'), +('B26', '', '', '52.461', '-1.79', 0, 1, 'uk'), +('B27', '', '', '52.445', '-1.822', 0, 1, 'uk'), +('B28', '', '', '52.427', '-1.842', 0, 1, 'uk'), +('B29', '', '', '52.437', '-1.947', 0, 1, 'uk'), +('B3', '', '', '52.48', '-1.902', 0, 1, 'uk'), +('B30', '', '', '52.422', '-1.927', 0, 1, 'uk'), +('B31', '', '', '52.408', '-1.972', 0, 1, 'uk'), +('B32', '', '', '52.448', '-1.993', 0, 1, 'uk'), +('B33', '', '', '52.48', '-1.787', 0, 1, 'uk'), +('B34', '', '', '52.496', '-1.781', 0, 1, 'uk'), +('B35', '', '', '52.519', '-1.788', 0, 1, 'uk'), +('B36', '', '', '52.504', '-1.779', 0, 1, 'uk'), +('B37', '', '', '52.478', '-1.741', 0, 1, 'uk'), +('B38', '', '', '52.4', '-1.933', 0, 1, 'uk'), +('B4', '', '', '52.482', '-1.894', 0, 1, 'uk'), +('B40', '', '', '52.459', '-1.722', 0, 1, 'uk'), +('B42', '', '', '52.533', '-1.911', 0, 1, 'uk'), +('B43', '', '', '52.548', '-1.929', 0, 1, 'uk'), +('B44', '', '', '52.545', '-1.884', 0, 1, 'uk'), +('B45', '', '', '52.388', '-2.009', 0, 1, 'uk'), +('B46', '', '', '52.508', '-1.694', 0, 1, 'uk'), +('B47', '', '', '52.387', '-1.88', 0, 1, 'uk'), +('B48', '', '', '52.355', '-1.948', 0, 1, 'uk'), +('B49', '', '', '52.217', '-1.867', 0, 1, 'uk'), +('B5', '', '', '52.47', '-1.896', 0, 1, 'uk'), +('B50', '', '', '52.169', '-1.854', 0, 1, 'uk'), +('B6', '', '', '52.504', '-1.885', 0, 1, 'uk'), +('B60', '', '', '52.326', '-2.049', 0, 1, 'uk'), +('B61', '', '', '52.345', '-2.067', 0, 1, 'uk'), +('B62', '', '', '52.456', '-2.032', 0, 1, 'uk'), +('B63', '', '', '52.452', '-2.067', 0, 1, 'uk'), +('B64', '', '', '52.472', '-2.068', 0, 1, 'uk'), +('B65', '', '', '52.483', '-2.042', 0, 1, 'uk'), +('B66', '', '', '52.493', '-1.964', 0, 1, 'uk'), +('B67', '', '', '52.486', '-1.977', 0, 1, 'uk'), +('B68', '', '', '52.479', '-2', 0, 1, 'uk'), +('B69', '', '', '52.502', '-2.028', 0, 1, 'uk'), +('B7', '', '', '52.493', '-1.873', 0, 1, 'uk'), +('B70', '', '', '52.52', '-2.003', 0, 1, 'uk'), +('B71', '', '', '52.535', '-1.989', 0, 1, 'uk'), +('B72', '', '', '52.552', '-1.821', 0, 1, 'uk'), +('B73', '', '', '52.552', '-1.841', 0, 1, 'uk'), +('B74', '', '', '52.583', '-1.858', 0, 1, 'uk'), +('B75', '', '', '52.578', '-1.809', 0, 1, 'uk'), +('B76', '', '', '52.545', '-1.785', 0, 1, 'uk'), +('B77', '', '', '52.618', '-1.667', 0, 1, 'uk'), +('B78', '', '', '52.606', '-1.673', 0, 1, 'uk'), +('B79', '', '', '52.65', '-1.681', 0, 1, 'uk'), +('B8', '', '', '52.49', '-1.84', 0, 1, 'uk'), +('B80', '', '', '52.277', '-1.895', 0, 1, 'uk'), +('B9', '', '', '52.478', '-1.849', 0, 1, 'uk'), +('B90', '', '', '52.4', '-1.824', 0, 1, 'uk'), +('B91', '', '', '52.413', '-1.782', 0, 1, 'uk'), +('B92', '', '', '52.436', '-1.774', 0, 1, 'uk'), +('B93', '', '', '52.38', '-1.743', 0, 1, 'uk'), +('B94', '', '', '52.351', '-1.791', 0, 1, 'uk'), +('B95', '', '', '52.285', '-1.779', 0, 1, 'uk'), +('B96', '', '', '52.252', '-1.96', 0, 1, 'uk'), +('B97', '', '', '52.299', '-1.954', 0, 1, 'uk'), +('B98', '', '', '52.303', '-1.914', 0, 1, 'uk'), +('BA1', '', '', '51.391', '-2.36', 0, 1, 'uk'), +('BA10', '', '', '51.113', '-2.446', 0, 1, 'uk'), +('BA11', '', '', '51.236', '-2.325', 0, 1, 'uk'), +('BA12', '', '', '51.171', '-2.187', 0, 1, 'uk'), +('BA13', '', '', '51.262', '-2.179', 0, 1, 'uk'), +('BA14', '', '', '51.318', '-2.201', 0, 1, 'uk'), +('BA15', '', '', '51.351', '-2.265', 0, 1, 'uk'), +('BA16', '', '', '51.125', '-2.743', 0, 1, 'uk'), +('BA2', '', '', '51.36', '-2.377', 0, 1, 'uk'), +('BA20', '', '', '50.938', '-2.642', 0, 1, 'uk'), +('BA21', '', '', '50.951', '-2.633', 0, 1, 'uk'), +('BA22', '', '', '50.968', '-2.637', 0, 1, 'uk'), +('BA3', '', '', '51.275', '-2.473', 0, 1, 'uk'), +('BA4', '', '', '51.171', '-2.531', 0, 1, 'uk'), +('BA5', '', '', '51.212', '-2.653', 0, 1, 'uk'), +('BA6', '', '', '51.141', '-2.705', 0, 1, 'uk'), +('BA7', '', '', '51.089', '-2.518', 0, 1, 'uk'), +('BA8', '', '', '50.999', '-2.411', 0, 1, 'uk'), +('BA9', '', '', '51.057', '-2.409', 0, 1, 'uk'), +('BB1', '', '', '53.756', '-2.462', 0, 1, 'uk'), +('BB10', '', '', '53.799', '-2.219', 0, 1, 'uk'), +('BB11', '', '', '53.783', '-2.252', 0, 1, 'uk'), +('BB12', '', '', '53.803', '-2.29', 0, 1, 'uk'), +('BB18', '', '', '53.914', '-2.171', 0, 1, 'uk'), +('BB2', '', '', '53.741', '-2.5', 0, 1, 'uk'), +('BB3', '', '', '53.698', '-2.465', 0, 1, 'uk'), +('BB4', '', '', '53.703', '-2.29', 0, 1, 'uk'), +('BB5', '', '', '53.754', '-2.371', 0, 1, 'uk'), +('BB6', '', '', '53.792', '-2.417', 0, 1, 'uk'), +('BB7', '', '', '53.874', '-2.386', 0, 1, 'uk'), +('BB8', '', '', '53.858', '-2.163', 0, 1, 'uk'), +('BB9', '', '', '53.837', '-2.214', 0, 1, 'uk'), +('BD1', '', '', '53.796', '-1.752', 0, 1, 'uk'), +('BD10', '', '', '53.832', '-1.725', 0, 1, 'uk'), +('BD11', '', '', '53.751', '-1.676', 0, 1, 'uk'), +('BD12', '', '', '53.746', '-1.761', 0, 1, 'uk'), +('BD13', '', '', '53.786', '-1.859', 0, 1, 'uk'), +('BD14', '', '', '53.782', '-1.816', 0, 1, 'uk'), +('BD15', '', '', '53.81', '-1.836', 0, 1, 'uk'), +('BD16', '', '', '53.849', '-1.833', 0, 1, 'uk'), +('BD17', '', '', '53.847', '-1.767', 0, 1, 'uk'), +('BD18', '', '', '53.831', '-1.776', 0, 1, 'uk'), +('BD19', '', '', '53.727', '-1.712', 0, 1, 'uk'), +('BD2', '', '', '53.814', '-1.734', 0, 1, 'uk'), +('BD20', '', '', '53.897', '-1.947', 0, 1, 'uk'), +('BD21', '', '', '53.864', '-1.906', 0, 1, 'uk'), +('BD22', '', '', '53.846', '-1.952', 0, 1, 'uk'), +('BD23', '', '', '53.993', '-2.054', 0, 1, 'uk'), +('BD24', '', '', '54.077', '-2.274', 0, 1, 'uk'), +('BD3', '', '', '53.798', '-1.727', 0, 1, 'uk'), +('BD4', '', '', '53.776', '-1.718', 0, 1, 'uk'), +('BD5', '', '', '53.778', '-1.758', 0, 1, 'uk'), +('BD6', '', '', '53.765', '-1.783', 0, 1, 'uk'), +('BD7', '', '', '53.783', '-1.782', 0, 1, 'uk'), +('BD8', '', '', '53.801', '-1.781', 0, 1, 'uk'), +('BD9', '', '', '53.812', '-1.789', 0, 1, 'uk'), +('BH1', '', '', '50.724', '-1.86', 0, 1, 'uk'), +('BH10', '', '', '50.759', '-1.891', 0, 1, 'uk'), +('BH11', '', '', '50.761', '-1.917', 0, 1, 'uk'), +('BH12', '', '', '50.737', '-1.926', 0, 1, 'uk'), +('BH13', '', '', '50.71', '-1.917', 0, 1, 'uk'), +('BH14', '', '', '50.721', '-1.944', 0, 1, 'uk'), +('BH15', '', '', '50.722', '-1.984', 0, 1, 'uk'), +('BH16', '', '', '50.738', '-2.044', 0, 1, 'uk'), +('BH17', '', '', '50.746', '-1.975', 0, 1, 'uk'), +('BH18', '', '', '50.758', '-1.993', 0, 1, 'uk'), +('BH19', '', '', '50.611', '-1.97', 0, 1, 'uk'), +('BH2', '', '', '50.721', '-1.881', 0, 1, 'uk'), +('BH20', '', '', '50.686', '-2.146', 0, 1, 'uk'), +('BH21', '', '', '50.812', '-1.973', 0, 1, 'uk'), +('BH22', '', '', '50.805', '-1.887', 0, 1, 'uk'), +('BH23', '', '', '50.746', '-1.754', 0, 1, 'uk'), +('BH24', '', '', '50.844', '-1.786', 0, 1, 'uk'), +('BH25', '', '', '50.752', '-1.657', 0, 1, 'uk'), +('BH3', '', '', '50.735', '-1.88', 0, 1, 'uk'), +('BH31', '', '', '50.876', '-1.872', 0, 1, 'uk'), +('BH4', '', '', '50.721', '-1.898', 0, 1, 'uk'), +('BH5', '', '', '50.725', '-1.834', 0, 1, 'uk'), +('BH6', '', '', '50.727', '-1.804', 0, 1, 'uk'), +('BH7', '', '', '50.735', '-1.831', 0, 1, 'uk'), +('BH8', '', '', '50.74', '-1.851', 0, 1, 'uk'), +('BH9', '', '', '50.749', '-1.871', 0, 1, 'uk'), +('BL0', '', '', '53.646', '-2.315', 0, 1, 'uk'), +('BL1', '', '', '53.59', '-2.444', 0, 1, 'uk'), +('BL2', '', '', '53.588', '-2.395', 0, 1, 'uk'), +('BL3', '', '', '53.565', '-2.431', 0, 1, 'uk'), +('BL4', '', '', '53.547', '-2.4', 0, 1, 'uk'), +('BL5', '', '', '53.549', '-2.515', 0, 1, 'uk'), +('BL6', '', '', '53.592', '-2.539', 0, 1, 'uk'), +('BL7', '', '', '53.63', '-2.421', 0, 1, 'uk'), +('BL8', '', '', '53.605', '-2.327', 0, 1, 'uk'), +('BL9', '', '', '53.592', '-2.286', 0, 1, 'uk'), +('BN1', '', '', '50.839', '-0.138', 0, 1, 'uk'), +('BN10', '', '', '50.795', '0.003', 0, 1, 'uk'), +('BN11', '', '', '50.813', '-0.376', 0, 1, 'uk'), +('BN12', '', '', '50.813', '-0.425', 0, 1, 'uk'), +('BN13', '', '', '50.83', '-0.405', 0, 1, 'uk'), +('BN14', '', '', '50.832', '-0.38', 0, 1, 'uk'), +('BN15', '', '', '50.83', '-0.324', 0, 1, 'uk'), +('BN16', '', '', '50.814', '-0.494', 0, 1, 'uk'), +('BN17', '', '', '50.814', '-0.535', 0, 1, 'uk'), +('BN18', '', '', '50.848', '-0.579', 0, 1, 'uk'), +('BN2', '', '', '50.824', '-0.103', 0, 1, 'uk'), +('BN20', '', '', '50.774', '0.255', 0, 1, 'uk'), +('BN21', '', '', '50.773', '0.277', 0, 1, 'uk'), +('BN22', '', '', '50.788', '0.284', 0, 1, 'uk'), +('BN23', '', '', '50.798', '0.314', 0, 1, 'uk'), +('BN24', '', '', '50.816', '0.331', 0, 1, 'uk'), +('BN25', '', '', '50.776', '0.11', 0, 1, 'uk'), +('BN26', '', '', '50.821', '0.223', 0, 1, 'uk'), +('BN27', '', '', '50.871', '0.265', 0, 1, 'uk'), +('BN3', '', '', '50.835', '-0.174', 0, 1, 'uk'), +('BN4', '', '', '50.833577', '-0.220172', 0, 1, 'uk'), +('BN41', '', '', '50.84', '-0.215', 0, 1, 'uk'), +('BN42', '', '', '50.837', '-0.231', 0, 1, 'uk'), +('BN43', '', '', '50.836', '-0.266', 0, 1, 'uk'), +('BN44', '', '', '50.89', '-0.322', 0, 1, 'uk'), +('BN45', '', '', '50.889', '-0.185', 0, 1, 'uk'), +('BN5', '', '', '50.927', '-0.268', 0, 1, 'uk'), +('BN6', '', '', '50.929', '-0.152', 0, 1, 'uk'), +('BN7', '', '', '50.877', '0.001', 0, 1, 'uk'), +('BN8', '', '', '50.913', '0.052', 0, 1, 'uk'), +('BN9', '', '', '50.795', '0.051', 0, 1, 'uk'), +('BR1', '', '', '51.411', '0.022', 0, 1, 'uk'), +('BR2', '', '', '51.389', '0.023', 0, 1, 'uk'), +('BR3', '', '', '51.403', '-0.031', 0, 1, 'uk'), +('BR4', '', '', '51.375', '-0.007', 0, 1, 'uk'), +('BR5', '', '', '51.39', '0.104', 0, 1, 'uk'), +('BR6', '', '', '51.366', '0.094', 0, 1, 'uk'), +('BR7', '', '', '51.41', '0.072', 0, 1, 'uk'), +('BR8', '', '', '51.398', '0.176', 0, 1, 'uk'), +('BS1', '', '', '51.453', '-2.593', 0, 1, 'uk'), +('BS10', '', '', '51.506', '-2.61', 0, 1, 'uk'), +('BS11', '', '', '51.497', '-2.675', 0, 1, 'uk'), +('BS12', '', '', '51.513976', '-2.54646', 0, 1, 'uk'), +('BS13', '', '', '51.412', '-2.611', 0, 1, 'uk'), +('BS14', '', '', '51.413', '-2.561', 0, 1, 'uk'), +('BS15', '', '', '51.459', '-2.506', 0, 1, 'uk'), +('BS16', '', '', '51.485', '-2.51', 0, 1, 'uk'), +('BS17', '', '', '51.462518', '-2.520625', 0, 1, 'uk'), +('BS18', '', '', '51.379781', '-2.507386', 0, 1, 'uk'), +('BS19', '', '', '51.246836', '-2.443326', 0, 1, 'uk'), +('BS2', '', '', '51.46', '-2.581', 0, 1, 'uk'), +('BS20', '', '', '51.479', '-2.752', 0, 1, 'uk'), +('BS21', '', '', '51.435', '-2.849', 0, 1, 'uk'), +('BS22', '', '', '51.36', '-2.929', 0, 1, 'uk'), +('BS23', '', '', '51.343', '-2.97', 0, 1, 'uk'), +('BS24', '', '', '51.327', '-2.932', 0, 1, 'uk'), +('BS25', '', '', '51.32', '-2.826', 0, 1, 'uk'), +('BS26', '', '', '51.279', '-2.855', 0, 1, 'uk'), +('BS27', '', '', '51.271', '-2.77', 0, 1, 'uk'), +('BS28', '', '', '51.225', '-2.814', 0, 1, 'uk'), +('BS29', '', '', '51.331', '-2.878', 0, 1, 'uk'), +('BS3', '', '', '51.438', '-2.602', 0, 1, 'uk'), +('BS30', '', '', '51.445', '-2.472', 0, 1, 'uk'), +('BS31', '', '', '51.408', '-2.491', 0, 1, 'uk'), +('BS32', '', '', '51.542', '-2.559', 0, 1, 'uk'), +('BS34', '', '', '51.523', '-2.564', 0, 1, 'uk'), +('BS35', '', '', '51.596', '-2.549', 0, 1, 'uk'), +('BS36', '', '', '51.526', '-2.486', 0, 1, 'uk'), +('BS37', '', '', '51.539', '-2.416', 0, 1, 'uk'), +('BS39', '', '', '51.328', '-2.532', 0, 1, 'uk'), +('BS4', '', '', '51.435', '-2.561', 0, 1, 'uk'), +('BS40', '', '', '51.346', '-2.691', 0, 1, 'uk'), +('BS41', '', '', '51.422', '-2.651', 0, 1, 'uk'), +('BS43', '', '', '51.44008', '-2.595185', 0, 1, 'uk'), +('BS48', '', '', '51.425', '-2.747', 0, 1, 'uk'), +('BS49', '', '', '51.38', '-2.817', 0, 1, 'uk'), +('BS5', '', '', '51.462', '-2.551', 0, 1, 'uk'), +('BS6', '', '', '51.47', '-2.599', 0, 1, 'uk'), +('BS7', '', '', '51.486', '-2.58', 0, 1, 'uk'), +('BS8', '', '', '51.457', '-2.621', 0, 1, 'uk'), +('BS9', '', '', '51.487', '-2.625', 0, 1, 'uk'), +('BS99', '', '', '51.458', '-2.573', 0, 1, 'uk'), +('BT1', '', '', '54.599', '-5.928', 0, 1, 'uk'), +('BT10', '', '', '54.56', '-5.984', 0, 1, 'uk'), +('BT11', '', '', '54.576', '-5.997', 0, 1, 'uk'), +('BT12', '', '', '54.592', '-5.956', 0, 1, 'uk'), +('BT13', '', '', '54.606', '-5.958', 0, 1, 'uk'), +('BT14', '', '', '54.621', '-5.961', 0, 1, 'uk'), +('BT15', '', '', '54.623', '-5.931', 0, 1, 'uk'), +('BT16', '', '', '54.591', '-5.797', 0, 1, 'uk'), +('BT17', '', '', '54.554', '-6.017', 0, 1, 'uk'), +('BT18', '', '', '54.641', '-5.82', 0, 1, 'uk'), +('BT19', '', '', '54.652', '-5.666', 0, 1, 'uk'), +('BT2', '', '', '54.593', '-5.93', 0, 1, 'uk'), +('BT20', '', '', '54.658', '-5.664', 0, 1, 'uk'), +('BT21', '', '', '54.639', '-5.545', 0, 1, 'uk'), +('BT22', '', '', '54.503', '-5.519', 0, 1, 'uk'), +('BT23', '', '', '54.563', '-5.715', 0, 1, 'uk'), +('BT24', '', '', '54.417', '-5.872', 0, 1, 'uk'), +('BT25', '', '', '54.395', '-6.111', 0, 1, 'uk'), +('BT26', '', '', '54.452', '-6.06', 0, 1, 'uk'), +('BT27', '', '', '54.51', '-6.02', 0, 1, 'uk'), +('BT28', '', '', '54.523', '-6.088', 0, 1, 'uk'), +('BT29', '', '', '54.62', '-6.195', 0, 1, 'uk'), +('BT3', '', '', '54.62', '-5.904', 0, 1, 'uk'), +('BT30', '', '', '54.334', '-5.704', 0, 1, 'uk'), +('BT31', '', '', '54.278', '-5.97', 0, 1, 'uk'), +('BT32', '', '', '54.335', '-6.244', 0, 1, 'uk'), +('BT33', '', '', '54.221', '-5.893', 0, 1, 'uk'), +('BT34', '', '', '54.155', '-6.18', 0, 1, 'uk'), +('BT35', '', '', '54.165', '-6.444', 0, 1, 'uk'), +('BT36', '', '', '54.677', '-5.955', 0, 1, 'uk'), +('BT37', '', '', '54.677', '-5.907', 0, 1, 'uk'), +('BT38', '', '', '54.73', '-5.799', 0, 1, 'uk'), +('BT39', '', '', '54.745', '-6.017', 0, 1, 'uk'), +('BT4', '', '', '54.603', '-5.867', 0, 1, 'uk'), +('BT40', '', '', '54.846', '-5.822', 0, 1, 'uk'), +('BT41', '', '', '54.733', '-6.26', 0, 1, 'uk'), +('BT42', '', '', '54.854', '-6.282', 0, 1, 'uk'), +('BT43', '', '', '54.89', '-6.265', 0, 1, 'uk'), +('BT44', '', '', '54.974', '-6.284', 0, 1, 'uk'), +('BT45', '', '', '54.76', '-6.639', 0, 1, 'uk'), +('BT46', '', '', '54.866', '-6.664', 0, 1, 'uk'), +('BT47', '', '', '54.974', '-7.211', 0, 1, 'uk'), +('BT48', '', '', '55.009', '-7.328', 0, 1, 'uk'), +('BT49', '', '', '55.048', '-6.952', 0, 1, 'uk'), +('BT5', '', '', '54.589', '-5.87', 0, 1, 'uk'), +('BT51', '', '', '55.058', '-6.681', 0, 1, 'uk'), +('BT52', '', '', '55.134', '-6.653', 0, 1, 'uk'), +('BT53', '', '', '55.085', '-6.473', 0, 1, 'uk'), +('BT54', '', '', '55.2', '-6.258', 0, 1, 'uk'), +('BT55', '', '', '55.18', '-6.71', 0, 1, 'uk'), +('BT56', '', '', '55.198', '-6.649', 0, 1, 'uk'), +('BT57', '', '', '55.202', '-6.517', 0, 1, 'uk'), +('BT6', '', '', '54.58', '-5.896', 0, 1, 'uk'), +('BT60', '', '', '54.292', '-6.65', 0, 1, 'uk'), +('BT61', '', '', '54.368', '-6.623', 0, 1, 'uk'), +('BT62', '', '', '54.412', '-6.464', 0, 1, 'uk'), +('BT63', '', '', '54.404', '-6.389', 0, 1, 'uk'), +('BT64', '', '', '54.45', '-6.392', 0, 1, 'uk'), +('BT65', '', '', '54.445', '-6.366', 0, 1, 'uk'), +('BT66', '', '', '54.455', '-6.333', 0, 1, 'uk'), +('BT67', '', '', '54.487', '-6.268', 0, 1, 'uk'), +('BT68', '', '', '54.366', '-6.848', 0, 1, 'uk'), +('BT69', '', '', '54.424', '-6.949', 0, 1, 'uk'), +('BT7', '', '', '54.582', '-5.924', 0, 1, 'uk'), +('BT70', '', '', '54.515', '-6.887', 0, 1, 'uk'), +('BT71', '', '', '54.513', '-6.704', 0, 1, 'uk'), +('BT74', '', '', '54.343', '-7.665', 0, 1, 'uk'), +('BT75', '', '', '54.375', '-7.315', 0, 1, 'uk'), +('BT76', '', '', '54.419', '-7.191', 0, 1, 'uk'), +('BT77', '', '', '54.427', '-7.117', 0, 1, 'uk'), +('BT78', '', '', '54.571', '-7.374', 0, 1, 'uk'), +('BT79', '', '', '54.624', '-7.201', 0, 1, 'uk'), +('BT8', '', '', '54.54', '-5.905', 0, 1, 'uk'), +('BT80', '', '', '54.645', '-6.748', 0, 1, 'uk'), +('BT81', '', '', '54.694', '-7.614', 0, 1, 'uk'), +('BT82', '', '', '54.826', '-7.427', 0, 1, 'uk'), +('BT9', '', '', '54.572', '-5.949', 0, 1, 'uk'), +('BT92', '', '', '54.223', '-7.462', 0, 1, 'uk'), +('BT93', '', '', '54.465', '-7.826', 0, 1, 'uk'), +('BT94', '', '', '54.376', '-7.541', 0, 1, 'uk'), +('C03', '', '', '51.876799', '0.854968', 0, 1, 'uk'), +('CA1', '', '', '54.886', '-2.911', 0, 1, 'uk'), +('CA10', '', '', '54.611', '-2.659', 0, 1, 'uk'), +('CA11', '', '', '54.664', '-2.786', 0, 1, 'uk'), +('CA12', '', '', '54.602', '-3.133', 0, 1, 'uk'), +('CA13', '', '', '54.66', '-3.366', 0, 1, 'uk'), +('CA14', '', '', '54.634', '-3.537', 0, 1, 'uk'), +('CA15', '', '', '54.712', '-3.481', 0, 1, 'uk'), +('CA16', '', '', '54.574', '-2.483', 0, 1, 'uk'), +('CA17', '', '', '54.479', '-2.35', 0, 1, 'uk'), +('CA18', '', '', '54.354', '-3.39', 0, 1, 'uk'), +('CA19', '', '', '54.387', '-3.382', 0, 1, 'uk'), +('CA2', '', '', '54.884', '-2.949', 0, 1, 'uk'), +('CA20', '', '', '54.41', '-3.461', 0, 1, 'uk'), +('CA21', '', '', '54.445', '-3.515', 0, 1, 'uk'), +('CA22', '', '', '54.48', '-3.531', 0, 1, 'uk'), +('CA23', '', '', '54.514', '-3.493', 0, 1, 'uk'), +('CA24', '', '', '54.515', '-3.542', 0, 1, 'uk'), +('CA25', '', '', '54.523', '-3.517', 0, 1, 'uk'), +('CA26', '', '', '54.544', '-3.481', 0, 1, 'uk'), +('CA27', '', '', '54.491', '-3.592', 0, 1, 'uk'), +('CA28', '', '', '54.544', '-3.577', 0, 1, 'uk'), +('CA3', '', '', '54.907', '-2.939', 0, 1, 'uk'), +('CA4', '', '', '54.847', '-2.833', 0, 1, 'uk'), +('CA5', '', '', '54.855', '-3.015', 0, 1, 'uk'), +('CA6', '', '', '54.994', '-2.892', 0, 1, 'uk'), +('CA7', '', '', '54.807', '-3.237', 0, 1, 'uk'), +('CA8', '', '', '54.939', '-2.685', 0, 1, 'uk'), +('CA9', '', '', '54.802', '-2.419', 0, 1, 'uk'), +('CB1', '', '', '52.176', '0.19', 0, 1, 'uk'), +('CB10', '', '', '52.03', '0.266', 0, 1, 'uk'), +('CB11', '', '', '52', '0.214', 0, 1, 'uk'), +('CB2', '', '', '52.163', '0.133', 0, 1, 'uk'), +('CB21', '', '', '52.119036', '0.315929', 0, 1, 'uk'), +('CB22', '', '', '52.122344', '0.184663', 0, 1, 'uk'), +('CB23', '', '', '52.149782', '0.056357', 0, 1, 'uk'), +('CB24', '', '', '52.279289', '0.053552', 0, 1, 'uk'), +('CB25', '', '', '52.269251', '0.330103', 0, 1, 'uk'), +('CB3', '', '', '52.213', '0.025', 0, 1, 'uk'), +('CB4', '', '', '52.243', '0.115', 0, 1, 'uk'), +('CB5', '', '', '52.239', '0.211', 0, 1, 'uk'), +('CB6', '', '', '52.404', '0.224', 0, 1, 'uk'), +('CB7', '', '', '52.366', '0.322', 0, 1, 'uk'), +('CB8', '', '', '52.231', '0.427', 0, 1, 'uk'), +('CB9', '', '', '52.082', '0.441', 0, 1, 'uk'), +('CF1', '', '', '51.483211', '-3.171682', 0, 1, 'uk'), +('CF10', '', '', '51.474', '-3.176', 0, 1, 'uk'), +('CF11', '', '', '51.473', '-3.192', 0, 1, 'uk'), +('CF14', '', '', '51.519', '-3.203', 0, 1, 'uk'), +('CF15', '', '', '51.534', '-3.273', 0, 1, 'uk'), +('CF23', '', '', '51.515', '-3.151', 0, 1, 'uk'), +('CF24', '', '', '51.485', '-3.164', 0, 1, 'uk'), +('CF3', '', '', '51.519', '-3.111', 0, 1, 'uk'), +('CF31', '', '', '51.509', '-3.576', 0, 1, 'uk'), +('CF32', '', '', '51.56', '-3.583', 0, 1, 'uk'), +('CF33', '', '', '51.524', '-3.69', 0, 1, 'uk'), +('CF34', '', '', '51.61', '-3.651', 0, 1, 'uk'), +('CF35', '', '', '51.522', '-3.519', 0, 1, 'uk'), +('CF36', '', '', '51.485', '-3.698', 0, 1, 'uk'), +('CF37', '', '', '51.603', '-3.333', 0, 1, 'uk'), +('CF38', '', '', '51.56', '-3.332', 0, 1, 'uk'), +('CF39', '', '', '51.601', '-3.423', 0, 1, 'uk'), +('CF4', '', '', '51.516953', '-3.206791', 0, 1, 'uk'), +('CF40', '', '', '51.62', '-3.45', 0, 1, 'uk'), +('CF41', '', '', '51.647', '-3.481', 0, 1, 'uk'), +('CF42', '', '', '51.667', '-3.522', 0, 1, 'uk'), +('CF43', '', '', '51.658', '-3.449', 0, 1, 'uk'), +('CF44', '', '', '51.718', '-3.458', 0, 1, 'uk'), +('CF45', '', '', '51.669', '-3.361', 0, 1, 'uk'), +('CF46', '', '', '51.665', '-3.3', 0, 1, 'uk'), +('CF47', '', '', '51.751', '-3.374', 0, 1, 'uk'), +('CF48', '', '', '51.741', '-3.369', 0, 1, 'uk'), +('CF5', '', '', '51.482', '-3.242', 0, 1, 'uk'), +('CF61', '', '', '51.408', '-3.48', 0, 1, 'uk'), +('CF62', '', '', '51.404', '-3.308', 0, 1, 'uk'), +('CF63', '', '', '51.412', '-3.256', 0, 1, 'uk'), +('CF64', '', '', '51.433', '-3.189', 0, 1, 'uk'), +('CF71', '', '', '51.461', '-3.454', 0, 1, 'uk'), +('CF72', '', '', '51.53', '-3.398', 0, 1, 'uk'), +('CF77', '', '', '51.450009', '-3.416403', 0, 1, 'uk'), +('CF81', '', '', '51.7', '-3.243', 0, 1, 'uk'), +('CF82', '', '', '51.652', '-3.236', 0, 1, 'uk'), +('CF83', '', '', '51.586', '-3.217', 0, 1, 'uk'), +('CH1', '', '', '53.202', '-2.908', 0, 1, 'uk'), +('CH2', '', '', '53.216', '-2.868', 0, 1, 'uk'), +('CH3', '', '', '53.167', '-2.822', 0, 1, 'uk'), +('CH4', '', '', '53.168', '-2.939', 0, 1, 'uk'), +('CH41', '', '', '53.394', '-3.03', 0, 1, 'uk'), +('CH42', '', '', '53.374', '-3.021', 0, 1, 'uk'), +('CH43', '', '', '53.383', '-3.058', 0, 1, 'uk'), +('CH44', '', '', '53.415', '-3.036', 0, 1, 'uk'), +('CH45', '', '', '53.428', '-3.05', 0, 1, 'uk'), +('CH46', '', '', '53.404', '-3.11', 0, 1, 'uk'), +('CH47', '', '', '53.396', '-3.168', 0, 1, 'uk'), +('CH48', '', '', '53.372', '-3.169', 0, 1, 'uk'), +('CH49', '', '', '53.381', '-3.103', 0, 1, 'uk'), +('CH5', '', '', '53.204', '-3.041', 0, 1, 'uk'), +('CH6', '', '', '53.25', '-3.145', 0, 1, 'uk'), +('CH60', '', '', '53.326', '-3.095', 0, 1, 'uk'), +('CH61', '', '', '53.348', '-3.101', 0, 1, 'uk'), +('CH62', '', '', '53.334', '-2.981', 0, 1, 'uk'), +('CH63', '', '', '53.345', '-3.011', 0, 1, 'uk'), +('CH64', '', '', '53.288', '-3.047', 0, 1, 'uk'), +('CH65', '', '', '53.277', '-2.902', 0, 1, 'uk'), +('CH66', '', '', '53.277', '-2.934', 0, 1, 'uk'), +('CH7', '', '', '53.169', '-3.133', 0, 1, 'uk'), +('CH8', '', '', '53.281', '-3.241', 0, 1, 'uk'), +('CM0', '', '', '51.663', '0.837', 0, 1, 'uk'), +('CM1', '', '', '51.745', '0.457', 0, 1, 'uk'), +('CM10', '', '', '51.637021', '0.790966', 0, 1, 'uk'), +('CM11', '', '', '51.623', '0.446', 0, 1, 'uk'), +('CM12', '', '', '51.628', '0.416', 0, 1, 'uk'), +('CM13', '', '', '51.615', '0.338', 0, 1, 'uk'), +('CM14', '', '', '51.618', '0.293', 0, 1, 'uk'), +('CM15', '', '', '51.643', '0.306', 0, 1, 'uk'), +('CM16', '', '', '51.7', '0.122', 0, 1, 'uk'), +('CM17', '', '', '51.771', '0.146', 0, 1, 'uk'), +('CM18', '', '', '51.756', '0.107', 0, 1, 'uk'), +('CM19', '', '', '51.76', '0.075', 0, 1, 'uk'), +('CM2', '', '', '51.722', '0.487', 0, 1, 'uk'), +('CM20', '', '', '51.775', '0.105', 0, 1, 'uk'), +('CM21', '', '', '51.812', '0.147', 0, 1, 'uk'), +('CM22', '', '', '51.862', '0.222', 0, 1, 'uk'), +('CM23', '', '', '51.871', '0.16', 0, 1, 'uk'), +('CM24', '', '', '51.899', '0.207', 0, 1, 'uk'), +('CM3', '', '', '51.72', '0.585', 0, 1, 'uk'), +('CM4', '', '', '51.674', '0.392', 0, 1, 'uk'), +('CM5', '', '', '51.721', '0.249', 0, 1, 'uk'), +('CM6', '', '', '51.877', '0.367', 0, 1, 'uk'), +('CM7', '', '', '51.897', '0.539', 0, 1, 'uk'), +('CM8', '', '', '51.805', '0.639', 0, 1, 'uk'), +('CM9', '', '', '51.741', '0.702', 0, 1, 'uk'), +('CM99', '', '', '51.736822', '0.476129', 0, 1, 'uk'), +('CO1', '', '', '51.889', '0.91', 0, 1, 'uk'), +('CO10', '', '', '52.057', '0.724', 0, 1, 'uk'), +('CO11', '', '', '51.942', '1.079', 0, 1, 'uk'), +('CO12', '', '', '51.931', '1.255', 0, 1, 'uk'), +('CO13', '', '', '51.838', '1.239', 0, 1, 'uk'), +('CO14', '', '', '51.85', '1.269', 0, 1, 'uk'), +('CO15', '', '', '51.796', '1.157', 0, 1, 'uk'), +('CO16', '', '', '51.821', '1.126', 0, 1, 'uk'), +('CO2', '', '', '51.869', '0.895', 0, 1, 'uk'), +('CO3', '', '', '51.884', '0.863', 0, 1, 'uk'), +('CO4', '', '', '51.907', '0.924', 0, 1, 'uk'), +('CO5', '', '', '51.814', '0.822', 0, 1, 'uk'), +('CO6', '', '', '51.924', '0.79', 0, 1, 'uk'), +('CO7', '', '', '51.884', '1.005', 0, 1, 'uk'), +('CO8', '', '', '51.973', '0.767', 0, 1, 'uk'), +('CO9', '', '', '51.969', '0.611', 0, 1, 'uk'), +('CR0', '', '', '51.372', '-0.074', 0, 1, 'uk'), +('CR1', '', '', '51.375444', '-0.102335', 0, 1, 'uk'), +('CR2', '', '', '51.35', '-0.08', 0, 1, 'uk'), +('CR3', '', '', '51.287', '-0.08', 0, 1, 'uk'), +('CR4', '', '', '51.404', '-0.159', 0, 1, 'uk'), +('CR5', '', '', '51.312', '-0.139', 0, 1, 'uk'), +('CR6', '', '', '51.308', '-0.052', 0, 1, 'uk'), +('CR7', '', '', '51.395', '-0.103', 0, 1, 'uk'), +('CR8', '', '', '51.336', '-0.11', 0, 1, 'uk'), +('CR9', '', '', '51.374944', '-0.097011', 0, 1, 'uk'), +('CT1', '', '', '51.277', '1.087', 0, 1, 'uk'), +('CT10', '', '', '51.362', '1.431', 0, 1, 'uk'), +('CT11', '', '', '51.336', '1.415', 0, 1, 'uk'), +('CT12', '', '', '51.343', '1.373', 0, 1, 'uk'), +('CT13', '', '', '51.267', '1.33', 0, 1, 'uk'), +('CT14', '', '', '51.216', '1.387', 0, 1, 'uk'), +('CT15', '', '', '51.171', '1.284', 0, 1, 'uk'), +('CT16', '', '', '51.14', '1.302', 0, 1, 'uk'), +('CT17', '', '', '51.128', '1.296', 0, 1, 'uk'), +('CT18', '', '', '51.114', '1.15', 0, 1, 'uk'), +('CT19', '', '', '51.088', '1.17', 0, 1, 'uk'), +('CT2', '', '', '51.293', '1.082', 0, 1, 'uk'), +('CT20', '', '', '51.079', '1.166', 0, 1, 'uk'), +('CT21', '', '', '51.073', '1.078', 0, 1, 'uk'), +('CT3', '', '', '51.278', '1.212', 0, 1, 'uk'), +('CT4', '', '', '51.225', '1.068', 0, 1, 'uk'), +('CT5', '', '', '51.353', '1.037', 0, 1, 'uk'), +('CT6', '', '', '51.364', '1.131', 0, 1, 'uk'), +('CT7', '', '', '51.371', '1.301', 0, 1, 'uk'), +('CT8', '', '', '51.38', '1.341', 0, 1, 'uk'), +('CT9', '', '', '51.383', '1.391', 0, 1, 'uk'), +('CV1', '', '', '52.41', '-1.507', 0, 1, 'uk'), +('CV10', '', '', '52.525', '-1.5', 0, 1, 'uk'), +('CV11', '', '', '52.519', '-1.453', 0, 1, 'uk'), +('CV12', '', '', '52.474', '-1.473', 0, 1, 'uk'), +('CV13', '', '', '52.612', '-1.414', 0, 1, 'uk'), +('CV2', '', '', '52.423', '-1.464', 0, 1, 'uk'), +('CV21', '', '', '52.368', '-1.274', 0, 1, 'uk'), +('CV22', '', '', '52.355', '-1.287', 0, 1, 'uk'), +('CV23', '', '', '52.361', '-1.308', 0, 1, 'uk'), +('CV3', '', '', '52.393', '-1.482', 0, 1, 'uk'), +('CV31', '', '', '52.278', '-1.524', 0, 1, 'uk'), +('CV32', '', '', '52.296', '-1.53', 0, 1, 'uk'), +('CV33', '', '', '52.257', '-1.484', 0, 1, 'uk'), +('CV34', '', '', '52.283', '-1.579', 0, 1, 'uk'), +('CV35', '', '', '52.229', '-1.595', 0, 1, 'uk'), +('CV36', '', '', '52.067', '-1.625', 0, 1, 'uk'), +('CV37', '', '', '52.185', '-1.713', 0, 1, 'uk'), +('CV4', '', '', '52.398', '-1.565', 0, 1, 'uk'), +('CV47', '', '', '52.234', '-1.385', 0, 1, 'uk'), +('CV5', '', '', '52.412', '-1.551', 0, 1, 'uk'), +('CV6', '', '', '52.432', '-1.507', 0, 1, 'uk'), +('CV7', '', '', '52.444', '-1.563', 0, 1, 'uk'), +('CV8', '', '', '52.351', '-1.543', 0, 1, 'uk'), +('CV9', '', '', '52.585', '-1.558', 0, 1, 'uk'), +('CW1', '', '', '53.103', '-2.434', 0, 1, 'uk'), +('CW10', '', '', '53.189', '-2.445', 0, 1, 'uk'), +('CW11', '', '', '53.142', '-2.365', 0, 1, 'uk'), +('CW12', '', '', '53.165', '-2.212', 0, 1, 'uk'), +('CW2', '', '', '53.081', '-2.446', 0, 1, 'uk'), +('CW3', '', '', '53', '-2.406', 0, 1, 'uk'), +('CW4', '', '', '53.207', '-2.347', 0, 1, 'uk'), +('CW5', '', '', '53.062', '-2.521', 0, 1, 'uk'), +('CW6', '', '', '53.162', '-2.666', 0, 1, 'uk'), +('CW7', '', '', '53.19', '-2.526', 0, 1, 'uk'), +('CW8', '', '', '53.254', '-2.563', 0, 1, 'uk'), +('CW9', '', '', '53.259', '-2.501', 0, 1, 'uk'), +('DA1', '', '', '51.447', '0.21', 0, 1, 'uk'), +('DA10', '', '', '51.444', '0.308', 0, 1, 'uk'), +('DA11', '', '', '51.434', '0.354', 0, 1, 'uk'), +('DA12', '', '', '51.427', '0.389', 0, 1, 'uk'), +('DA13', '', '', '51.382', '0.355', 0, 1, 'uk'), +('DA14', '', '', '51.425', '0.113', 0, 1, 'uk'), +('DA15', '', '', '51.44', '0.1', 0, 1, 'uk'), +('DA16', '', '', '51.464', '0.109', 0, 1, 'uk'), +('DA17', '', '', '51.487', '0.149', 0, 1, 'uk'), +('DA18', '', '', '51.492', '0.144', 0, 1, 'uk'), +('DA2', '', '', '51.432', '0.234', 0, 1, 'uk'), +('DA3', '', '', '51.385', '0.31', 0, 1, 'uk'), +('DA4', '', '', '51.391', '0.233', 0, 1, 'uk'), +('DA5', '', '', '51.44', '0.146', 0, 1, 'uk'), +('DA6', '', '', '51.455', '0.14', 0, 1, 'uk'), +('DA7', '', '', '51.466', '0.147', 0, 1, 'uk'), +('DA8', '', '', '51.475', '0.178', 0, 1, 'uk'), +('DA9', '', '', '51.447', '0.28', 0, 1, 'uk'), +('DB23', '', '', '53.975871', '-1.993317', 0, 1, 'uk'), +('DD1', '', '', '56.461', '-2.977', 0, 1, 'uk'), +('DD10', '', '', '56.747', '-2.427', 0, 1, 'uk'), +('DD11', '', '', '56.573', '-2.598', 0, 1, 'uk'), +('DD2', '', '', '56.47', '-3.027', 0, 1, 'uk'), +('DD3', '', '', '56.482', '-2.988', 0, 1, 'uk'), +('DD4', '', '', '56.482', '-2.935', 0, 1, 'uk'), +('DD5', '', '', '56.478', '-2.862', 0, 1, 'uk'), +('DD6', '', '', '56.437', '-2.925', 0, 1, 'uk'), +('DD7', '', '', '56.503', '-2.718', 0, 1, 'uk'), +('DD8', '', '', '56.656', '-2.922', 0, 1, 'uk'), +('DD9', '', '', '56.748', '-2.667', 0, 1, 'uk'), +('DE1', '', '', '52.92', '-1.475', 0, 1, 'uk'), +('DE11', '', '', '52.773', '-1.554', 0, 1, 'uk'), +('DE12', '', '', '52.725', '-1.553', 0, 1, 'uk'), +('DE13', '', '', '52.808', '-1.688', 0, 1, 'uk'), +('DE14', '', '', '52.805', '-1.64', 0, 1, 'uk'), +('DE15', '', '', '52.799', '-1.608', 0, 1, 'uk'), +('DE21', '', '', '52.933', '-1.432', 0, 1, 'uk'), +('DE22', '', '', '52.934', '-1.496', 0, 1, 'uk'), +('DE23', '', '', '52.901', '-1.494', 0, 1, 'uk'), +('DE24', '', '', '52.89', '-1.451', 0, 1, 'uk'), +('DE3', '', '', '52.909', '-1.54', 0, 1, 'uk'), +('DE4', '', '', '53.127', '-1.564', 0, 1, 'uk'), +('DE45', '', '', '53.215', '-1.676', 0, 1, 'uk'), +('DE5', '', '', '53.045', '-1.401', 0, 1, 'uk'), +('DE55', '', '', '53.101', '-1.371', 0, 1, 'uk'), +('DE56', '', '', '53.022', '-1.474', 0, 1, 'uk'), +('DE6', '', '', '52.993', '-1.717', 0, 1, 'uk'), +('DE65', '', '', '52.867', '-1.61', 0, 1, 'uk'), +('DE7', '', '', '52.973', '-1.321', 0, 1, 'uk'), +('DE72', '', '', '52.894', '-1.359', 0, 1, 'uk'), +('DE73', '', '', '52.847', '-1.435', 0, 1, 'uk'), +('DE74', '', '', '52.844', '-1.33', 0, 1, 'uk'), +('DE75', '', '', '53.013', '-1.353', 0, 1, 'uk'), +('DG1', '', '', '55.073', '-3.58', 0, 1, 'uk'), +('DG10', '', '', '55.32', '-3.437', 0, 1, 'uk'), +('DG11', '', '', '55.114', '-3.336', 0, 1, 'uk'), +('DG12', '', '', '54.99', '-3.251', 0, 1, 'uk'), +('DG13', '', '', '55.173', '-3.029', 0, 1, 'uk'), +('DG14', '', '', '55.081', '-2.985', 0, 1, 'uk'), +('DG16', '', '', '54.997', '-3.068', 0, 1, 'uk'), +('DG2', '', '', '55.065', '-3.657', 0, 1, 'uk'), +('DG3', '', '', '55.237', '-3.799', 0, 1, 'uk'), +('DG4', '', '', '55.375', '-3.952', 0, 1, 'uk'), +('DG5', '', '', '54.922', '-3.81', 0, 1, 'uk'), +('DG6', '', '', '54.837', '-4.055', 0, 1, 'uk'), +('DG7', '', '', '54.968', '-4.012', 0, 1, 'uk'), +('DG8', '', '', '54.873', '-4.516', 0, 1, 'uk'), +('DG9', '', '', '54.878', '-5.021', 0, 1, 'uk'), +('DH1', '', '', '54.781', '-1.566', 0, 1, 'uk'), +('DH2', '', '', '54.86', '-1.597', 0, 1, 'uk'), +('DH3', '', '', '54.872', '-1.567', 0, 1, 'uk'), +('DH4', '', '', '54.854', '-1.49', 0, 1, 'uk'), +('DH5', '', '', '54.824', '-1.454', 0, 1, 'uk'), +('DH6', '', '', '54.753', '-1.464', 0, 1, 'uk'), +('DH7', '', '', '54.79', '-1.664', 0, 1, 'uk'), +('DH8', '', '', '54.856', '-1.844', 0, 1, 'uk'), +('DH9', '', '', '54.868', '-1.708', 0, 1, 'uk'), +('DL1', '', '', '54.53', '-1.536', 0, 1, 'uk'), +('DL10', '', '', '54.414', '-1.69', 0, 1, 'uk'), +('DL11', '', '', '54.439', '-1.875', 0, 1, 'uk'), +('DL12', '', '', '54.572', '-1.985', 0, 1, 'uk'), +('DL13', '', '', '54.716', '-1.954', 0, 1, 'uk'), +('DL14', '', '', '54.652', '-1.69', 0, 1, 'uk'), +('DL15', '', '', '54.71', '-1.728', 0, 1, 'uk'), +('DL16', '', '', '54.699', '-1.604', 0, 1, 'uk'), +('DL17', '', '', '54.681', '-1.54', 0, 1, 'uk'), +('DL18', '', '', '54.692056', '-1.546906', 0, 1, 'uk'), +('DL2', '', '', '54.529', '-1.601', 0, 1, 'uk'), +('DL3', '', '', '54.532', '-1.57', 0, 1, 'uk'), +('DL4', '', '', '54.63', '-1.643', 0, 1, 'uk'), +('DL5', '', '', '54.617', '-1.576', 0, 1, 'uk'), +('DL6', '', '', '54.371', '-1.389', 0, 1, 'uk'), +('DL7', '', '', '54.338', '-1.485', 0, 1, 'uk'), +('DL8', '', '', '54.293', '-1.786', 0, 1, 'uk'), +('DL9', '', '', '54.375', '-1.709', 0, 1, 'uk'), +('DN1', '', '', '53.522', '-1.129', 0, 1, 'uk'), +('DN10', '', '', '53.427', '-0.943', 0, 1, 'uk'), +('DN11', '', '', '53.451', '-1.082', 0, 1, 'uk'), +('DN12', '', '', '53.483', '-1.221', 0, 1, 'uk'), +('DN14', '', '', '53.708', '-0.936', 0, 1, 'uk'), +('DN15', '', '', '53.614', '-0.65', 0, 1, 'uk'), +('DN16', '', '', '53.568', '-0.64', 0, 1, 'uk'), +('DN17', '', '', '53.572', '-0.701', 0, 1, 'uk'), +('DN18', '', '', '53.68', '-0.446', 0, 1, 'uk'), +('DN19', '', '', '53.684', '-0.359', 0, 1, 'uk'), +('DN2', '', '', '53.533', '-1.102', 0, 1, 'uk'), +('DN20', '', '', '53.558', '-0.505', 0, 1, 'uk'), +('DN21', '', '', '53.419', '-0.701', 0, 1, 'uk'), +('DN22', '', '', '53.323', '-0.927', 0, 1, 'uk'), +('DN3', '', '', '53.546', '-1.059', 0, 1, 'uk'), +('DN31', '', '', '53.57', '-0.086', 0, 1, 'uk'), +('DN32', '', '', '53.562', '-0.069', 0, 1, 'uk'), +('DN33', '', '', '53.54', '-0.097', 0, 1, 'uk'), +('DN34', '', '', '53.557', '-0.112', 0, 1, 'uk'), +('DN35', '', '', '53.555', '-0.035', 0, 1, 'uk'), +('DN36', '', '', '53.511', '-0.037', 0, 1, 'uk'), +('DN37', '', '', '53.541', '-0.135', 0, 1, 'uk'), +('DN38', '', '', '53.561', '-0.392', 0, 1, 'uk'), +('DN39', '', '', '53.617', '-0.334', 0, 1, 'uk'), +('DN4', '', '', '53.506', '-1.121', 0, 1, 'uk'), +('DN40', '', '', '53.621', '-0.224', 0, 1, 'uk'), +('DN41', '', '', '53.583', '-0.195', 0, 1, 'uk'), +('DN5', '', '', '53.537', '-1.172', 0, 1, 'uk'), +('DN6', '', '', '53.596', '-1.176', 0, 1, 'uk'), +('DN7', '', '', '53.582', '-1.015', 0, 1, 'uk'), +('DN8', '', '', '53.614', '-0.956', 0, 1, 'uk'), +('DN9', '', '', '53.506', '-0.894', 0, 1, 'uk'), +('DT1', '', '', '50.711', '-2.44', 0, 1, 'uk'), +('DT10', '', '', '50.937', '-2.333', 0, 1, 'uk'), +('DT11', '', '', '50.86', '-2.181', 0, 1, 'uk'), +('DT2', '', '', '50.749', '-2.453', 0, 1, 'uk'), +('DT3', '', '', '50.641', '-2.466', 0, 1, 'uk'), +('DT4', '', '', '50.609', '-2.464', 0, 1, 'uk'), +('DT5', '', '', '50.548', '-2.441', 0, 1, 'uk'), +('DT6', '', '', '50.739', '-2.775', 0, 1, 'uk'), +('DT7', '', '', '50.729', '-2.946', 0, 1, 'uk'), +('DT8', '', '', '50.816', '-2.758', 0, 1, 'uk'), +('DT9', '', '', '50.941', '-2.515', 0, 1, 'uk'), +('DY1', '', '', '52.516', '-2.096', 0, 1, 'uk'), +('DY10', '', '', '52.386', '-2.224', 0, 1, 'uk'), +('DY11', '', '', '52.385', '-2.261', 0, 1, 'uk'), +('DY12', '', '', '52.385', '-2.329', 0, 1, 'uk'), +('DY13', '', '', '52.336', '-2.28', 0, 1, 'uk'), +('DY14', '', '', '52.38', '-2.462', 0, 1, 'uk'), +('DY2', '', '', '52.496', '-2.08', 0, 1, 'uk'), +('DY3', '', '', '52.53', '-2.128', 0, 1, 'uk'), +('DY4', '', '', '52.532', '-2.053', 0, 1, 'uk'), +('DY5', '', '', '52.48', '-2.122', 0, 1, 'uk'), +('DY6', '', '', '52.498', '-2.164', 0, 1, 'uk'), +('DY7', '', '', '52.466', '-2.224', 0, 1, 'uk'), +('DY8', '', '', '52.46', '-2.154', 0, 1, 'uk'), +('DY9', '', '', '52.435', '-2.122', 0, 1, 'uk'), +('E1', '', '', '51.517', '-0.058', 0, 1, 'uk'), +('E10', '', '', '51.568', '-0.012', 0, 1, 'uk'), +('E11', '', '', '51.568', '0.014', 0, 1, 'uk'), +('E12', '', '', '51.55', '0.054', 0, 1, 'uk'), +('E13', '', '', '51.527', '0.027', 0, 1, 'uk'), +('E14', '', '', '51.506', '-0.019', 0, 1, 'uk'), +('E15', '', '', '51.539', '0.003', 0, 1, 'uk'), +('E16', '', '', '51.511', '0.026', 0, 1, 'uk'), +('E17', '', '', '51.586', '-0.019', 0, 1, 'uk'), +('E18', '', '', '51.592', '0.027', 0, 1, 'uk'), +('E1W', '', '', '51.508', '-0.058', 0, 1, 'uk'), +('E2', '', '', '51.529', '-0.061', 0, 1, 'uk'), +('E3', '', '', '51.528', '-0.025', 0, 1, 'uk'), +('E4', '', '', '51.622', '-0.003', 0, 1, 'uk'), +('E5', '', '', '51.559', '-0.053', 0, 1, 'uk'), +('E6', '', '', '51.526', '0.056', 0, 1, 'uk'), +('E7', '', '', '51.547', '0.028', 0, 1, 'uk'), +('E8', '', '', '51.542', '-0.064', 0, 1, 'uk'), +('E9', '', '', '51.543', '-0.043', 0, 1, 'uk'), +('EA11', '', '', '50.712947', '-3.30738', 0, 1, 'uk'), +('EC1', '', '', '51.523', '-0.102', 0, 1, 'uk'), +('EC1A', '', '', '51.52', '-0.103', 0, 1, 'uk'), +('EC1E', '', '', '51.52297', '-0.102436', 0, 1, 'uk'), +('EC1M', '', '', '51.521', '-0.102', 0, 1, 'uk'), +('EC1N', '', '', '51.52', '-0.108', 0, 1, 'uk'), +('EC1R', '', '', '51.524', '-0.107', 0, 1, 'uk'), +('EC1V', '', '', '51.526', '-0.097', 0, 1, 'uk'), +('EC1Y', '', '', '51.523', '-0.093', 0, 1, 'uk'), +('EC2', '', '', '51.52', '-0.089', 0, 1, 'uk'), +('EC2A', '', '', '51.523', '-0.085', 0, 1, 'uk'), +('EC2M', '', '', '51.518', '-0.086', 0, 1, 'uk'), +('EC2N', '', '', '51.516', '-0.086', 0, 1, 'uk'), +('EC2R', '', '', '51.517', '-0.092', 0, 1, 'uk'), +('EC2V', '', '', '51.516', '-0.093', 0, 1, 'uk'), +('EC2Y', '', '', '51.52', '-0.096', 0, 1, 'uk'), +('EC3', '', '', '51.513', '-0.083', 0, 1, 'uk'), +('EC3A', '', '', '51.515', '-0.081', 0, 1, 'uk'), +('EC3M', '', '', '51.512', '-0.083', 0, 1, 'uk'), +('EC3N', '', '', '51.513', '-0.079', 0, 1, 'uk'), +('EC3P', '', '', '51.52', '-0.101', 0, 1, 'uk'), +('EC3R', '', '', '51.512', '-0.085', 0, 1, 'uk'), +('EC3V', '', '', '51.513', '-0.086', 0, 1, 'uk'), +('EC4', '', '', '51.514', '-0.101', 0, 1, 'uk'), +('EC4A', '', '', '51.516', '-0.107', 0, 1, 'uk'), +('EC4M', '', '', '51.515', '-0.1', 0, 1, 'uk'), +('EC4N', '', '', '51.514', '-0.093', 0, 1, 'uk'), +('EC4R', '', '', '51.512', '-0.091', 0, 1, 'uk'), +('EC4V', '', '', '51.513', '-0.1', 0, 1, 'uk'), +('EC4Y', '', '', '51.514', '-0.107', 0, 1, 'uk'), +('EH1', '', '', '55.952', '-3.188', 0, 1, 'uk'), +('EH10', '', '', '55.92', '-3.21', 0, 1, 'uk'), +('EH11', '', '', '55.934', '-3.249', 0, 1, 'uk'), +('EH12', '', '', '55.943', '-3.272', 0, 1, 'uk'), +('EH13', '', '', '55.908', '-3.241', 0, 1, 'uk'), +('EH14', '', '', '55.91', '-3.283', 0, 1, 'uk'), +('EH15', '', '', '55.946', '-3.111', 0, 1, 'uk'), +('EH16', '', '', '55.923', '-3.153', 0, 1, 'uk'), +('EH17', '', '', '55.907', '-3.142', 0, 1, 'uk'), +('EH18', '', '', '55.876', '-3.121', 0, 1, 'uk'), +('EH19', '', '', '55.873', '-3.104', 0, 1, 'uk'), +('EH2', '', '', '55.954', '-3.195', 0, 1, 'uk'), +('EH20', '', '', '55.879', '-3.155', 0, 1, 'uk'), +('EH21', '', '', '55.939', '-3.045', 0, 1, 'uk'), +('EH22', '', '', '55.884', '-3.06', 0, 1, 'uk'), +('EH23', '', '', '55.839', '-3.051', 0, 1, 'uk'), +('EH24', '', '', '55.851', '-3.133', 0, 1, 'uk'), +('EH25', '', '', '55.858', '-3.175', 0, 1, 'uk'), +('EH26', '', '', '55.833', '-3.224', 0, 1, 'uk'), +('EH27', '', '', '55.89', '-3.422', 0, 1, 'uk'), +('EH28', '', '', '55.931', '-3.387', 0, 1, 'uk'), +('EH29', '', '', '55.956', '-3.399', 0, 1, 'uk'), +('EH3', '', '', '55.954', '-3.2', 0, 1, 'uk'), +('EH30', '', '', '55.985', '-3.384', 0, 1, 'uk'), +('EH31', '', '', '56.037', '-2.827', 0, 1, 'uk'), +('EH32', '', '', '55.968', '-2.948', 0, 1, 'uk'), +('EH33', '', '', '55.942', '-2.944', 0, 1, 'uk'), +('EH34', '', '', '55.909', '-2.88', 0, 1, 'uk'), +('EH35', '', '', '55.911', '-2.942', 0, 1, 'uk'), +('EH36', '', '', '55.856', '-2.851', 0, 1, 'uk'), +('EH37', '', '', '55.862', '-2.96', 0, 1, 'uk'), +('EH38', '', '', '55.786', '-2.96', 0, 1, 'uk'), +('EH39', '', '', '56.047', '-2.731', 0, 1, 'uk'), +('EH4', '', '', '55.962', '-3.258', 0, 1, 'uk'), +('EH40', '', '', '55.99', '-2.655', 0, 1, 'uk'), +('EH41', '', '', '55.948', '-2.774', 0, 1, 'uk'), +('EH42', '', '', '55.994', '-2.525', 0, 1, 'uk'), +('EH43', '', '', '55.624', '-3.01', 0, 1, 'uk'), +('EH44', '', '', '55.62', '-3.065', 0, 1, 'uk'), +('EH45', '', '', '55.655', '-3.191', 0, 1, 'uk'), +('EH46', '', '', '55.737', '-3.35', 0, 1, 'uk'), +('EH47', '', '', '55.86', '-3.663', 0, 1, 'uk'), +('EH48', '', '', '55.901', '-3.664', 0, 1, 'uk'), +('EH49', '', '', '55.976', '-3.598', 0, 1, 'uk'), +('EH5', '', '', '55.975', '-3.216', 0, 1, 'uk'), +('EH51', '', '', '56.011', '-3.605', 0, 1, 'uk'), +('EH52', '', '', '55.938', '-3.483', 0, 1, 'uk'), +('EH53', '', '', '55.894', '-3.476', 0, 1, 'uk'), +('EH54', '', '', '55.892', '-3.523', 0, 1, 'uk'), +('EH55', '', '', '55.848', '-3.572', 0, 1, 'uk'), +('EH6', '', '', '55.971', '-3.174', 0, 1, 'uk'), +('EH7', '', '', '55.961', '-3.165', 0, 1, 'uk'), +('EH8', '', '', '55.949', '-3.163', 0, 1, 'uk'), +('EH9', '', '', '55.933', '-3.185', 0, 1, 'uk'), +('EN1', '', '', '51.653', '-0.066', 0, 1, 'uk'), +('EN10', '', '', '51.74', '-0.02', 0, 1, 'uk'), +('EN11', '', '', '51.765', '-0.007', 0, 1, 'uk'), +('EN2', '', '', '51.659', '-0.091', 0, 1, 'uk'), +('EN3', '', '', '51.659', '-0.038', 0, 1, 'uk'), +('EN4', '', '', '51.648', '-0.16', 0, 1, 'uk'), +('EN5', '', '', '51.649', '-0.195', 0, 1, 'uk'), +('EN52', '', '', '51.648861', '-0.201028', 0, 1, 'uk'), +('EN6', '', '', '51.699', '-0.176', 0, 1, 'uk'), +('EN7', '', '', '51.71', '-0.065', 0, 1, 'uk'), +('EN8', '', '', '51.698', '-0.032', 0, 1, 'uk'), +('EN9', '', '', '51.695', '0.014', 0, 1, 'uk'), +('EN91', '', '', '51.702791', '0.034057', 0, 1, 'uk'), +('EX1', '', '', '50.726', '-3.505', 0, 1, 'uk'), +('EX10', '', '', '50.693', '-3.245', 0, 1, 'uk'), +('EX11', '', '', '50.746', '-3.288', 0, 1, 'uk'), +('EX12', '', '', '50.706', '-3.081', 0, 1, 'uk'), +('EX13', '', '', '50.786', '-3.007', 0, 1, 'uk'), +('EX14', '', '', '50.813', '-3.189', 0, 1, 'uk'), +('EX15', '', '', '50.877', '-3.338', 0, 1, 'uk'), +('EX16', '', '', '50.923', '-3.491', 0, 1, 'uk'), +('EX17', '', '', '50.812', '-3.702', 0, 1, 'uk'), +('EX18', '', '', '50.901', '-3.887', 0, 1, 'uk'), +('EX19', '', '', '50.877', '-4.004', 0, 1, 'uk'), +('EX2', '', '', '50.71', '-3.517', 0, 1, 'uk'), +('EX20', '', '', '50.75', '-4.019', 0, 1, 'uk'), +('EX21', '', '', '50.805', '-4.208', 0, 1, 'uk'), +('EX22', '', '', '50.828', '-4.367', 0, 1, 'uk'), +('EX23', '', '', '50.824', '-4.533', 0, 1, 'uk'), +('EX24', '', '', '50.739', '-3.088', 0, 1, 'uk'), +('EX29', '', '', '50.704703', '-3.792061', 0, 1, 'uk'), +('EX3', '', '', '50.686', '-3.458', 0, 1, 'uk'), +('EX31', '', '', '51.086', '-4.064', 0, 1, 'uk'), +('EX32', '', '', '51.071', '-4.018', 0, 1, 'uk'), +('EX33', '', '', '51.114', '-4.169', 0, 1, 'uk'), +('EX34', '', '', '51.199', '-4.103', 0, 1, 'uk'), +('EX35', '', '', '51.224', '-3.828', 0, 1, 'uk'), +('EX36', '', '', '51.016', '-3.792', 0, 1, 'uk'), +('EX37', '', '', '50.979', '-3.951', 0, 1, 'uk'), +('EX38', '', '', '50.943', '-4.151', 0, 1, 'uk'), +('EX39', '', '', '51.014', '-4.246', 0, 1, 'uk'), +('EX4', '', '', '50.73', '-3.526', 0, 1, 'uk'), +('EX5', '', '', '50.757', '-3.439', 0, 1, 'uk'), +('EX6', '', '', '50.677', '-3.597', 0, 1, 'uk'), +('EX7', '', '', '50.592', '-3.473', 0, 1, 'uk'), +('EX8', '', '', '50.629', '-3.401', 0, 1, 'uk'), +('EX9', '', '', '50.639', '-3.323', 0, 1, 'uk'), +('FK1', '', '', '55.985', '-3.793', 0, 1, 'uk'), +('FK10', '', '', '56.115', '-3.781', 0, 1, 'uk'), +('FK11', '', '', '56.15', '-3.85', 0, 1, 'uk'), +('FK12', '', '', '56.152', '-3.8', 0, 1, 'uk'), +('FK13', '', '', '56.151', '-3.74', 0, 1, 'uk'), +('FK14', '', '', '56.166', '-3.66', 0, 1, 'uk'), +('FK15', '', '', '56.203', '-3.949', 0, 1, 'uk'), +('FK16', '', '', '56.191', '-4.059', 0, 1, 'uk'), +('FK17', '', '', '56.24', '-4.219', 0, 1, 'uk'), +('FK18', '', '', '56.325', '-4.328', 0, 1, 'uk'), +('FK19', '', '', '56.371', '-4.313', 0, 1, 'uk'), +('FK2', '', '', '56.005', '-3.754', 0, 1, 'uk'), +('FK20', '', '', '56.406', '-4.63', 0, 1, 'uk'), +('FK21', '', '', '56.466', '-4.319', 0, 1, 'uk'), +('FK3', '', '', '56.011', '-3.719', 0, 1, 'uk'), +('FK4', '', '', '55.997', '-3.906', 0, 1, 'uk'), +('FK5', '', '', '56.025', '-3.818', 0, 1, 'uk'), +('FK6', '', '', '56.022', '-3.915', 0, 1, 'uk'), +('FK7', '', '', '56.097', '-3.917', 0, 1, 'uk'), +('FK8', '', '', '56.131', '-4.051', 0, 1, 'uk'), +('FK9', '', '', '56.142', '-3.94', 0, 1, 'uk'), +('FY1', '', '', '53.815', '-3.046', 0, 1, 'uk'), +('FY2', '', '', '53.845', '-3.039', 0, 1, 'uk'), +('FY3', '', '', '53.821', '-3.021', 0, 1, 'uk'), +('FY4', '', '', '53.791', '-3.028', 0, 1, 'uk'), +('FY5', '', '', '53.874', '-3.021', 0, 1, 'uk'), +('FY6', '', '', '53.868', '-2.981', 0, 1, 'uk'), +('FY7', '', '', '53.916', '-3.026', 0, 1, 'uk'), +('FY8', '', '', '53.751', '-3.002', 0, 1, 'uk'), +('G1', '', '', '55.86', '-4.247', 0, 1, 'uk'), +('G11', '', '', '55.874', '-4.312', 0, 1, 'uk'), +('G12', '', '', '55.88', '-4.3', 0, 1, 'uk'), +('G13', '', '', '55.894', '-4.347', 0, 1, 'uk'), +('G14', '', '', '55.881', '-4.349', 0, 1, 'uk'), +('G15', '', '', '55.91', '-4.365', 0, 1, 'uk'), +('G2', '', '', '55.864', '-4.255', 0, 1, 'uk'), +('G20', '', '', '55.886', '-4.282', 0, 1, 'uk'), +('G21', '', '', '55.881', '-4.22', 0, 1, 'uk'), +('G22', '', '', '55.89', '-4.251', 0, 1, 'uk'), +('G23', '', '', '55.902', '-4.284', 0, 1, 'uk'), +('G3', '', '', '55.866', '-4.272', 0, 1, 'uk'), +('G31', '', '', '55.857', '-4.208', 0, 1, 'uk'), +('G32', '', '', '55.849', '-4.163', 0, 1, 'uk'), +('G33', '', '', '55.873', '-4.165', 0, 1, 'uk'), +('G34', '', '', '55.868', '-4.111', 0, 1, 'uk'), +('G4', '', '', '55.868', '-4.252', 0, 1, 'uk'), +('G40', '', '', '55.848', '-4.222', 0, 1, 'uk'), +('G41', '', '', '55.838', '-4.282', 0, 1, 'uk'), +('G42', '', '', '55.833', '-4.256', 0, 1, 'uk'), +('G43', '', '', '55.818', '-4.29', 0, 1, 'uk'), +('G44', '', '', '55.814', '-4.255', 0, 1, 'uk'), +('G45', '', '', '55.805', '-4.231', 0, 1, 'uk'), +('G46', '', '', '55.804', '-4.307', 0, 1, 'uk'), +('G5', '', '', '55.848', '-4.252', 0, 1, 'uk'), +('G51', '', '', '55.858', '-4.314', 0, 1, 'uk'), +('G52', '', '', '55.848', '-4.348', 0, 1, 'uk'), +('G53', '', '', '55.822', '-4.351', 0, 1, 'uk'), +('G60', '', '', '55.922', '-4.453', 0, 1, 'uk'), +('G61', '', '', '55.919', '-4.33', 0, 1, 'uk'), +('G62', '', '', '55.943', '-4.32', 0, 1, 'uk'), +('G63', '', '', '56.042', '-4.364', 0, 1, 'uk'), +('G64', '', '', '55.911', '-4.217', 0, 1, 'uk'), +('G65', '', '', '55.973', '-4.057', 0, 1, 'uk'), +('G66', '', '', '55.941', '-4.153', 0, 1, 'uk'), +('G67', '', '', '55.947', '-3.985', 0, 1, 'uk'), +('G68', '', '', '55.953', '-4.01', 0, 1, 'uk'), +('G69', '', '', '55.874', '-4.102', 0, 1, 'uk'), +('G71', '', '', '55.822', '-4.073', 0, 1, 'uk'), +('G72', '', '', '55.804', '-4.128', 0, 1, 'uk'), +('G73', '', '', '55.82', '-4.206', 0, 1, 'uk'), +('G74', '', '', '55.769', '-4.173', 0, 1, 'uk'), +('G75', '', '', '55.771341', '-4.155749', 0, 1, 'uk'), +('G76', '', '', '55.778', '-4.272', 0, 1, 'uk'), +('G77', '', '', '55.774', '-4.33', 0, 1, 'uk'), +('G78', '', '', '55.793', '-4.409', 0, 1, 'uk'), +('G81', '', '', '55.913', '-4.406', 0, 1, 'uk'), +('G82', '', '', '55.952', '-4.574', 0, 1, 'uk'), +('G83', '', '', '56.012', '-4.585', 0, 1, 'uk'), +('G84', '', '', '56.014', '-4.754', 0, 1, 'uk'), +('GL1', '', '', '51.86', '-2.239', 0, 1, 'uk'), +('GL10', '', '', '51.743', '-2.284', 0, 1, 'uk'), +('GL11', '', '', '51.689', '-2.356', 0, 1, 'uk'), +('GL12', '', '', '51.625', '-2.385', 0, 1, 'uk'), +('GL13', '', '', '51.693', '-2.459', 0, 1, 'uk'), +('GL14', '', '', '51.817', '-2.479', 0, 1, 'uk'), +('GL15', '', '', '51.736', '-2.551', 0, 1, 'uk'), +('GL16', '', '', '51.795', '-2.611', 0, 1, 'uk'), +('GL17', '', '', '51.856', '-2.514', 0, 1, 'uk'), +('GL18', '', '', '51.941', '-2.414', 0, 1, 'uk'), +('GL19', '', '', '51.943', '-2.286', 0, 1, 'uk'), +('GL2', '', '', '51.846', '-2.267', 0, 1, 'uk'), +('GL20', '', '', '52.003', '-2.13', 0, 1, 'uk'), +('GL29', '', '', '52.091444', '-2.351365', 0, 1, 'uk'), +('GL3', '', '', '51.865', '-2.177', 0, 1, 'uk'), +('GL4', '', '', '51.842', '-2.216', 0, 1, 'uk'), +('GL5', '', '', '51.738', '-2.219', 0, 1, 'uk'), +('GL50', '', '', '51.9', '-2.08', 0, 1, 'uk'), +('GL51', '', '', '51.899', '-2.107', 0, 1, 'uk'), +('GL52', '', '', '51.916', '-2.058', 0, 1, 'uk'), +('GL53', '', '', '51.881', '-2.067', 0, 1, 'uk'), +('GL54', '', '', '51.897', '-1.864', 0, 1, 'uk'), +('GL55', '', '', '52.061', '-1.768', 0, 1, 'uk'), +('GL56', '', '', '51.988', '-1.704', 0, 1, 'uk'), +('GL6', '', '', '51.735', '-2.192', 0, 1, 'uk'), +('GL7', '', '', '51.713', '-1.897', 0, 1, 'uk'), +('GL8', '', '', '51.642', '-2.171', 0, 1, 'uk'), +('GL9', '', '', '51.557', '-2.298', 0, 1, 'uk'), +('GU1', '', '', '51.243', '-0.564', 0, 1, 'uk'), +('GU10', '', '', '51.197', '-0.796', 0, 1, 'uk'), +('GU11', '', '', '51.248', '-0.761', 0, 1, 'uk'), +('GU12', '', '', '51.251', '-0.731', 0, 1, 'uk'), +('GU13', '', '', '51.274', '-0.837', 0, 1, 'uk'), +('GU14', '', '', '51.293', '-0.761', 0, 1, 'uk'), +('GU15', '', '', '51.334', '-0.739', 0, 1, 'uk'), +('GU16', '', '', '51.311', '-0.729', 0, 1, 'uk'), +('GU17', '', '', '51.329', '-0.785', 0, 1, 'uk'), +('GU18', '', '', '51.349', '-0.67', 0, 1, 'uk'), +('GU19', '', '', '51.36', '-0.69', 0, 1, 'uk'), +('GU2', '', '', '51.245', '-0.592', 0, 1, 'uk'), +('GU20', '', '', '51.368', '-0.656', 0, 1, 'uk'), +('GU21', '', '', '51.32', '-0.577', 0, 1, 'uk'), +('GU22', '', '', '51.312', '-0.55', 0, 1, 'uk'), +('GU23', '', '', '51.297', '-0.508', 0, 1, 'uk'), +('GU24', '', '', '51.329', '-0.626', 0, 1, 'uk'), +('GU25', '', '', '51.401', '-0.57', 0, 1, 'uk'), +('GU26', '', '', '51.112', '-0.746', 0, 1, 'uk'), +('GU27', '', '', '51.082', '-0.718', 0, 1, 'uk'), +('GU28', '', '', '50.99', '-0.63', 0, 1, 'uk'), +('GU29', '', '', '50.984', '-0.746', 0, 1, 'uk'), +('GU3', '', '', '51.246', '-0.624', 0, 1, 'uk'), +('GU30', '', '', '51.074', '-0.803', 0, 1, 'uk'), +('GU31', '', '', '50.996', '-0.902', 0, 1, 'uk'), +('GU32', '', '', '51.008', '-0.97', 0, 1, 'uk'), +('GU33', '', '', '51.049', '-0.891', 0, 1, 'uk'), +('GU34', '', '', '51.139', '-0.983', 0, 1, 'uk'), +('GU35', '', '', '51.116', '-0.846', 0, 1, 'uk'), +('GU4', '', '', '51.243', '-0.541', 0, 1, 'uk'), +('GU46', '', '', '51.337', '-0.825', 0, 1, 'uk'), +('GU47', '', '', '51.348', '-0.788', 0, 1, 'uk'), +('GU5', '', '', '51.203', '-0.515', 0, 1, 'uk'), +('GU51', '', '', '51.283', '-0.84', 0, 1, 'uk'), +('GU52', '', '', '51.264', '-0.838', 0, 1, 'uk'), +('GU6', '', '', '51.141', '-0.482', 0, 1, 'uk'), +('GU7', '', '', '51.189', '-0.61', 0, 1, 'uk'), +('GU8', '', '', '51.151', '-0.64', 0, 1, 'uk'), +('GU9', '', '', '51.218', '-0.793', 0, 1, 'uk'), +('GY1', '', '', '49.459269', '-2.538099', 0, 1, 'uk'), +('H10', '', '', '51.112343', '-0.187082', 0, 1, 'uk'), +('HA0', '', '', '51.55', '-0.304', 0, 1, 'uk'), +('HA1', '', '', '51.58', '-0.336', 0, 1, 'uk'), +('HA2', '', '', '51.574', '-0.357', 0, 1, 'uk'), +('HA3', '', '', '51.592', '-0.32', 0, 1, 'uk'), +('HA4', '', '', '51.57', '-0.409', 0, 1, 'uk'), +('HA5', '', '', '51.594', '-0.385', 0, 1, 'uk'), +('HA6', '', '', '51.61', '-0.42', 0, 1, 'uk'), +('HA7', '', '', '51.61', '-0.307', 0, 1, 'uk'), +('HA8', '', '', '51.611', '-0.272', 0, 1, 'uk'), +('HA9', '', '', '51.559', '-0.287', 0, 1, 'uk'), +('HD1', '', '', '53.647', '-1.788', 0, 1, 'uk'), +('HD2', '', '', '53.668', '-1.775', 0, 1, 'uk'), +('HD3', '', '', '53.653', '-1.828', 0, 1, 'uk'), +('HD4', '', '', '53.626', '-1.796', 0, 1, 'uk'), +('HD5', '', '', '53.647', '-1.746', 0, 1, 'uk'), +('HD6', '', '', '53.702', '-1.782', 0, 1, 'uk'), +('HD7', '', '', '53.624', '-1.877', 0, 1, 'uk'), +('HD8', '', '', '53.601', '-1.679', 0, 1, 'uk'), +('HD80', '', '', '53.633649', '-1.722611', 0, 1, 'uk'), +('HD9', '', '', '53.58', '-1.795', 0, 1, 'uk'), +('HG1', '', '', '54', '-1.533', 0, 1, 'uk'), +('HG2', '', '', '53.987', '-1.526', 0, 1, 'uk'), +('HG3', '', '', '54.031', '-1.616', 0, 1, 'uk'), +('HG4', '', '', '54.156', '-1.566', 0, 1, 'uk'), +('HG41', '', '', '54.141875', '-1.521458', 0, 1, 'uk'), +('HG5', '', '', '54.013', '-1.457', 0, 1, 'uk'), +('HP1', '', '', '51.755', '-0.488', 0, 1, 'uk'), +('HP10', '', '', '51.609', '-0.702', 0, 1, 'uk'), +('HP11', '', '', '51.624', '-0.744', 0, 1, 'uk'), +('HP12', '', '', '51.625', '-0.778', 0, 1, 'uk'), +('HP13', '', '', '51.633', '-0.741', 0, 1, 'uk'), +('HP14', '', '', '51.649', '-0.828', 0, 1, 'uk'), +('HP15', '', '', '51.656', '-0.712', 0, 1, 'uk'), +('HP16', '', '', '51.702', '-0.717', 0, 1, 'uk'), +('HP17', '', '', '51.776', '-0.87', 0, 1, 'uk'), +('HP18', '', '', '51.814', '-0.982', 0, 1, 'uk'), +('HP19', '', '', '51.822', '-0.825', 0, 1, 'uk'), +('HP2', '', '', '51.762', '-0.452', 0, 1, 'uk'), +('HP20', '', '', '51.819', '-0.803', 0, 1, 'uk'), +('HP21', '', '', '51.806', '-0.805', 0, 1, 'uk'), +('HP22', '', '', '51.806', '-0.766', 0, 1, 'uk'), +('HP23', '', '', '51.795', '-0.66', 0, 1, 'uk'), +('HP27', '', '', '51.719', '-0.83', 0, 1, 'uk'), +('HP3', '', '', '51.737', '-0.47', 0, 1, 'uk'), +('HP4', '', '', '51.767', '-0.567', 0, 1, 'uk'), +('HP5', '', '', '51.712', '-0.608', 0, 1, 'uk'), +('HP6', '', '', '51.678', '-0.598', 0, 1, 'uk'), +('HP7', '', '', '51.665', '-0.608', 0, 1, 'uk'), +('HP8', '', '', '51.642', '-0.573', 0, 1, 'uk'), +('HP9', '', '', '51.61', '-0.639', 0, 1, 'uk'), +('HR1', '', '', '52.064', '-2.669', 0, 1, 'uk'), +('HR2', '', '', '52.01', '-2.783', 0, 1, 'uk'), +('HR3', '', '', '52.094', '-3.075', 0, 1, 'uk'), +('HR4', '', '', '52.088', '-2.766', 0, 1, 'uk'), +('HR5', '', '', '52.192', '-3.027', 0, 1, 'uk'), +('HR6', '', '', '52.233', '-2.771', 0, 1, 'uk'), +('HR7', '', '', '52.186', '-2.521', 0, 1, 'uk'), +('HR8', '', '', '52.044', '-2.444', 0, 1, 'uk'), +('HR9', '', '', '51.908', '-2.582', 0, 1, 'uk'), +('HS1', '', '', '58.213', '-6.381', 0, 1, 'uk'), +('HS2', '', '', '58.249', '-6.468', 0, 1, 'uk'), +('HS3', '', '', '57.879', '-6.853', 0, 1, 'uk'), +('HS4', '', '', '57.87', '-6.69', 0, 1, 'uk'), +('HS5', '', '', '57.8', '-6.961', 0, 1, 'uk'), +('HS6', '', '', '57.601', '-7.299', 0, 1, 'uk'), +('HS7', '', '', '57.447', '-7.34', 0, 1, 'uk'), +('HS8', '', '', '57.233', '-7.346', 0, 1, 'uk'), +('HS9', '', '', '56.972', '-7.472', 0, 1, 'uk'), +('HU1', '', '', '53.743', '-0.335', 0, 1, 'uk'), +('HU10', '', '', '53.752', '-0.441', 0, 1, 'uk'), +('HU11', '', '', '53.826', '-0.22', 0, 1, 'uk'), +('HU12', '', '', '53.724', '-0.13', 0, 1, 'uk'), +('HU13', '', '', '53.725', '-0.435', 0, 1, 'uk'), +('HU14', '', '', '53.728', '-0.5', 0, 1, 'uk'), +('HU15', '', '', '53.749', '-0.622', 0, 1, 'uk'), +('HU16', '', '', '53.781', '-0.419', 0, 1, 'uk'), +('HU17', '', '', '53.847', '-0.427', 0, 1, 'uk'), +('HU18', '', '', '53.909', '-0.167', 0, 1, 'uk'), +('HU19', '', '', '53.723', '0.036', 0, 1, 'uk'), +('HU2', '', '', '53.75', '-0.338', 0, 1, 'uk'), +('HU20', '', '', '53.788', '-0.513', 0, 1, 'uk'), +('HU3', '', '', '53.742', '-0.365', 0, 1, 'uk'), +('HU4', '', '', '53.736', '-0.4', 0, 1, 'uk'), +('HU5', '', '', '53.76', '-0.375', 0, 1, 'uk'), +('HU6', '', '', '53.781', '-0.369', 0, 1, 'uk'), +('HU7', '', '', '53.789', '-0.325', 0, 1, 'uk'), +('HU8', '', '', '53.769', '-0.299', 0, 1, 'uk'), +('HU9', '', '', '53.756', '-0.286', 0, 1, 'uk'), +('HW8', '', '', '51.607185', '-0.276155', 0, 1, 'uk'), +('HX1', '', '', '53.721', '-1.87', 0, 1, 'uk'), +('HX2', '', '', '53.738', '-1.904', 0, 1, 'uk'), +('HX3', '', '', '53.726', '-1.844', 0, 1, 'uk'), +('HX4', '', '', '53.679', '-1.88', 0, 1, 'uk'), +('HX5', '', '', '53.686', '-1.835', 0, 1, 'uk'), +('HX6', '', '', '53.698', '-1.924', 0, 1, 'uk'), +('HX7', '', '', '53.739', '-2.007', 0, 1, 'uk'), +('IG1', '', '', '51.559', '0.075', 0, 1, 'uk'), +('IG10', '', '', '51.648', '0.066', 0, 1, 'uk'), +('IG11', '', '', '51.535', '0.094', 0, 1, 'uk'), +('IG2', '', '', '51.574', '0.082', 0, 1, 'uk'), +('IG3', '', '', '51.562', '0.101', 0, 1, 'uk'), +('IG4', '', '', '51.577', '0.055', 0, 1, 'uk'), +('IG5', '', '', '51.588', '0.066', 0, 1, 'uk'), +('IG6', '', '', '51.593', '0.089', 0, 1, 'uk'), +('IG7', '', '', '51.613', '0.089', 0, 1, 'uk'), +('IG8', '', '', '51.607', '0.034', 0, 1, 'uk'), +('IG9', '', '', '51.623', '0.04', 0, 1, 'uk'), +('IM1', '', '', '54.149847', '-4.48465', 0, 1, 'uk'), +('IM2', '', '', '54.150778', '-4.506451', 0, 1, 'uk'), +('IM3', '', '', '54.170601', '-4.455229', 0, 1, 'uk'), +('IM4', '', '', '54.136934', '-4.547301', 0, 1, 'uk'), +('IM5', '', '', '54.223595', '-4.696299', 0, 1, 'uk'), +('IM6', '', '', '54.279755', '-4.588495', 0, 1, 'uk'), +('IM7', '', '', '54.283903', '-4.350988', 0, 1, 'uk'), +('IM8', '', '', '54.324059', '-4.382609', 0, 1, 'uk'), +('IM9', '', '', '54.074537', '-4.643028', 0, 1, 'uk'), +('IO6', '', '', '52.11206', '1.116439', 0, 1, 'uk'), +('IP1', '', '', '52.067', '1.142', 0, 1, 'uk'), +('IP10', '', '', '52.019', '1.27', 0, 1, 'uk'), +('IP11', '', '', '51.97', '1.334', 0, 1, 'uk'), +('IP12', '', '', '52.092', '1.373', 0, 1, 'uk'), +('IP13', '', '', '52.185', '1.321', 0, 1, 'uk'), +('IP14', '', '', '52.206', '1.035', 0, 1, 'uk'), +('IP15', '', '', '52.157', '1.597', 0, 1, 'uk'), +('IP16', '', '', '52.204', '1.586', 0, 1, 'uk'), +('IP17', '', '', '52.23', '1.503', 0, 1, 'uk'), +('IP18', '', '', '52.33', '1.673', 0, 1, 'uk'), +('IP19', '', '', '52.34', '1.495', 0, 1, 'uk'), +('IP2', '', '', '52.045', '1.136', 0, 1, 'uk'), +('IP20', '', '', '52.406', '1.321', 0, 1, 'uk'), +('IP21', '', '', '52.364', '1.236', 0, 1, 'uk'), +('IP22', '', '', '52.376', '1.053', 0, 1, 'uk'), +('IP23', '', '', '52.307', '1.125', 0, 1, 'uk'), +('IP24', '', '', '52.419', '0.759', 0, 1, 'uk'), +('IP25', '', '', '52.586', '0.84', 0, 1, 'uk'), +('IP26', '', '', '52.508', '0.577', 0, 1, 'uk'), +('IP27', '', '', '52.43', '0.586', 0, 1, 'uk'), +('IP28', '', '', '52.326', '0.549', 0, 1, 'uk'), +('IP29', '', '', '52.193', '0.663', 0, 1, 'uk'), +('IP3', '', '', '52.041', '1.188', 0, 1, 'uk'), +('IP30', '', '', '52.209', '0.837', 0, 1, 'uk'), +('IP31', '', '', '52.291', '0.828', 0, 1, 'uk'), +('IP32', '', '', '52.254', '0.717', 0, 1, 'uk'), +('IP33', '', '', '52.242', '0.708', 0, 1, 'uk'), +('IP4', '', '', '52.06', '1.181', 0, 1, 'uk'), +('IP5', '', '', '52.061', '1.242', 0, 1, 'uk'), +('IP6', '', '', '52.131', '1.116', 0, 1, 'uk'), +('IP7', '', '', '52.068', '0.95', 0, 1, 'uk'), +('IP8', '', '', '52.062', '1.083', 0, 1, 'uk'), +('IP9', '', '', '51.99', '1.149', 0, 1, 'uk'), +('IV1', '', '', '57.487', '-4.231', 0, 1, 'uk'), +('IV10', '', '', '57.585', '-4.126', 0, 1, 'uk'), +('IV11', '', '', '57.677', '-4.038', 0, 1, 'uk'), +('IV12', '', '', '57.574', '-3.864', 0, 1, 'uk'), +('IV13', '', '', '57.343', '-4.013', 0, 1, 'uk'), +('IV14', '', '', '57.586', '-4.547', 0, 1, 'uk'), +('IV15', '', '', '57.599', '-4.43', 0, 1, 'uk'), +('IV16', '', '', '57.665', '-4.337', 0, 1, 'uk'), +('IV17', '', '', '57.7', '-4.26', 0, 1, 'uk'), +('IV18', '', '', '57.702', '-4.155', 0, 1, 'uk'), +('IV19', '', '', '57.805', '-4.061', 0, 1, 'uk'), +('IV2', '', '', '57.468', '-4.19', 0, 1, 'uk'), +('IV20', '', '', '57.786', '-3.907', 0, 1, 'uk'), +('IV21', '', '', '57.724', '-5.72', 0, 1, 'uk'), +('IV22', '', '', '57.742', '-5.506', 0, 1, 'uk'), +('IV23', '', '', '57.773', '-5.01', 0, 1, 'uk'), +('IV24', '', '', '57.891', '-4.355', 0, 1, 'uk'), +('IV25', '', '', '57.891', '-4.042', 0, 1, 'uk'), +('IV26', '', '', '57.916', '-5.173', 0, 1, 'uk'), +('IV27', '', '', '58.277', '-4.8', 0, 1, 'uk'), +('IV28', '', '', '58.015', '-4.157', 0, 1, 'uk'), +('IV3', '', '', '57.477', '-4.245', 0, 1, 'uk'), +('IV30', '', '', '57.654', '-3.327', 0, 1, 'uk'), +('IV31', '', '', '57.717', '-3.289', 0, 1, 'uk'), +('IV32', '', '', '57.632', '-3.11', 0, 1, 'uk'), +('IV33', '', '', '57.528877', '-3.209202', 0, 1, 'uk'), +('IV35', '', '', '57.458131', '-3.346743', 0, 1, 'uk'), +('IV36', '', '', '57.611', '-3.604', 0, 1, 'uk'), +('IV4', '', '', '57.448', '-4.533', 0, 1, 'uk'), +('IV40', '', '', '57.275', '-5.65', 0, 1, 'uk'), +('IV41', '', '', '57.274', '-5.735', 0, 1, 'uk'), +('IV42', '', '', '57.239', '-5.829', 0, 1, 'uk'), +('IV43', '', '', '57.156', '-5.81', 0, 1, 'uk'), +('IV44', '', '', '57.115', '-5.874', 0, 1, 'uk'), +('IV45', '', '', '57.067', '-5.906', 0, 1, 'uk'), +('IV46', '', '', '57.114', '-5.984', 0, 1, 'uk'), +('IV47', '', '', '57.294', '-6.344', 0, 1, 'uk'), +('IV48', '', '', '57.311', '-6.098', 0, 1, 'uk'), +('IV49', '', '', '57.228', '-5.946', 0, 1, 'uk'), +('IV5', '', '', '57.468', '-4.411', 0, 1, 'uk'), +('IV51', '', '', '57.481', '-6.246', 0, 1, 'uk'), +('IV52', '', '', '57.337', '-5.651', 0, 1, 'uk'), +('IV53', '', '', '57.344', '-5.554', 0, 1, 'uk'), +('IV54', '', '', '57.431', '-5.616', 0, 1, 'uk'), +('IV55', '', '', '57.459', '-6.611', 0, 1, 'uk'), +('IV56', '', '', '57.366', '-6.429', 0, 1, 'uk'), +('IV6', '', '', '57.526', '-4.458', 0, 1, 'uk'), +('IV63', '', '', '57.323', '-4.505', 0, 1, 'uk'), +('IV7', '', '', '57.584', '-4.384', 0, 1, 'uk'), +('IV8', '', '', '57.554', '-4.265', 0, 1, 'uk'), +('IV9', '', '', '57.569', '-4.177', 0, 1, 'uk'), +('JE2', '', '', '49.201412', '-2.115852', 0, 1, 'uk'), +('JE3', '', '', '49.187959', '-2.170604', 0, 1, 'uk'), +('KA1', '', '', '55.596', '-4.496', 0, 1, 'uk'), +('KA10', '', '', '55.549', '-4.648', 0, 1, 'uk'), +('KA11', '', '', '55.618', '-4.626', 0, 1, 'uk'), +('KA12', '', '', '55.619', '-4.664', 0, 1, 'uk'), +('KA13', '', '', '55.655', '-4.699', 0, 1, 'uk'), +('KA14', '', '', '55.74', '-4.671', 0, 1, 'uk'), +('KA15', '', '', '55.748', '-4.625', 0, 1, 'uk'), +('KA16', '', '', '55.607', '-4.33', 0, 1, 'uk'), +('KA17', '', '', '55.611', '-4.282', 0, 1, 'uk'), +('KA18', '', '', '55.451', '-4.239', 0, 1, 'uk'), +('KA19', '', '', '55.346', '-4.667', 0, 1, 'uk'), +('KA2', '', '', '55.596', '-4.563', 0, 1, 'uk'), +('KA20', '', '', '55.641', '-4.751', 0, 1, 'uk'), +('KA21', '', '', '55.641', '-4.783', 0, 1, 'uk'), +('KA22', '', '', '55.65', '-4.807', 0, 1, 'uk'), +('KA23', '', '', '55.691', '-4.855', 0, 1, 'uk'), +('KA24', '', '', '55.71', '-4.715', 0, 1, 'uk'), +('KA25', '', '', '55.753', '-4.688', 0, 1, 'uk'), +('KA26', '', '', '55.219', '-4.834', 0, 1, 'uk'), +('KA27', '', '', '55.539', '-5.172', 0, 1, 'uk'), +('KA28', '', '', '55.755', '-4.924', 0, 1, 'uk'), +('KA29', '', '', '55.757', '-4.853', 0, 1, 'uk'), +('KA3', '', '', '55.644', '-4.495', 0, 1, 'uk'), +('KA30', '', '', '55.797', '-4.862', 0, 1, 'uk'), +('KA4', '', '', '55.599', '-4.382', 0, 1, 'uk'), +('KA5', '', '', '55.51', '-4.386', 0, 1, 'uk'), +('KA6', '', '', '55.415', '-4.505', 0, 1, 'uk'), +('KA7', '', '', '55.448', '-4.628', 0, 1, 'uk'), +('KA8', '', '', '55.472', '-4.612', 0, 1, 'uk'), +('KA9', '', '', '55.497', '-4.604', 0, 1, 'uk'), +('KT1', '', '', '51.407', '-0.297', 0, 1, 'uk'), +('KT10', '', '', '51.368', '-0.354', 0, 1, 'uk'), +('KT11', '', '', '51.328', '-0.402', 0, 1, 'uk'), +('KT12', '', '', '51.377', '-0.407', 0, 1, 'uk'), +('KT13', '', '', '51.368', '-0.449', 0, 1, 'uk'), +('KT14', '', '', '51.339', '-0.486', 0, 1, 'uk'), +('KT15', '', '', '51.363', '-0.494', 0, 1, 'uk'), +('KT16', '', '', '51.383', '-0.514', 0, 1, 'uk'), +('KT17', '', '', '51.341', '-0.248', 0, 1, 'uk'), +('KT18', '', '', '51.317', '-0.262', 0, 1, 'uk'), +('KT19', '', '', '51.351', '-0.267', 0, 1, 'uk'), +('KT2', '', '', '51.416', '-0.289', 0, 1, 'uk'), +('KT20', '', '', '51.286', '-0.23', 0, 1, 'uk'), +('KT21', '', '', '51.311', '-0.301', 0, 1, 'uk'), +('KT22', '', '', '51.301', '-0.337', 0, 1, 'uk'), +('KT23', '', '', '51.281', '-0.37', 0, 1, 'uk'), +('KT24', '', '', '51.269', '-0.429', 0, 1, 'uk'), +('KT3', '', '', '51.399', '-0.256', 0, 1, 'uk'), +('KT4', '', '', '51.378', '-0.242', 0, 1, 'uk'), +('KT5', '', '', '51.392', '-0.286', 0, 1, 'uk'), +('KT6', '', '', '51.389', '-0.299', 0, 1, 'uk'), +('KT7', '', '', '51.389', '-0.328', 0, 1, 'uk'), +('KT8', '', '', '51.401', '-0.363', 0, 1, 'uk'), +('KT9', '', '', '51.364', '-0.301', 0, 1, 'uk'), +('KW1', '', '', '58.458', '-3.121', 0, 1, 'uk'), +('KW10', '', '', '57.975', '-3.975', 0, 1, 'uk'), +('KW11', '', '', '58.305', '-4.13', 0, 1, 'uk'), +('KW12', '', '', '58.506', '-3.491', 0, 1, 'uk'), +('KW13', '', '', '58.455', '-3.895', 0, 1, 'uk'), +('KW14', '', '', '58.589', '-3.556', 0, 1, 'uk'), +('KW15', '', '', '58.981', '-2.959', 0, 1, 'uk'), +('KW16', '', '', '58.96', '-3.274', 0, 1, 'uk'), +('KW17', '', '', '59.042', '-3.003', 0, 1, 'uk'), +('KW2', '', '', '58.349', '-3.163', 0, 1, 'uk'), +('KW3', '', '', '58.308', '-3.279', 0, 1, 'uk'), +('KW5', '', '', '58.287', '-3.382', 0, 1, 'uk'), +('KW6', '', '', '58.249', '-3.442', 0, 1, 'uk'), +('KW7', '', '', '58.187', '-3.5', 0, 1, 'uk'), +('KW8', '', '', '58.116', '-3.664', 0, 1, 'uk'), +('KW9', '', '', '58.014', '-3.858', 0, 1, 'uk'), +('KY1', '', '', '56.128', '-3.137', 0, 1, 'uk'), +('KY10', '', '', '56.231', '-2.7', 0, 1, 'uk'), +('KY11', '', '', '56.047', '-3.415', 0, 1, 'uk'), +('KY12', '', '', '56.077', '-3.492', 0, 1, 'uk'), +('KY13', '', '', '56.208', '-3.432', 0, 1, 'uk'), +('KY14', '', '', '56.31', '-3.239', 0, 1, 'uk'), +('KY15', '', '', '56.3', '-3.051', 0, 1, 'uk'), +('KY16', '', '', '56.342', '-2.819', 0, 1, 'uk'), +('KY2', '', '', '56.123', '-3.182', 0, 1, 'uk'), +('KY3', '', '', '56.064', '-3.23', 0, 1, 'uk'), +('KY4', '', '', '56.115', '-3.361', 0, 1, 'uk'), +('KY5', '', '', '56.145', '-3.294', 0, 1, 'uk'), +('KY6', '', '', '56.197', '-3.197', 0, 1, 'uk'), +('KY7', '', '', '56.197', '-3.154', 0, 1, 'uk'), +('KY8', '', '', '56.197', '-3.011', 0, 1, 'uk'), +('KY9', '', '', '56.21', '-2.833', 0, 1, 'uk'), +('L1', '', '', '53.402', '-2.979', 0, 1, 'uk'), +('L10', '', '', '53.474', '-2.926', 0, 1, 'uk'), +('L11', '', '', '53.448', '-2.914', 0, 1, 'uk'), +('L12', '', '', '53.435', '-2.895', 0, 1, 'uk'), +('L13', '', '', '53.417', '-2.919', 0, 1, 'uk'), +('L14', '', '', '53.418', '-2.879', 0, 1, 'uk'), +('L15', '', '', '53.397', '-2.919', 0, 1, 'uk'), +('L16', '', '', '53.398', '-2.887', 0, 1, 'uk'), +('L17', '', '', '53.378', '-2.94', 0, 1, 'uk'), +('L18', '', '', '53.38', '-2.907', 0, 1, 'uk'), +('L19', '', '', '53.359', '-2.902', 0, 1, 'uk'), +('L2', '', '', '53.407', '-2.989', 0, 1, 'uk'), +('L20', '', '', '53.452', '-2.988', 0, 1, 'uk'), +('L21', '', '', '53.471', '-2.999', 0, 1, 'uk'), +('L22', '', '', '53.477', '-3.026', 0, 1, 'uk'), +('L23', '', '', '53.491', '-3.022', 0, 1, 'uk'), +('L24', '', '', '53.343', '-2.836', 0, 1, 'uk'), +('L25', '', '', '53.378', '-2.862', 0, 1, 'uk'), +('L26', '', '', '53.364', '-2.832', 0, 1, 'uk'), +('L27', '', '', '53.388', '-2.837', 0, 1, 'uk'), +('L28', '', '', '53.435', '-2.864', 0, 1, 'uk'), +('L29', '', '', '53.507', '-2.983', 0, 1, 'uk'), +('L3', '', '', '53.409', '-2.983', 0, 1, 'uk'), +('L30', '', '', '53.484', '-2.971', 0, 1, 'uk'), +('L31', '', '', '53.513', '-2.937', 0, 1, 'uk'), +('L32', '', '', '53.478', '-2.888', 0, 1, 'uk'), +('L33', '', '', '53.489', '-2.875', 0, 1, 'uk'), +('L34', '', '', '53.437', '-2.815', 0, 1, 'uk'), +('L35', '', '', '53.415', '-2.782', 0, 1, 'uk'), +('L36', '', '', '53.414', '-2.84', 0, 1, 'uk'), +('L37', '', '', '53.557', '-3.062', 0, 1, 'uk'), +('L38', '', '', '53.524', '-3.05', 0, 1, 'uk'), +('L39', '', '', '53.562', '-2.896', 0, 1, 'uk'), +('L4', '', '', '53.438', '-2.96', 0, 1, 'uk'), +('L40', '', '', '53.602', '-2.841', 0, 1, 'uk'), +('L5', '', '', '53.425', '-2.975', 0, 1, 'uk'), +('L6', '', '', '53.419', '-2.95', 0, 1, 'uk'), +('L69', '', '', '53.407', '-2.974', 0, 1, 'uk'), +('L7', '', '', '53.406', '-2.948', 0, 1, 'uk'), +('L70', '', '', '53.409', '-2.97', 0, 1, 'uk'), +('L8', '', '', '53.39', '-2.962', 0, 1, 'uk'), +('L9', '', '', '53.461', '-2.952', 0, 1, 'uk'), +('LA1', '', '', '54.046', '-2.799', 0, 1, 'uk'), +('LA10', '', '', '54.314', '-2.493', 0, 1, 'uk'), +('LA11', '', '', '54.2', '-2.924', 0, 1, 'uk'), +('LA12', '', '', '54.203', '-3.082', 0, 1, 'uk'), +('LA13', '', '', '54.118', '-3.198', 0, 1, 'uk'), +('LA14', '', '', '54.118', '-3.23', 0, 1, 'uk'), +('LA15', '', '', '54.156', '-3.178', 0, 1, 'uk'), +('LA16', '', '', '54.186', '-3.202', 0, 1, 'uk'), +('LA17', '', '', '54.239', '-3.175', 0, 1, 'uk'), +('LA18', '', '', '54.215', '-3.275', 0, 1, 'uk'), +('LA19', '', '', '54.293', '-3.375', 0, 1, 'uk'), +('LA2', '', '', '54.066', '-2.673', 0, 1, 'uk'), +('LA20', '', '', '54.294', '-3.205', 0, 1, 'uk'), +('LA21', '', '', '54.364', '-3.072', 0, 1, 'uk'), +('LA22', '', '', '54.422', '-2.987', 0, 1, 'uk'), +('LA23', '', '', '54.371', '-2.911', 0, 1, 'uk'), +('LA3', '', '', '54.051', '-2.877', 0, 1, 'uk'), +('LA4', '', '', '54.07', '-2.852', 0, 1, 'uk'), +('LA5', '', '', '54.143', '-2.79', 0, 1, 'uk'), +('LA50', '', '', '54.202028', '-2.827829', 0, 1, 'uk'), +('LA6', '', '', '54.176', '-2.611', 0, 1, 'uk'), +('LA63', '', '', '54.205629', '-2.359995', 0, 1, 'uk'), +('LA7', '', '', '54.226', '-2.772', 0, 1, 'uk'), +('LA8', '', '', '54.323', '-2.759', 0, 1, 'uk'), +('LA9', '', '', '54.325', '-2.742', 0, 1, 'uk'), +('LD1', '', '', '52.261', '-3.365', 0, 1, 'uk'), +('LD2', '', '', '52.141', '-3.393', 0, 1, 'uk'), +('LD3', '', '', '51.96', '-3.371', 0, 1, 'uk'), +('LD4', '', '', '52.118', '-3.555', 0, 1, 'uk'), +('LD5', '', '', '52.127', '-3.616', 0, 1, 'uk'), +('LD6', '', '', '52.309', '-3.508', 0, 1, 'uk'), +('LD7', '', '', '52.352', '-3.085', 0, 1, 'uk'), +('LD8', '', '', '52.268', '-3.043', 0, 1, 'uk'), +('LE1', '', '', '52.634', '-1.128', 0, 1, 'uk'), +('LE10', '', '', '52.537', '-1.368', 0, 1, 'uk'), +('LE11', '', '', '52.769', '-1.216', 0, 1, 'uk'), +('LE12', '', '', '52.766', '-1.192', 0, 1, 'uk'), +('LE13', '', '', '52.765', '-0.885', 0, 1, 'uk'), +('LE14', '', '', '52.784', '-0.895', 0, 1, 'uk'), +('LE15', '', '', '52.656', '-0.701', 0, 1, 'uk'), +('LE16', '', '', '52.486', '-0.892', 0, 1, 'uk'), +('LE17', '', '', '52.467', '-1.177', 0, 1, 'uk'), +('LE18', '', '', '52.583', '-1.111', 0, 1, 'uk'), +('LE19', '', '', '52.5834', '-1.194065', 0, 1, 'uk'), +('LE2', '', '', '52.609', '-1.115', 0, 1, 'uk'), +('LE3', '', '', '52.628', '-1.181', 0, 1, 'uk'), +('LE4', '', '', '52.663', '-1.123', 0, 1, 'uk'), +('LE42', '', '', '52.661927', '-1.141522', 0, 1, 'uk'), +('LE5', '', '', '52.636', '-1.086', 0, 1, 'uk'), +('LE6', '', '', '52.663', '-1.242', 0, 1, 'uk'), +('LE65', '', '', '52.748', '-1.468', 0, 1, 'uk'), +('LE67', '', '', '52.716', '-1.36', 0, 1, 'uk'), +('LE7', '', '', '52.678', '-1.068', 0, 1, 'uk'), +('LE8', '', '', '52.553', '-1.098', 0, 1, 'uk'), +('LE9', '', '', '52.57', '-1.287', 0, 1, 'uk'), +('LL11', '', '', '53.063', '-3.035', 0, 1, 'uk'), +('LL12', '', '', '53.086', '-2.988', 0, 1, 'uk'), +('LL13', '', '', '53.036', '-2.96', 0, 1, 'uk'), +('LL14', '', '', '52.992', '-3.051', 0, 1, 'uk'), +('LL15', '', '', '53.103', '-3.315', 0, 1, 'uk'), +('LL16', '', '', '53.185', '-3.432', 0, 1, 'uk'), +('LL17', '', '', '53.253', '-3.435', 0, 1, 'uk'), +('LL18', '', '', '53.31', '-3.475', 0, 1, 'uk'), +('LL19', '', '', '53.331', '-3.408', 0, 1, 'uk'), +('LL20', '', '', '52.959', '-3.159', 0, 1, 'uk'), +('LL21', '', '', '52.99', '-3.409', 0, 1, 'uk'), +('LL22', '', '', '53.269', '-3.593', 0, 1, 'uk'), +('LL23', '', '', '52.905', '-3.6', 0, 1, 'uk'), +('LL24', '', '', '53.057', '-3.785', 0, 1, 'uk'), +('LL25', '', '', '53.054', '-3.878', 0, 1, 'uk'), +('LL26', '', '', '53.139', '-3.785', 0, 1, 'uk'), +('LL27', '', '', '53.147', '-3.824', 0, 1, 'uk'), +('LL28', '', '', '53.288', '-3.76', 0, 1, 'uk'), +('LL29', '', '', '53.289', '-3.708', 0, 1, 'uk'), +('LL30', '', '', '53.318', '-3.815', 0, 1, 'uk'), +('LL31', '', '', '53.291', '-3.81', 0, 1, 'uk'), +('LL32', '', '', '53.26', '-3.839', 0, 1, 'uk'), +('LL33', '', '', '53.25', '-3.98', 0, 1, 'uk'), +('LL34', '', '', '53.271', '-3.912', 0, 1, 'uk'), +('LL35', '', '', '52.547', '-4.041', 0, 1, 'uk'), +('LL36', '', '', '52.604', '-4.063', 0, 1, 'uk'), +('LL37', '', '', '52.666', '-4.083', 0, 1, 'uk'), +('LL38', '', '', '52.698', '-4.039', 0, 1, 'uk'), +('LL39', '', '', '52.711', '-4.011', 0, 1, 'uk'), +('LL40', '', '', '52.756', '-3.875', 0, 1, 'uk'), +('LL41', '', '', '52.969', '-3.938', 0, 1, 'uk'), +('LL42', '', '', '52.725', '-4.054', 0, 1, 'uk'), +('LL43', '', '', '52.774', '-4.092', 0, 1, 'uk'), +('LL44', '', '', '52.791', '-4.096', 0, 1, 'uk'), +('LL45', '', '', '52.82', '-4.095', 0, 1, 'uk'), +('LL46', '', '', '52.854', '-4.106', 0, 1, 'uk'), +('LL47', '', '', '52.902', '-4.062', 0, 1, 'uk'), +('LL48', '', '', '52.936', '-4.07', 0, 1, 'uk'), +('LL49', '', '', '52.929', '-4.138', 0, 1, 'uk'), +('LL4O', '', '', '52.756458', '-3.944837', 0, 1, 'uk'), +('LL51', '', '', '52.974', '-4.238', 0, 1, 'uk'), +('LL52', '', '', '52.925', '-4.24', 0, 1, 'uk'), +('LL53', '', '', '52.884', '-4.491', 0, 1, 'uk'), +('LL54', '', '', '53.059', '-4.285', 0, 1, 'uk'), +('LL55', '', '', '53.134', '-4.204', 0, 1, 'uk'), +('LL56', '', '', '53.187', '-4.199', 0, 1, 'uk'), +('LL57', '', '', '53.207', '-4.111', 0, 1, 'uk'), +('LL58', '', '', '53.28', '-4.099', 0, 1, 'uk'), +('LL59', '', '', '53.235', '-4.159', 0, 1, 'uk'), +('LL60', '', '', '53.215', '-4.27', 0, 1, 'uk'), +('LL61', '', '', '53.195', '-4.262', 0, 1, 'uk'), +('LL62', '', '', '53.21', '-4.385', 0, 1, 'uk'), +('LL63', '', '', '53.219', '-4.471', 0, 1, 'uk'), +('LL64', '', '', '53.228', '-4.517', 0, 1, 'uk'), +('LL65', '', '', '53.301', '-4.569', 0, 1, 'uk'), +('LL66', '', '', '53.381', '-4.405', 0, 1, 'uk'), +('LL67', '', '', '53.411', '-4.456', 0, 1, 'uk'), +('LL68', '', '', '53.398', '-4.377', 0, 1, 'uk'), +('LL69', '', '', '53.386', '-4.318', 0, 1, 'uk'), +('LL70', '', '', '53.364', '-4.287', 0, 1, 'uk'), +('LL71', '', '', '53.327', '-4.368', 0, 1, 'uk'), +('LL72', '', '', '53.35', '-4.24', 0, 1, 'uk'), +('LL73', '', '', '53.335', '-4.244', 0, 1, 'uk'), +('LL74', '', '', '53.316', '-4.232', 0, 1, 'uk'), +('LL75', '', '', '53.283', '-4.218', 0, 1, 'uk'), +('LL76', '', '', '53.301', '-4.238', 0, 1, 'uk'), +('LL77', '', '', '53.26', '-4.311', 0, 1, 'uk'), +('LL78', '', '', '53.317', '-4.262', 0, 1, 'uk'), +('LN1', '', '', '53.259', '-0.587', 0, 1, 'uk'), +('LN10', '', '', '53.158', '-0.217', 0, 1, 'uk'), +('LN11', '', '', '53.373', '0.024', 0, 1, 'uk'), +('LN12', '', '', '53.329', '0.266', 0, 1, 'uk'), +('LN13', '', '', '53.265', '0.184', 0, 1, 'uk'), +('LN2', '', '', '53.255', '-0.508', 0, 1, 'uk'), +('LN3', '', '', '53.243', '-0.419', 0, 1, 'uk'), +('LN4', '', '', '53.15', '-0.384', 0, 1, 'uk'), +('LN5', '', '', '53.172', '-0.556', 0, 1, 'uk'), +('LN6', '', '', '53.203', '-0.594', 0, 1, 'uk'), +('LN7', '', '', '53.492', '-0.343', 0, 1, 'uk'), +('LN8', '', '', '53.373', '-0.324', 0, 1, 'uk'), +('LN9', '', '', '53.217', '-0.111', 0, 1, 'uk'), +('LS1', '', '', '53.797', '-1.548', 0, 1, 'uk'), +('LS10', '', '', '53.762', '-1.531', 0, 1, 'uk'), +('LS11', '', '', '53.776', '-1.556', 0, 1, 'uk'), +('LS12', '', '', '53.791', '-1.596', 0, 1, 'uk'), +('LS13', '', '', '53.81', '-1.634', 0, 1, 'uk'), +('LS14', '', '', '53.828', '-1.456', 0, 1, 'uk'), +('LS15', '', '', '53.806', '-1.444', 0, 1, 'uk'), +('LS16', '', '', '53.851', '-1.602', 0, 1, 'uk'), +('LS17', '', '', '53.859', '-1.527', 0, 1, 'uk'), +('LS18', '', '', '53.841', '-1.641', 0, 1, 'uk'), +('LS19', '', '', '53.86', '-1.683', 0, 1, 'uk'), +('LS2', '', '', '53.801', '-1.545', 0, 1, 'uk'), +('LS20', '', '', '53.873', '-1.713', 0, 1, 'uk'), +('LS21', '', '', '53.911', '-1.679', 0, 1, 'uk'), +('LS22', '', '', '53.932', '-1.394', 0, 1, 'uk'), +('LS23', '', '', '53.904', '-1.354', 0, 1, 'uk'), +('LS24', '', '', '53.87', '-1.252', 0, 1, 'uk'), +('LS25', '', '', '53.785', '-1.33', 0, 1, 'uk'), +('LS26', '', '', '53.752', '-1.448', 0, 1, 'uk'), +('LS27', '', '', '53.749', '-1.602', 0, 1, 'uk'), +('LS28', '', '', '53.802', '-1.669', 0, 1, 'uk'), +('LS29', '', '', '53.92', '-1.803', 0, 1, 'uk'), +('LS3', '', '', '53.801', '-1.56', 0, 1, 'uk'), +('LS4', '', '', '53.809', '-1.581', 0, 1, 'uk'), +('LS5', '', '', '53.819', '-1.601', 0, 1, 'uk'), +('LS6', '', '', '53.82', '-1.568', 0, 1, 'uk'), +('LS7', '', '', '53.818', '-1.539', 0, 1, 'uk'), +('LS72', '', '', '53.765618', '-1.58157', 0, 1, 'uk'), +('LS8', '', '', '53.824', '-1.509', 0, 1, 'uk'), +('LS9', '', '', '53.799', '-1.509', 0, 1, 'uk'), +('LU1', '', '', '51.874', '-0.424', 0, 1, 'uk'), +('LU2', '', '', '51.892', '-0.395', 0, 1, 'uk'), +('LU3', '', '', '51.909', '-0.442', 0, 1, 'uk'), +('LU4', '', '', '51.898', '-0.467', 0, 1, 'uk'), +('LU49', '', '', '51.92918', '-0.502956', 0, 1, 'uk'), +('LU5', '', '', '51.909', '-0.513', 0, 1, 'uk'), +('LU6', '', '', '51.877', '-0.536', 0, 1, 'uk'), +('LU7', '', '', '51.909', '-0.664', 0, 1, 'uk'), +('M1', '', '', '53.477', '-2.235', 0, 1, 'uk'), +('M11', '', '', '53.479', '-2.18', 0, 1, 'uk'), +('M12', '', '', '53.464', '-2.201', 0, 1, 'uk'), +('M13', '', '', '53.461', '-2.215', 0, 1, 'uk'), +('M14', '', '', '53.448', '-2.224', 0, 1, 'uk'), +('M15', '', '', '53.466', '-2.25', 0, 1, 'uk'), +('M16', '', '', '53.455', '-2.263', 0, 1, 'uk'), +('M17', '', '', '53.469', '-2.318', 0, 1, 'uk'), +('M18', '', '', '53.461', '-2.169', 0, 1, 'uk'), +('M19', '', '', '53.437', '-2.195', 0, 1, 'uk'), +('M2', '', '', '53.48', '-2.243', 0, 1, 'uk'), +('M20', '', '', '53.425', '-2.23', 0, 1, 'uk'), +('M21', '', '', '53.438', '-2.271', 0, 1, 'uk'), +('M22', '', '', '53.386', '-2.258', 0, 1, 'uk'), +('M23', '', '', '53.399', '-2.287', 0, 1, 'uk'), +('M24', '', '', '53.551', '-2.196', 0, 1, 'uk'), +('M25', '', '', '53.528', '-2.275', 0, 1, 'uk'), +('M26', '', '', '53.562', '-2.333', 0, 1, 'uk'), +('M27', '', '', '53.512', '-2.337', 0, 1, 'uk'), +('M28', '', '', '53.514', '-2.397', 0, 1, 'uk'), +('M29', '', '', '53.508', '-2.457', 0, 1, 'uk'), +('M3', '', '', '53.483', '-2.251', 0, 1, 'uk'), +('M30', '', '', '53.484', '-2.354', 0, 1, 'uk'), +('M31', '', '', '53.419', '-2.422', 0, 1, 'uk'), +('M32', '', '', '53.45', '-2.309', 0, 1, 'uk'), +('M33', '', '', '53.421', '-2.324', 0, 1, 'uk'), +('M34', '', '', '53.456', '-2.117', 0, 1, 'uk'), +('M35', '', '', '53.507', '-2.153', 0, 1, 'uk'), +('M38', '', '', '53.532', '-2.421', 0, 1, 'uk'), +('M4', '', '', '53.485', '-2.229', 0, 1, 'uk'), +('M40', '', '', '53.504', '-2.19', 0, 1, 'uk'), +('M41', '', '', '53.451', '-2.364', 0, 1, 'uk'), +('M43', '', '', '53.483', '-2.148', 0, 1, 'uk'), +('M44', '', '', '53.441', '-2.426', 0, 1, 'uk'), +('M45', '', '', '53.547', '-2.289', 0, 1, 'uk'), +('M46', '', '', '53.526', '-2.49', 0, 1, 'uk'), +('M5', '', '', '53.479', '-2.284', 0, 1, 'uk'), +('M50', '', '', '53.480982', '-2.309948', 0, 1, 'uk'), +('M6', '', '', '53.492', '-2.297', 0, 1, 'uk'), +('M60', '', '', '53.486', '-2.228', 0, 1, 'uk'), +('M7', '', '', '53.505', '-2.26', 0, 1, 'uk'), +('M8', '', '', '53.509', '-2.239', 0, 1, 'uk'), +('M9', '', '', '53.522', '-2.213', 0, 1, 'uk'), +('M90', '', '', '53.363', '-2.277', 0, 1, 'uk'), +('ME1', '', '', '51.372', '0.5', 0, 1, 'uk'), +('ME10', '', '', '51.343', '0.736', 0, 1, 'uk'), +('ME11', '', '', '51.413', '0.749', 0, 1, 'uk'), +('ME12', '', '', '51.423', '0.805', 0, 1, 'uk'), +('ME13', '', '', '51.303', '0.896', 0, 1, 'uk'), +('ME14', '', '', '51.28', '0.542', 0, 1, 'uk'), +('ME15', '', '', '51.254', '0.534', 0, 1, 'uk'), +('ME16', '', '', '51.274', '0.5', 0, 1, 'uk'), +('ME17', '', '', '51.235', '0.61', 0, 1, 'uk'), +('ME18', '', '', '51.244', '0.423', 0, 1, 'uk'), +('ME19', '', '', '51.293', '0.411', 0, 1, 'uk'), +('ME2', '', '', '51.392', '0.486', 0, 1, 'uk'), +('ME20', '', '', '51.305', '0.46', 0, 1, 'uk'), +('ME3', '', '', '51.433', '0.547', 0, 1, 'uk'), +('ME4', '', '', '51.38', '0.53', 0, 1, 'uk'), +('ME5', '', '', '51.349', '0.534', 0, 1, 'uk'), +('ME6', '', '', '51.327', '0.441', 0, 1, 'uk'), +('ME7', '', '', '51.379', '0.557', 0, 1, 'uk'), +('ME8', '', '', '51.361', '0.599', 0, 1, 'uk'), +('ME9', '', '', '51.333', '0.725', 0, 1, 'uk'), +('MK1', '', '', '52.005', '-0.726', 0, 1, 'uk'), +('MK10', '', '', '52.039', '-0.698', 0, 1, 'uk'), +('MK11', '', '', '52.052', '-0.84', 0, 1, 'uk'), +('MK12', '', '', '52.057', '-0.816', 0, 1, 'uk'), +('MK13', '', '', '52.052', '-0.784', 0, 1, 'uk'), +('MK14', '', '', '52.059', '-0.762', 0, 1, 'uk'), +('MK15', '', '', '52.058', '-0.728', 0, 1, 'uk'), +('MK16', '', '', '52.089', '-0.721', 0, 1, 'uk'), +('MK17', '', '', '51.992', '-0.7', 0, 1, 'uk'), +('MK18', '', '', '51.98', '-0.969', 0, 1, 'uk'), +('MK19', '', '', '52.072', '-0.852', 0, 1, 'uk'), +('MK2', '', '', '51.99', '-0.724', 0, 1, 'uk'), +('MK3', '', '', '51.997', '-0.753', 0, 1, 'uk'), +('MK31', '', '', '52.14609', '-0.423086', 0, 1, 'uk'), +('MK4', '', '', '52.004', '-0.777', 0, 1, 'uk'), +('MK40', '', '', '52.138', '-0.472', 0, 1, 'uk'), +('MK41', '', '', '52.151', '-0.447', 0, 1, 'uk'), +('MK42', '', '', '52.12', '-0.473', 0, 1, 'uk'), +('MK43', '', '', '52.118', '-0.557', 0, 1, 'uk'), +('MK44', '', '', '52.194', '-0.426', 0, 1, 'uk'), +('MK45', '', '', '52.024', '-0.468', 0, 1, 'uk'), +('MK46', '', '', '52.154', '-0.691', 0, 1, 'uk'), +('MK5', '', '', '52.02', '-0.783', 0, 1, 'uk'), +('MK6', '', '', '52.03', '-0.742', 0, 1, 'uk'), +('MK7', '', '', '52.019', '-0.69', 0, 1, 'uk'), +('MK8', '', '', '52.036', '-0.803', 0, 1, 'uk'), +('MK9', '', '', '52.041', '-0.759', 0, 1, 'uk'), +('ML1', '', '', '55.799', '-3.976', 0, 1, 'uk'), +('ML10', '', '', '55.68', '-4.069', 0, 1, 'uk'), +('ML11', '', '', '55.667', '-3.786', 0, 1, 'uk'), +('ML12', '', '', '55.566', '-3.596', 0, 1, 'uk'), +('ML2', '', '', '55.777', '-3.913', 0, 1, 'uk'), +('ML3', '', '', '55.77', '-4.054', 0, 1, 'uk'), +('ML4', '', '', '55.818', '-4.02', 0, 1, 'uk'), +('ML5', '', '', '55.86', '-4.03', 0, 1, 'uk'), +('ML6', '', '', '55.867', '-3.962', 0, 1, 'uk'), +('ML7', '', '', '55.83', '-3.793', 0, 1, 'uk'), +('ML8', '', '', '55.731', '-3.841', 0, 1, 'uk'), +('ML9', '', '', '55.725', '-3.967', 0, 1, 'uk'), +('N1', '', '', '51.537', '-0.097', 0, 1, 'uk'), +('N10', '', '', '51.594', '-0.143', 0, 1, 'uk'), +('N11', '', '', '51.613', '-0.138', 0, 1, 'uk'), +('N12', '', '', '51.615', '-0.176', 0, 1, 'uk'), +('N13', '', '', '51.619', '-0.102', 0, 1, 'uk'), +('N14', '', '', '51.634', '-0.129', 0, 1, 'uk'), +('N15', '', '', '51.582', '-0.081', 0, 1, 'uk'), +('N16', '', '', '51.563', '-0.075', 0, 1, 'uk'), +('N17', '', '', '51.597', '-0.07', 0, 1, 'uk'), +('N18', '', '', '51.613', '-0.065', 0, 1, 'uk'), +('N19', '', '', '51.565', '-0.128', 0, 1, 'uk'), +('N2', '', '', '51.59', '-0.167', 0, 1, 'uk'), +('N20', '', '', '51.629', '-0.173', 0, 1, 'uk'), +('N21', '', '', '51.636', '-0.098', 0, 1, 'uk'), +('N22', '', '', '51.599', '-0.11', 0, 1, 'uk'), +('N3', '', '', '51.6', '-0.193', 0, 1, 'uk'), +('N4', '', '', '51.571', '-0.101', 0, 1, 'uk'), +('N5', '', '', '51.553', '-0.097', 0, 1, 'uk'), +('N6', '', '', '51.572', '-0.141', 0, 1, 'uk'), +('N7', '', '', '51.553', '-0.116', 0, 1, 'uk'), +('N8', '', '', '51.584', '-0.116', 0, 1, 'uk'), +('N9', '', '', '51.628', '-0.057', 0, 1, 'uk'), +('NE1', '', '', '54.973', '-1.611', 0, 1, 'uk'), +('NE10', '', '', '54.947', '-1.553', 0, 1, 'uk'), +('NE11', '', '', '54.941', '-1.631', 0, 1, 'uk'), +('NE12', '', '', '55.024', '-1.569', 0, 1, 'uk'), +('NE13', '', '', '55.046', '-1.645', 0, 1, 'uk'), +('NE14', '', '', '54.964911', '-1.665544', 0, 1, 'uk'), +('NE15', '', '', '54.984', '-1.72', 0, 1, 'uk'), +('NE16', '', '', '54.932', '-1.691', 0, 1, 'uk'), +('NE17', '', '', '54.913', '-1.816', 0, 1, 'uk'), +('NE18', '', '', '55.038', '-1.861', 0, 1, 'uk'), +('NE19', '', '', '55.179', '-2.096', 0, 1, 'uk'), +('NE2', '', '', '54.987', '-1.605', 0, 1, 'uk'), +('NE20', '', '', '55.053', '-1.786', 0, 1, 'uk'), +('NE21', '', '', '54.958', '-1.719', 0, 1, 'uk'), +('NE22', '', '', '55.136', '-1.584', 0, 1, 'uk'), +('NE23', '', '', '55.08', '-1.581', 0, 1, 'uk'), +('NE24', '', '', '55.122', '-1.521', 0, 1, 'uk'), +('NE25', '', '', '55.05', '-1.486', 0, 1, 'uk'), +('NE26', '', '', '55.052', '-1.456', 0, 1, 'uk'), +('NE27', '', '', '55.033', '-1.511', 0, 1, 'uk'), +('NE28', '', '', '55', '-1.519', 0, 1, 'uk'), +('NE29', '', '', '55.012', '-1.464', 0, 1, 'uk'), +('NE3', '', '', '55.01', '-1.633', 0, 1, 'uk'), +('NE30', '', '', '55.021', '-1.44', 0, 1, 'uk'), +('NE31', '', '', '54.971', '-1.512', 0, 1, 'uk'), +('NE32', '', '', '54.968', '-1.483', 0, 1, 'uk'), +('NE33', '', '', '54.991', '-1.428', 0, 1, 'uk'), +('NE34', '', '', '54.972', '-1.421', 0, 1, 'uk'), +('NE35', '', '', '54.952', '-1.46', 0, 1, 'uk'), +('NE36', '', '', '54.945', '-1.439', 0, 1, 'uk'), +('NE37', '', '', '54.913', '-1.526', 0, 1, 'uk'), +('NE38', '', '', '54.894', '-1.524', 0, 1, 'uk'), +('NE39', '', '', '54.924', '-1.759', 0, 1, 'uk'), +('NE4', '', '', '54.974', '-1.643', 0, 1, 'uk'), +('NE40', '', '', '54.966', '-1.772', 0, 1, 'uk'), +('NE41', '', '', '54.976', '-1.819', 0, 1, 'uk'), +('NE42', '', '', '54.962', '-1.854', 0, 1, 'uk'), +('NE43', '', '', '54.948', '-1.905', 0, 1, 'uk'), +('NE44', '', '', '54.943', '-1.978', 0, 1, 'uk'), +('NE45', '', '', '54.976', '-2.016', 0, 1, 'uk'), +('NE46', '', '', '54.979', '-2.106', 0, 1, 'uk'), +('NE47', '', '', '54.929', '-2.251', 0, 1, 'uk'), +('NE48', '', '', '55.132', '-2.257', 0, 1, 'uk'), +('NE49', '', '', '54.967', '-2.459', 0, 1, 'uk'), +('NE5', '', '', '54.996', '-1.687', 0, 1, 'uk'), +('NE6', '', '', '54.977', '-1.564', 0, 1, 'uk'), +('NE61', '', '', '55.181', '-1.688', 0, 1, 'uk'), +('NE62', '', '', '55.161', '-1.592', 0, 1, 'uk'), +('NE63', '', '', '55.178', '-1.562', 0, 1, 'uk'), +('NE64', '', '', '55.184', '-1.514', 0, 1, 'uk'), +('NE65', '', '', '55.313', '-1.751', 0, 1, 'uk'), +('NE66', '', '', '55.428', '-1.731', 0, 1, 'uk'), +('NE67', '', '', '55.534', '-1.693', 0, 1, 'uk'), +('NE68', '', '', '55.574', '-1.658', 0, 1, 'uk'), +('NE69', '', '', '55.605', '-1.716', 0, 1, 'uk'), +('NE7', '', '', '55', '-1.578', 0, 1, 'uk'), +('NE70', '', '', '55.594', '-1.815', 0, 1, 'uk'), +('NE71', '', '', '55.555', '-2.044', 0, 1, 'uk'), +('NE8', '', '', '54.955', '-1.603', 0, 1, 'uk'), +('NE88', '', '', '54.941686', '-1.61541', 0, 1, 'uk'), +('NE9', '', '', '54.931', '-1.584', 0, 1, 'uk'), +('NE99', '', '', '54.967', '-1.613', 0, 1, 'uk'), +('NG1', '', '', '52.954', '-1.147', 0, 1, 'uk'), +('NG10', '', '', '52.9', '-1.282', 0, 1, 'uk'), +('NG11', '', '', '52.899', '-1.173', 0, 1, 'uk'), +('NG12', '', '', '52.911', '-1.054', 0, 1, 'uk'), +('NG13', '', '', '52.947', '-0.92', 0, 1, 'uk'), +('NG14', '', '', '53.015', '-1.037', 0, 1, 'uk'), +('NG15', '', '', '53.045', '-1.203', 0, 1, 'uk'), +('NG16', '', '', '53.027', '-1.294', 0, 1, 'uk'), +('NG17', '', '', '53.116', '-1.26', 0, 1, 'uk'), +('NG18', '', '', '53.138', '-1.183', 0, 1, 'uk'), +('NG19', '', '', '53.16', '-1.197', 0, 1, 'uk'), +('NG2', '', '', '52.935', '-1.131', 0, 1, 'uk'), +('NG20', '', '', '53.21', '-1.183', 0, 1, 'uk'), +('NG21', '', '', '53.141', '-1.104', 0, 1, 'uk'), +('NG22', '', '', '53.178', '-0.971', 0, 1, 'uk'), +('NG23', '', '', '53.116', '-0.801', 0, 1, 'uk'), +('NG24', '', '', '53.07', '-0.799', 0, 1, 'uk'), +('NG25', '', '', '53.073', '-0.955', 0, 1, 'uk'), +('NG3', '', '', '52.968', '-1.128', 0, 1, 'uk'), +('NG31', '', '', '52.914', '-0.64', 0, 1, 'uk'), +('NG32', '', '', '52.949', '-0.649', 0, 1, 'uk'), +('NG33', '', '', '52.818', '-0.579', 0, 1, 'uk'), +('NG34', '', '', '52.988', '-0.391', 0, 1, 'uk'), +('NG4', '', '', '52.97', '-1.086', 0, 1, 'uk'), +('NG5', '', '', '52.997', '-1.143', 0, 1, 'uk'), +('NG6', '', '', '52.997', '-1.191', 0, 1, 'uk'), +('NG7', '', '', '52.958', '-1.175', 0, 1, 'uk'), +('NG8', '', '', '52.964', '-1.212', 0, 1, 'uk'), +('NG9', '', '', '52.926', '-1.236', 0, 1, 'uk'), +('NN1', '', '', '52.241', '-0.887', 0, 1, 'uk'), +('NN10', '', '', '52.292', '-0.597', 0, 1, 'uk'), +('NN11', '', '', '52.241', '-1.179', 0, 1, 'uk'), +('NN12', '', '', '52.128', '-0.998', 0, 1, 'uk'), +('NN13', '', '', '52.032', '-1.147', 0, 1, 'uk'), +('NN14', '', '', '52.41', '-0.692', 0, 1, 'uk'), +('NN15', '', '', '52.384', '-0.706', 0, 1, 'uk'), +('NN16', '', '', '52.406', '-0.721', 0, 1, 'uk'), +('NN17', '', '', '52.5', '-0.688', 0, 1, 'uk'), +('NN18', '', '', '52.48', '-0.715', 0, 1, 'uk'), +('NN2', '', '', '52.262', '-0.895', 0, 1, 'uk'), +('NN29', '', '', '52.26', '-0.663', 0, 1, 'uk'), +('NN3', '', '', '52.261', '-0.846', 0, 1, 'uk'), +('NN4', '', '', '52.216', '-0.896', 0, 1, 'uk'), +('NN5', '', '', '52.248', '-0.93', 0, 1, 'uk'), +('NN51', '', '', '52.391769', '-0.685219', 0, 1, 'uk'), +('NN6', '', '', '52.322', '-0.944', 0, 1, 'uk'), +('NN7', '', '', '52.21', '-0.927', 0, 1, 'uk'), +('NN8', '', '', '52.303', '-0.698', 0, 1, 'uk'), +('NN9', '', '', '52.333', '-0.599', 0, 1, 'uk'), +('NP10', '', '', '51.579', '-3.045', 0, 1, 'uk'), +('NP11', '', '', '51.643', '-3.13', 0, 1, 'uk'), +('NP12', '', '', '51.668', '-3.197', 0, 1, 'uk'), +('NP13', '', '', '51.734', '-3.14', 0, 1, 'uk'), +('NP15', '', '', '51.726', '-2.886', 0, 1, 'uk'), +('NP16', '', '', '51.65', '-2.688', 0, 1, 'uk'), +('NP18', '', '', '51.607', '-2.943', 0, 1, 'uk'), +('NP19', '', '', '51.589', '-2.963', 0, 1, 'uk'), +('NP2', '', '', '51.759071', '-3.289044', 0, 1, 'uk'), +('NP20', '', '', '51.591', '-3.005', 0, 1, 'uk'), +('NP22', '', '', '51.771', '-3.257', 0, 1, 'uk'), +('NP23', '', '', '51.785', '-3.196', 0, 1, 'uk'), +('NP24', '', '', '51.72', '-3.237', 0, 1, 'uk'), +('NP25', '', '', '51.803', '-2.722', 0, 1, 'uk'), +('NP26', '', '', '51.59', '-2.777', 0, 1, 'uk'), +('NP3', '', '', '51.739616', '-3.175639', 0, 1, 'uk'), +('NP4', '', '', '51.719', '-3.046', 0, 1, 'uk'), +('NP44', '', '', '51.651', '-3.027', 0, 1, 'uk'), +('NP6', '', '', '51.584213', '-2.760448', 0, 1, 'uk'), +('NP7', '', '', '51.829', '-3.009', 0, 1, 'uk'), +('NP8', '', '', '51.86', '-3.146', 0, 1, 'uk'), +('NP9', '', '', '51.589122', '-2.972316', 0, 1, 'uk'), +('NR1', '', '', '52.626', '1.31', 0, 1, 'uk'), +('NR10', '', '', '52.736', '1.246', 0, 1, 'uk'), +('NR11', '', '', '52.841', '1.275', 0, 1, 'uk'), +('NR12', '', '', '52.76', '1.472', 0, 1, 'uk'), +('NR13', '', '', '52.634', '1.473', 0, 1, 'uk'), +('NR14', '', '', '52.565', '1.381', 0, 1, 'uk'), +('NR15', '', '', '52.506', '1.271', 0, 1, 'uk'), +('NR16', '', '', '52.476', '1.061', 0, 1, 'uk'), +('NR17', '', '', '52.515', '0.996', 0, 1, 'uk'), +('NR18', '', '', '52.571', '1.11', 0, 1, 'uk'), +('NR19', '', '', '52.675', '0.929', 0, 1, 'uk'), +('NR2', '', '', '52.63', '1.285', 0, 1, 'uk'), +('NR20', '', '', '52.724', '0.981', 0, 1, 'uk'), +('NR21', '', '', '52.841', '0.853', 0, 1, 'uk'), +('NR22', '', '', '52.894', '0.867', 0, 1, 'uk'), +('NR23', '', '', '52.949', '0.86', 0, 1, 'uk'), +('NR24', '', '', '52.859', '1.051', 0, 1, 'uk'), +('NR25', '', '', '52.92', '1.085', 0, 1, 'uk'), +('NR26', '', '', '52.935', '1.215', 0, 1, 'uk'), +('NR27', '', '', '52.924', '1.302', 0, 1, 'uk'), +('NR28', '', '', '52.822', '1.4', 0, 1, 'uk'), +('NR29', '', '', '52.692', '1.639', 0, 1, 'uk'), +('NR3', '', '', '52.643', '1.296', 0, 1, 'uk'), +('NR30', '', '', '52.619', '1.729', 0, 1, 'uk'), +('NR31', '', '', '52.576', '1.711', 0, 1, 'uk'), +('NR32', '', '', '52.489', '1.734', 0, 1, 'uk'), +('NR33', '', '', '52.454', '1.719', 0, 1, 'uk'), +('NR34', '', '', '52.438', '1.585', 0, 1, 'uk'), +('NR35', '', '', '52.462', '1.435', 0, 1, 'uk'), +('NR4', '', '', '52.614', '1.265', 0, 1, 'uk'), +('NR5', '', '', '52.64', '1.235', 0, 1, 'uk'), +('NR50', '', '', '52.649625', '1.22766', 0, 1, 'uk'), +('NR6', '', '', '52.661', '1.283', 0, 1, 'uk'), +('NR7', '', '', '52.635954', '1.350276', 0, 1, 'uk'), +('NR8', '', '', '52.678', '1.212', 0, 1, 'uk'), +('NR9', '', '', '52.636', '1.109', 0, 1, 'uk'), +('NW1', '', '', '51.532', '-0.143', 0, 1, 'uk'), +('NW10', '', '', '51.54', '-0.246', 0, 1, 'uk'), +('NW11', '', '', '51.578', '-0.196', 0, 1, 'uk'), +('NW2', '', '', '51.558', '-0.218', 0, 1, 'uk'), +('NW3', '', '', '51.552', '-0.171', 0, 1, 'uk'), +('NW4', '', '', '51.587', '-0.223', 0, 1, 'uk'), +('NW5', '', '', '51.551', '-0.143', 0, 1, 'uk'), +('NW6', '', '', '51.541', '-0.194', 0, 1, 'uk'), +('NW7', '', '', '51.615', '-0.235', 0, 1, 'uk'), +('NW8', '', '', '51.531', '-0.171', 0, 1, 'uk'), +('NW9', '', '', '51.586', '-0.254', 0, 1, 'uk'), +('OL1', '', '', '53.549', '-2.105', 0, 1, 'uk'), +('OL10', '', '', '53.59', '-2.222', 0, 1, 'uk'), +('OL11', '', '', '53.606', '-2.174', 0, 1, 'uk'), +('OL12', '', '', '53.635', '-2.164', 0, 1, 'uk'), +('OL13', '', '', '53.701', '-2.203', 0, 1, 'uk'), +('OL14', '', '', '53.714', '-2.099', 0, 1, 'uk'), +('OL15', '', '', '53.644', '-2.1', 0, 1, 'uk'), +('OL16', '', '', '53.612', '-2.131', 0, 1, 'uk'), +('OL2', '', '', '53.572', '-2.108', 0, 1, 'uk'), +('OL3', '', '', '53.553', '-2.009', 0, 1, 'uk'), +('OL4', '', '', '53.542', '-2.073', 0, 1, 'uk'), +('OL5', '', '', '53.517', '-2.038', 0, 1, 'uk'), +('OL6', '', '', '53.494', '-2.085', 0, 1, 'uk'), +('OL7', '', '', '53.49', '-2.105', 0, 1, 'uk'), +('OL8', '', '', '53.526', '-2.116', 0, 1, 'uk'), +('OL9', '', '', '53.539', '-2.142', 0, 1, 'uk'), +('OX1', '', '', '51.745', '-1.259', 0, 1, 'uk'), +('OX10', '', '', '51.608', '-1.127', 0, 1, 'uk'), +('OX11', '', '', '51.599', '-1.246', 0, 1, 'uk'), +('OX12', '', '', '51.594', '-1.425', 0, 1, 'uk'), +('OX13', '', '', '51.678', '-1.347', 0, 1, 'uk'), +('OX14', '', '', '51.668', '-1.275', 0, 1, 'uk'), +('OX15', '', '', '52.032', '-1.407', 0, 1, 'uk'), +('OX16', '', '', '52.062', '-1.34', 0, 1, 'uk'), +('OX17', '', '', '52.073', '-1.289', 0, 1, 'uk'), +('OX18', '', '', '51.762', '-1.591', 0, 1, 'uk'), +('OX2', '', '', '51.764', '-1.277', 0, 1, 'uk'), +('OX20', '', '', '51.856', '-1.358', 0, 1, 'uk'), +('OX25', '', '', '51.901', '-1.213', 0, 1, 'uk'), +('OX26', '', '', '51.901', '-1.151', 0, 1, 'uk'), +('OX27', '', '', '51.937', '-1.147', 0, 1, 'uk'), +('OX28', '', '', '51.785', '-1.487', 0, 1, 'uk'), +('OX29', '', '', '51.794', '-1.432', 0, 1, 'uk'), +('OX3', '', '', '51.761', '-1.214', 0, 1, 'uk'), +('OX33', '', '', '51.758', '-1.147', 0, 1, 'uk'), +('OX39', '', '', '51.701', '-0.913', 0, 1, 'uk'), +('OX4', '', '', '51.73', '-1.215', 0, 1, 'uk'), +('OX44', '', '', '51.7', '-1.13', 0, 1, 'uk'), +('OX49', '', '', '51.65', '-1', 0, 1, 'uk'), +('OX5', '', '', '51.829', '-1.281', 0, 1, 'uk'), +('OX6', '', '', '51.909', '-1.168', 0, 1, 'uk'), +('OX7', '', '', '51.911', '-1.528', 0, 1, 'uk'), +('OX8', '', '', '51.79', '-1.455', 0, 1, 'uk'), +('OX9', '', '', '51.738', '-0.982', 0, 1, 'uk'), +('PA1', '', '', '55.845', '-4.417', 0, 1, 'uk'), +('PA10', '', '', '55.833', '-4.551', 0, 1, 'uk'), +('PA11', '', '', '55.857', '-4.582', 0, 1, 'uk'), +('PA12', '', '', '55.796', '-4.623', 0, 1, 'uk'), +('PA13', '', '', '55.893', '-4.629', 0, 1, 'uk'), +('PA14', '', '', '55.927', '-4.663', 0, 1, 'uk'), +('PA15', '', '', '55.942', '-4.748', 0, 1, 'uk'), +('PA16', '', '', '55.944', '-4.796', 0, 1, 'uk'), +('PA17', '', '', '55.865', '-4.882', 0, 1, 'uk'), +('PA18', '', '', '55.889', '-4.887', 0, 1, 'uk'), +('PA19', '', '', '55.953', '-4.822', 0, 1, 'uk'), +('PA2', '', '', '55.829', '-4.434', 0, 1, 'uk'), +('PA20', '', '', '55.835', '-5.057', 0, 1, 'uk'), +('PA21', '', '', '55.901', '-5.248', 0, 1, 'uk'), +('PA22', '', '', '55.97', '-5.157', 0, 1, 'uk'), +('PA23', '', '', '55.955', '-4.932', 0, 1, 'uk'), +('PA24', '', '', '56.157', '-4.904', 0, 1, 'uk'), +('PA25', '', '', '56.216', '-5.04', 0, 1, 'uk'), +('PA26', '', '', '56.258', '-4.938', 0, 1, 'uk'), +('PA27', '', '', '56.154', '-5.084', 0, 1, 'uk'), +('PA28', '', '', '55.436', '-5.603', 0, 1, 'uk'), +('PA29', '', '', '55.804', '-5.477', 0, 1, 'uk'), +('PA3', '', '', '55.852', '-4.447', 0, 1, 'uk'), +('PA30', '', '', '56.014', '-5.448', 0, 1, 'uk'), +('PA31', '', '', '56.053', '-5.463', 0, 1, 'uk'), +('PA32', '', '', '56.203', '-5.117', 0, 1, 'uk'), +('PA33', '', '', '56.37', '-5.055', 0, 1, 'uk'), +('PA34', '', '', '56.403', '-5.499', 0, 1, 'uk'), +('PA35', '', '', '56.405', '-5.224', 0, 1, 'uk'), +('PA36', '', '', '56.521', '-4.771', 0, 1, 'uk'), +('PA37', '', '', '56.469', '-5.386', 0, 1, 'uk'), +('PA38', '', '', '56.592', '-5.335', 0, 1, 'uk'), +('PA39', '', '', '56.929557', '-5.849203', 0, 1, 'uk'), +('PA4', '', '', '55.875', '-4.396', 0, 1, 'uk'), +('PA40', '', '', '56.712968', '-4.971533', 0, 1, 'uk'), +('PA41', '', '', '55.674', '-5.742', 0, 1, 'uk'), +('PA42', '', '', '55.64', '-6.186', 0, 1, 'uk'), +('PA43', '', '', '55.756', '-6.283', 0, 1, 'uk'), +('PA44', '', '', '55.798', '-6.292', 0, 1, 'uk'), +('PA45', '', '', '55.82', '-6.166', 0, 1, 'uk'), +('PA46', '', '', '55.862', '-6.119', 0, 1, 'uk'), +('PA47', '', '', '55.682', '-6.503', 0, 1, 'uk'), +('PA48', '', '', '55.738', '-6.384', 0, 1, 'uk'), +('PA49', '', '', '55.782', '-6.394', 0, 1, 'uk'), +('PA5', '', '', '55.831', '-4.509', 0, 1, 'uk'), +('PA6', '', '', '55.864', '-4.534', 0, 1, 'uk'), +('PA60', '', '', '55.88', '-5.913', 0, 1, 'uk'), +('PA61', '', '', '56.072', '-6.202', 0, 1, 'uk'), +('PA62', '', '', '56.359', '-5.85', 0, 1, 'uk'), +('PA63', '', '', '56.382', '-5.715', 0, 1, 'uk'), +('PA64', '', '', '56.439', '-5.675', 0, 1, 'uk'), +('PA65', '', '', '56.469', '-5.728', 0, 1, 'uk'), +('PA66', '', '', '56.329', '-6.354', 0, 1, 'uk'), +('PA67', '', '', '56.314', '-6.232', 0, 1, 'uk'), +('PA68', '', '', '56.437', '-6.141', 0, 1, 'uk'), +('PA69', '', '', '56.38', '-6.088', 0, 1, 'uk'), +('PA7', '', '', '55.909', '-4.5', 0, 1, 'uk'), +('PA70', '', '', '56.364', '-6.033', 0, 1, 'uk'), +('PA71', '', '', '56.481', '-5.98', 0, 1, 'uk'), +('PA72', '', '', '56.518', '-5.964', 0, 1, 'uk'), +('PA73', '', '', '56.497', '-6.183', 0, 1, 'uk'), +('PA74', '', '', '56.533', '-6.229', 0, 1, 'uk'), +('PA75', '', '', '56.612', '-6.123', 0, 1, 'uk'), +('PA76', '', '', '56.334', '-6.394', 0, 1, 'uk'), +('PA77', '', '', '56.494', '-6.884', 0, 1, 'uk'), +('PA78', '', '', '56.625', '-6.545', 0, 1, 'uk'), +('PA8', '', '', '55.901', '-4.452', 0, 1, 'uk'), +('PA80', '', '', '56.954376', '-7.486023', 0, 1, 'uk'), +('PA81', '', '', '57.159642', '-7.321168', 0, 1, 'uk'), +('PA82', '', '', '57.603448', '-7.162478', 0, 1, 'uk'), +('PA9', '', '', '55.81', '-4.552', 0, 1, 'uk'), +('PE1', '', '', '52.587', '-0.238', 0, 1, 'uk'), +('PE10', '', '', '52.777', '-0.376', 0, 1, 'uk'), +('PE11', '', '', '52.807', '-0.166', 0, 1, 'uk'), +('PE12', '', '', '52.784', '0.029', 0, 1, 'uk'), +('PE13', '', '', '52.669', '0.139', 0, 1, 'uk'), +('PE14', '', '', '52.639', '0.211', 0, 1, 'uk'), +('PE15', '', '', '52.536', '0.087', 0, 1, 'uk'), +('PE16', '', '', '52.454', '0.05', 0, 1, 'uk'), +('PE17', '', '', '52.385017', '-0.003028', 0, 1, 'uk'), +('PE18', '', '', '52.320399', '-0.222161', 0, 1, 'uk'), +('PE19', '', '', '52.242', '-0.258', 0, 1, 'uk'), +('PE2', '', '', '52.561', '-0.263', 0, 1, 'uk'), +('PE20', '', '', '52.932', '-0.102', 0, 1, 'uk'), +('PE21', '', '', '52.975', '-0.021', 0, 1, 'uk'), +('PE22', '', '', '53.048', '0.045', 0, 1, 'uk'), +('PE23', '', '', '53.173', '0.091', 0, 1, 'uk'), +('PE24', '', '', '53.165', '0.268', 0, 1, 'uk'), +('PE25', '', '', '53.153', '0.337', 0, 1, 'uk'), +('PE26', '', '', '52.453', '-0.113', 0, 1, 'uk'), +('PE27', '', '', '52.334', '-0.076', 0, 1, 'uk'), +('PE28', '', '', '52.358', '-0.186', 0, 1, 'uk'), +('PE29', '', '', '52.334', '-0.178', 0, 1, 'uk'), +('PE3', '', '', '52.587', '-0.275', 0, 1, 'uk'), +('PE30', '', '', '52.759', '0.418', 0, 1, 'uk'), +('PE31', '', '', '52.876', '0.567', 0, 1, 'uk'), +('PE32', '', '', '52.73', '0.628', 0, 1, 'uk'), +('PE33', '', '', '52.649', '0.469', 0, 1, 'uk'), +('PE34', '', '', '52.724', '0.34', 0, 1, 'uk'), +('PE35', '', '', '52.825', '0.512', 0, 1, 'uk'), +('PE36', '', '', '52.936', '0.508', 0, 1, 'uk'), +('PE37', '', '', '52.644', '0.693', 0, 1, 'uk'), +('PE38', '', '', '52.589', '0.377', 0, 1, 'uk'), +('PE39', '', '', '52.527768', '0.397726', 0, 1, 'uk'), +('PE4', '', '', '52.612', '-0.266', 0, 1, 'uk'), +('PE5', '', '', '52.579', '-0.344', 0, 1, 'uk'), +('PE6', '', '', '52.656', '-0.255', 0, 1, 'uk'), +('PE7', '', '', '52.538', '-0.198', 0, 1, 'uk'), +('PE8', '', '', '52.527', '-0.442', 0, 1, 'uk'), +('PE9', '', '', '52.654', '-0.48', 0, 1, 'uk'), +('PH1', '', '', '56.421', '-3.475', 0, 1, 'uk'), +('PH10', '', '', '56.609', '-3.36', 0, 1, 'uk'), +('PH11', '', '', '56.639', '-3.234', 0, 1, 'uk'), +('PH12', '', '', '56.576', '-3.152', 0, 1, 'uk'), +('PH13', '', '', '56.537', '-3.274', 0, 1, 'uk'), +('PH14', '', '', '56.453', '-3.186', 0, 1, 'uk'), +('PH15', '', '', '56.61', '-3.941', 0, 1, 'uk'), +('PH16', '', '', '56.707', '-3.809', 0, 1, 'uk'), +('PH17', '', '', '56.688', '-4.382', 0, 1, 'uk'), +('PH18', '', '', '56.774', '-3.889', 0, 1, 'uk'), +('PH19', '', '', '56.935', '-4.255', 0, 1, 'uk'), +('PH2', '', '', '56.387', '-3.404', 0, 1, 'uk'), +('PH20', '', '', '57.054', '-4.155', 0, 1, 'uk'), +('PH21', '', '', '57.089', '-4.022', 0, 1, 'uk'), +('PH22', '', '', '57.198', '-3.806', 0, 1, 'uk'), +('PH23', '', '', '57.287', '-3.801', 0, 1, 'uk'), +('PH24', '', '', '57.254', '-3.748', 0, 1, 'uk'), +('PH25', '', '', '57.262', '-3.647', 0, 1, 'uk'), +('PH26', '', '', '57.33', '-3.605', 0, 1, 'uk'), +('PH3', '', '', '56.302', '-3.704', 0, 1, 'uk'), +('PH30', '', '', '56.792', '-4.6', 0, 1, 'uk'), +('PH31', '', '', '56.892', '-4.816', 0, 1, 'uk'), +('PH32', '', '', '57.145', '-4.683', 0, 1, 'uk'), +('PH33', '', '', '56.822', '-5.112', 0, 1, 'uk'), +('PH34', '', '', '56.926', '-4.926', 0, 1, 'uk'), +('PH35', '', '', '57.076', '-4.93', 0, 1, 'uk'), +('PH36', '', '', '56.721', '-5.866', 0, 1, 'uk'), +('PH37', '', '', '56.872395', '-5.449192', 0, 1, 'uk'), +('PH38', '', '', '56.845', '-5.747', 0, 1, 'uk'), +('PH39', '', '', '56.913', '-5.841', 0, 1, 'uk'), +('PH4', '', '', '56.261', '-3.783', 0, 1, 'uk'), +('PH40', '', '', '56.964', '-5.786', 0, 1, 'uk'), +('PH41', '', '', '57.004', '-5.832', 0, 1, 'uk'), +('PH42', '', '', '56.902', '-6.142', 0, 1, 'uk'), +('PH43', '', '', '57.016', '-6.28', 0, 1, 'uk'), +('PH44', '', '', '57.057', '-6.503', 0, 1, 'uk'), +('PH49', '', '', '56.675', '-5.11', 0, 1, 'uk'), +('PH5', '', '', '56.329', '-3.828', 0, 1, 'uk'), +('PH50', '', '', '56.714', '-4.964', 0, 1, 'uk'), +('PH6', '', '', '56.372', '-3.995', 0, 1, 'uk'), +('PH7', '', '', '56.373', '-3.826', 0, 1, 'uk'), +('PH8', '', '', '56.562', '-3.598', 0, 1, 'uk'), +('PH9', '', '', '56.651', '-3.691', 0, 1, 'uk'), +('PL1', '', '', '50.371', '-4.153', 0, 1, 'uk'), +('PL10', '', '', '50.345', '-4.211', 0, 1, 'uk'), +('PL11', '', '', '50.373', '-4.25', 0, 1, 'uk'), +('PL12', '', '', '50.419', '-4.248', 0, 1, 'uk'), +('PL13', '', '', '50.357', '-4.475', 0, 1, 'uk'), +('PL14', '', '', '50.463', '-4.465', 0, 1, 'uk'), +('PL15', '', '', '50.632', '-4.399', 0, 1, 'uk'), +('PL16', '', '', '50.646', '-4.267', 0, 1, 'uk'), +('PL17', '', '', '50.516', '-4.305', 0, 1, 'uk'), +('PL18', '', '', '50.515', '-4.219', 0, 1, 'uk'), +('PL19', '', '', '50.556', '-4.154', 0, 1, 'uk'), +('PL2', '', '', '50.389', '-4.162', 0, 1, 'uk'), +('PL20', '', '', '50.501', '-4.1', 0, 1, 'uk'), +('PL21', '', '', '50.385', '-3.918', 0, 1, 'uk'), +('PL22', '', '', '50.403', '-4.651', 0, 1, 'uk'), +('PL23', '', '', '50.337', '-4.635', 0, 1, 'uk'), +('PL24', '', '', '50.355', '-4.71', 0, 1, 'uk'), +('PL25', '', '', '50.341', '-4.778', 0, 1, 'uk'), +('PL26', '', '', '50.342', '-4.825', 0, 1, 'uk'), +('PL27', '', '', '50.522', '-4.874', 0, 1, 'uk'), +('PL28', '', '', '50.533', '-4.966', 0, 1, 'uk'), +('PL29', '', '', '50.585', '-4.829', 0, 1, 'uk'), +('PL3', '', '', '50.387', '-4.125', 0, 1, 'uk'), +('PL30', '', '', '50.5', '-4.728', 0, 1, 'uk'), +('PL31', '', '', '50.469', '-4.721', 0, 1, 'uk'), +('PL32', '', '', '50.633', '-4.66', 0, 1, 'uk'), +('PL33', '', '', '50.621', '-4.731', 0, 1, 'uk'), +('PL34', '', '', '50.659', '-4.742', 0, 1, 'uk'), +('PL35', '', '', '50.684', '-4.684', 0, 1, 'uk'), +('PL3O', '', '', '50.430824', '-4.696304', 0, 1, 'uk'), +('PL4', '', '', '50.375', '-4.128', 0, 1, 'uk'), +('PL5', '', '', '50.41', '-4.166', 0, 1, 'uk'), +('PL6', '', '', '50.418', '-4.116', 0, 1, 'uk'), +('PL7', '', '', '50.392', '-4.045', 0, 1, 'uk'), +('PL8', '', '', '50.335', '-4.012', 0, 1, 'uk'), +('PL9', '', '', '50.354', '-4.088', 0, 1, 'uk'), +('PO1', '', '', '50.799', '-1.088', 0, 1, 'uk'), +('PO10', '', '', '50.851', '-0.929', 0, 1, 'uk'), +('PO11', '', '', '50.791', '-0.975', 0, 1, 'uk'), +('PO12', '', '', '50.797', '-1.141', 0, 1, 'uk'), +('PO13', '', '', '50.812', '-1.177', 0, 1, 'uk'), +('PO14', '', '', '50.837', '-1.218', 0, 1, 'uk'), +('PO15', '', '', '50.862', '-1.219', 0, 1, 'uk'), +('PO16', '', '', '50.85', '-1.159', 0, 1, 'uk'), +('PO17', '', '', '50.889', '-1.169', 0, 1, 'uk'), +('PO18', '', '', '50.864', '-0.814', 0, 1, 'uk'), +('PO19', '', '', '50.837', '-0.777', 0, 1, 'uk'), +('PO1O', '', '', '50.844491', '-0.927811', 0, 1, 'uk'), +('PO2', '', '', '50.816', '-1.077', 0, 1, 'uk'), +('PO20', '', '', '50.783', '-0.786', 0, 1, 'uk'), +('PO21', '', '', '50.784', '-0.696', 0, 1, 'uk'), +('PO22', '', '', '50.798', '-0.648', 0, 1, 'uk'), +('PO3', '', '', '50.816', '-1.059', 0, 1, 'uk'), +('PO30', '', '', '50.691', '-1.313', 0, 1, 'uk'), +('PO31', '', '', '50.753', '-1.306', 0, 1, 'uk'), +('PO32', '', '', '50.75', '-1.28', 0, 1, 'uk'), +('PO33', '', '', '50.721', '-1.169', 0, 1, 'uk'), +('PO34', '', '', '50.716', '-1.112', 0, 1, 'uk'), +('PO35', '', '', '50.686', '-1.084', 0, 1, 'uk'), +('PO36', '', '', '50.658', '-1.162', 0, 1, 'uk'), +('PO37', '', '', '50.632', '-1.177', 0, 1, 'uk'), +('PO38', '', '', '50.604', '-1.241', 0, 1, 'uk'), +('PO39', '', '', '50.68', '-1.538', 0, 1, 'uk'), +('PO4', '', '', '50.79', '-1.062', 0, 1, 'uk'), +('PO40', '', '', '50.682', '-1.52', 0, 1, 'uk'), +('PO41', '', '', '50.699', '-1.477', 0, 1, 'uk'), +('PO5', '', '', '50.789', '-1.085', 0, 1, 'uk'), +('PO6', '', '', '50.846', '-1.069', 0, 1, 'uk'), +('PO7', '', '', '50.882', '-1.038', 0, 1, 'uk'), +('PO8', '', '', '50.911', '-1.012', 0, 1, 'uk'), +('PO9', '', '', '50.863', '-0.982', 0, 1, 'uk'), +('PR1', '', '', '53.757', '-2.701', 0, 1, 'uk'), +('PR2', '', '', '53.778', '-2.708', 0, 1, 'uk'), +('PR25', '', '', '53.694', '-2.693', 0, 1, 'uk'), +('PR26', '', '', '53.687', '-2.74', 0, 1, 'uk'), +('PR3', '', '', '53.869', '-2.716', 0, 1, 'uk'), +('PR4', '', '', '53.754', '-2.833', 0, 1, 'uk'), +('PR5', '', '', '53.731', '-2.656', 0, 1, 'uk'), +('PR6', '', '', '53.667', '-2.609', 0, 1, 'uk'), +('PR7', '', '', '53.645', '-2.652', 0, 1, 'uk'), +('PR8', '', '', '53.626', '-3.01', 0, 1, 'uk'), +('PR9', '', '', '53.66', '-2.968', 0, 1, 'uk'), +('PR98', '', '', '53.678584', '-2.923502', 0, 1, 'uk'), +('RG1', '', '', '51.454', '-0.969', 0, 1, 'uk'), +('RG10', '', '', '51.48', '-0.862', 0, 1, 'uk'), +('RG11', '', '', '51.405487', '-0.846081', 0, 1, 'uk'), +('RG12', '', '', '51.407', '-0.749', 0, 1, 'uk'), +('RG13', '', '', '51.408329', '-1.295515', 0, 1, 'uk'), +('RG14', '', '', '51.399', '-1.322', 0, 1, 'uk'), +('RG16', '', '', '51.449824', '-1.311736', 0, 1, 'uk'), +('RG17', '', '', '51.44', '-1.488', 0, 1, 'uk'), +('RG18', '', '', '51.433', '-1.242', 0, 1, 'uk'), +('RG19', '', '', '51.394', '-1.241', 0, 1, 'uk'), +('RG2', '', '', '51.427', '-0.955', 0, 1, 'uk'), +('RG20', '', '', '51.403', '-1.335', 0, 1, 'uk'), +('RG21', '', '', '51.266', '-1.089', 0, 1, 'uk'), +('RG22', '', '', '51.25', '-1.122', 0, 1, 'uk'), +('RG23', '', '', '51.26', '-1.146', 0, 1, 'uk'), +('RG24', '', '', '51.281', '-1.071', 0, 1, 'uk'), +('RG25', '', '', '51.228', '-1.162', 0, 1, 'uk'), +('RG26', '', '', '51.35', '-1.119', 0, 1, 'uk'), +('RG27', '', '', '51.3', '-0.941', 0, 1, 'uk'), +('RG28', '', '', '51.234', '-1.334', 0, 1, 'uk'), +('RG29', '', '', '51.247', '-0.946', 0, 1, 'uk'), +('RG3', '', '', '51.455313', '-0.99163', 0, 1, 'uk'), +('RG30', '', '', '51.451', '-1.012', 0, 1, 'uk'), +('RG31', '', '', '51.456', '-1.041', 0, 1, 'uk'), +('RG4', '', '', '51.48', '-0.968', 0, 1, 'uk'), +('RG40', '', '', '51.399', '-0.835', 0, 1, 'uk'), +('RG41', '', '', '51.415', '-0.857', 0, 1, 'uk'), +('RG42', '', '', '51.427', '-0.754', 0, 1, 'uk'), +('RG45', '', '', '51.375', '-0.8', 0, 1, 'uk'), +('RG5', '', '', '51.452', '-0.906', 0, 1, 'uk'), +('RG54', '', '', '51.450141', '-0.904247', 0, 1, 'uk'), +('RG6', '', '', '51.439', '-0.931', 0, 1, 'uk'), +('RG7', '', '', '51.398', '-1.077', 0, 1, 'uk'), +('RG8', '', '', '51.505', '-1.105', 0, 1, 'uk'), +('RG9', '', '', '51.544', '-0.922', 0, 1, 'uk'), +('RG91', '', '', '51.529774', '-0.904412', 0, 1, 'uk'), +('RG92', '', '', '51.417732', '-1.004882', 0, 1, 'uk'), +('RH1', '', '', '51.237', '-0.157', 0, 1, 'uk'), +('RH10', '', '', '51.117', '-0.157', 0, 1, 'uk'), +('RH11', '', '', '51.111', '-0.205', 0, 1, 'uk'), +('RH12', '', '', '51.076', '-0.333', 0, 1, 'uk'), +('RH13', '', '', '51.037', '-0.325', 0, 1, 'uk'), +('RH14', '', '', '51.032', '-0.483', 0, 1, 'uk'), +('RH15', '', '', '50.957', '-0.133', 0, 1, 'uk'), +('RH16', '', '', '51.002', '-0.097', 0, 1, 'uk'), +('RH17', '', '', '51.021', '-0.115', 0, 1, 'uk'), +('RH18', '', '', '51.097', '0.031', 0, 1, 'uk'), +('RH19', '', '', '51.125', '-0.012', 0, 1, 'uk'), +('RH2', '', '', '51.235', '-0.202', 0, 1, 'uk'), +('RH20', '', '', '50.937', '-0.47', 0, 1, 'uk'), +('RH3', '', '', '51.232', '-0.279', 0, 1, 'uk'), +('RH4', '', '', '51.229', '-0.334', 0, 1, 'uk'), +('RH5', '', '', '51.194', '-0.341', 0, 1, 'uk'), +('RH6', '', '', '51.171', '-0.162', 0, 1, 'uk'), +('RH7', '', '', '51.174', '-0.016', 0, 1, 'uk'), +('RH8', '', '', '51.251', '0.003', 0, 1, 'uk'), +('RH9', '', '', '51.236', '-0.068', 0, 1, 'uk'), +('RM1', '', '', '51.581', '0.184', 0, 1, 'uk'), +('RM10', '', '', '51.545', '0.159', 0, 1, 'uk'), +('RM11', '', '', '51.57', '0.22', 0, 1, 'uk'), +('RM12', '', '', '51.553', '0.209', 0, 1, 'uk'), +('RM13', '', '', '51.524', '0.195', 0, 1, 'uk'), +('RM14', '', '', '51.556', '0.264', 0, 1, 'uk'), +('RM15', '', '', '51.508', '0.278', 0, 1, 'uk'), +('RM16', '', '', '51.492', '0.341', 0, 1, 'uk'), +('RM17', '', '', '51.479', '0.33', 0, 1, 'uk'), +('RM18', '', '', '51.467', '0.377', 0, 1, 'uk'), +('RM19', '', '', '51.482', '0.249', 0, 1, 'uk'), +('RM2', '', '', '51.583', '0.202', 0, 1, 'uk'), +('RM20', '', '', '51.478', '0.289', 0, 1, 'uk'), +('RM3', '', '', '51.602', '0.226', 0, 1, 'uk'), +('RM4', '', '', '51.633', '0.16', 0, 1, 'uk'), +('RM5', '', '', '51.599', '0.167', 0, 1, 'uk'), +('RM6', '', '', '51.575', '0.133', 0, 1, 'uk'), +('RM7', '', '', '51.574', '0.17', 0, 1, 'uk'), +('RM8', '', '', '51.556', '0.132', 0, 1, 'uk'), +('RM9', '', '', '51.54', '0.136', 0, 1, 'uk'), +('S02', '', '', '50.944133', '-1.400936', 0, 1, 'uk'), +('S05', '', '', '50.973919', '-1.408643', 0, 1, 'uk'), +('S1', '', '', '53.38', '-1.468', 0, 1, 'uk'), +('S10', '', '', '53.377', '-1.517', 0, 1, 'uk'), +('S11', '', '', '53.361', '-1.506', 0, 1, 'uk'), +('S12', '', '', '53.348', '-1.405', 0, 1, 'uk'), +('S13', '', '', '53.364', '-1.383', 0, 1, 'uk'), +('S14', '', '', '53.346', '-1.443', 0, 1, 'uk'), +('S17', '', '', '53.321', '-1.526', 0, 1, 'uk'), +('S18', '', '', '53.299', '-1.472', 0, 1, 'uk'), +('S2', '', '', '53.37', '-1.446', 0, 1, 'uk'), +('S20', '', '', '53.335', '-1.35', 0, 1, 'uk'), +('S21', '', '', '53.312', '-1.339', 0, 1, 'uk'), +('S25', '', '', '53.369', '-1.214', 0, 1, 'uk'), +('S26', '', '', '53.357', '-1.287', 0, 1, 'uk'), +('S3', '', '', '53.387', '-1.472', 0, 1, 'uk'), +('S30', '', '', '53.412234', '-1.831287', 0, 1, 'uk'), +('S31', '', '', '53.338184', '-1.25374', 0, 1, 'uk'), +('S32', '', '', '53.295', '-1.638', 0, 1, 'uk'), +('S33', '', '', '53.341', '-1.721', 0, 1, 'uk'), +('S35', '', '', '53.457', '-1.495', 0, 1, 'uk'), +('S36', '', '', '53.503', '-1.613', 0, 1, 'uk'), +('S4', '', '', '53.399', '-1.45', 0, 1, 'uk'), +('S40', '', '', '53.234', '-1.446', 0, 1, 'uk'), +('S41', '', '', '53.247', '-1.427', 0, 1, 'uk'), +('S42', '', '', '53.201', '-1.422', 0, 1, 'uk'), +('S43', '', '', '53.267', '-1.342', 0, 1, 'uk'), +('S44', '', '', '53.225', '-1.313', 0, 1, 'uk'), +('S45', '', '', '53.166', '-1.421', 0, 1, 'uk'), +('S5', '', '', '53.422', '-1.462', 0, 1, 'uk'), +('S6', '', '', '53.402', '-1.51', 0, 1, 'uk'), +('S60', '', '', '53.414', '-1.348', 0, 1, 'uk'), +('S61', '', '', '53.443', '-1.393', 0, 1, 'uk'), +('S62', '', '', '53.465', '-1.347', 0, 1, 'uk'), +('S63', '', '', '53.518', '-1.329', 0, 1, 'uk'), +('S64', '', '', '53.491', '-1.298', 0, 1, 'uk'), +('S65', '', '', '53.436', '-1.32', 0, 1, 'uk'), +('S66', '', '', '53.42', '-1.242', 0, 1, 'uk'), +('S7', '', '', '53.354', '-1.489', 0, 1, 'uk'), +('S70', '', '', '53.541', '-1.473', 0, 1, 'uk'), +('S71', '', '', '53.573', '-1.456', 0, 1, 'uk'), +('S72', '', '', '53.578', '-1.391', 0, 1, 'uk'), +('S73', '', '', '53.524', '-1.393', 0, 1, 'uk'), +('S74', '', '', '53.501', '-1.439', 0, 1, 'uk'), +('S75', '', '', '53.562', '-1.519', 0, 1, 'uk'), +('S8', '', '', '53.34', '-1.476', 0, 1, 'uk'), +('S80', '', '', '53.292', '-1.15', 0, 1, 'uk'), +('S81', '', '', '53.338', '-1.122', 0, 1, 'uk'), +('S9', '', '', '53.398', '-1.417', 0, 1, 'uk'), +('SA1', '', '', '51.627', '-3.939', 0, 1, 'uk'), +('SA10', '', '', '51.687', '-3.799', 0, 1, 'uk'), +('SA11', '', '', '51.674', '-3.761', 0, 1, 'uk'), +('SA12', '', '', '51.607', '-3.794', 0, 1, 'uk'), +('SA13', '', '', '51.606', '-3.725', 0, 1, 'uk'), +('SA14', '', '', '51.733', '-4.107', 0, 1, 'uk'), +('SA15', '', '', '51.7', '-4.167', 0, 1, 'uk'), +('SA16', '', '', '51.689', '-4.255', 0, 1, 'uk'), +('SA17', '', '', '51.758', '-4.286', 0, 1, 'uk'), +('SA18', '', '', '51.798', '-3.958', 0, 1, 'uk'), +('SA19', '', '', '51.952', '-3.948', 0, 1, 'uk'), +('SA2', '', '', '51.62', '-3.994', 0, 1, 'uk'), +('SA20', '', '', '52.01', '-3.786', 0, 1, 'uk'), +('SA3', '', '', '51.58', '-4.051', 0, 1, 'uk'), +('SA31', '', '', '51.856', '-4.307', 0, 1, 'uk'), +('SA32', '', '', '51.886', '-4.171', 0, 1, 'uk'), +('SA33', '', '', '51.85', '-4.436', 0, 1, 'uk'), +('SA34', '', '', '51.853', '-4.619', 0, 1, 'uk'), +('SA35', '', '', '51.973', '-4.56', 0, 1, 'uk'), +('SA36', '', '', '51.958', '-4.607', 0, 1, 'uk'), +('SA37', '', '', '52.017', '-4.592', 0, 1, 'uk'), +('SA38', '', '', '52.04', '-4.474', 0, 1, 'uk'), +('SA39', '', '', '52.02', '-4.241', 0, 1, 'uk'), +('SA4', '', '', '51.671', '-4.048', 0, 1, 'uk'), +('SA40', '', '', '52.084', '-4.174', 0, 1, 'uk'), +('SA41', '', '', '51.997', '-4.706', 0, 1, 'uk'), +('SA42', '', '', '52.015', '-4.852', 0, 1, 'uk'), +('SA43', '', '', '52.086', '-4.629', 0, 1, 'uk'), +('SA44', '', '', '52.086', '-4.371', 0, 1, 'uk'), +('SA45', '', '', '52.208', '-4.358', 0, 1, 'uk'), +('SA46', '', '', '52.233', '-4.249', 0, 1, 'uk'), +('SA47', '', '', '52.191', '-4.295', 0, 1, 'uk'), +('SA48', '', '', '52.144', '-4.111', 0, 1, 'uk'), +('SA5', '', '', '51.649', '-3.969', 0, 1, 'uk'), +('SA6', '', '', '51.675', '-3.921', 0, 1, 'uk'), +('SA61', '', '', '51.8', '-4.973', 0, 1, 'uk'), +('SA62', '', '', '51.841', '-5.063', 0, 1, 'uk'), +('SA63', '', '', '51.874', '-4.854', 0, 1, 'uk'), +('SA64', '', '', '52.001', '-5.011', 0, 1, 'uk'), +('SA65', '', '', '51.988', '-4.968', 0, 1, 'uk'), +('SA66', '', '', '51.881', '-4.744', 0, 1, 'uk'), +('SA67', '', '', '51.782', '-4.732', 0, 1, 'uk'), +('SA68', '', '', '51.729', '-4.767', 0, 1, 'uk'), +('SA69', '', '', '51.71', '-4.705', 0, 1, 'uk'), +('SA7', '', '', '51.662', '-3.89', 0, 1, 'uk'), +('SA70', '', '', '51.672', '-4.738', 0, 1, 'uk'), +('SA71', '', '', '51.667', '-4.929', 0, 1, 'uk'), +('SA72', '', '', '51.692', '-4.934', 0, 1, 'uk'), +('SA73', '', '', '51.717', '-5.012', 0, 1, 'uk'), +('SA8', '', '', '51.721', '-3.847', 0, 1, 'uk'), +('SA9', '', '', '51.781', '-3.767', 0, 1, 'uk'), +('SE1', '', '', '51.498', '-0.089', 0, 1, 'uk'), +('SE10', '', '', '51.481', '-0.001', 0, 1, 'uk'), +('SE11', '', '', '51.489', '-0.109', 0, 1, 'uk'), +('SE12', '', '', '51.445', '0.025', 0, 1, 'uk'), +('SE13', '', '', '51.459', '-0.008', 0, 1, 'uk'), +('SE14', '', '', '51.475', '-0.041', 0, 1, 'uk'), +('SE15', '', '', '51.472', '-0.064', 0, 1, 'uk'), +('SE16', '', '', '51.496', '-0.052', 0, 1, 'uk'), +('SE17', '', '', '51.488', '-0.092', 0, 1, 'uk'), +('SE18', '', '', '51.484', '0.074', 0, 1, 'uk'), +('SE19', '', '', '51.418', '-0.084', 0, 1, 'uk'), +('SE2', '', '', '51.489', '0.117', 0, 1, 'uk'), +('SE20', '', '', '51.412', '-0.057', 0, 1, 'uk'), +('SE21', '', '', '51.438', '-0.087', 0, 1, 'uk'), +('SE22', '', '', '51.454', '-0.071', 0, 1, 'uk'), +('SE23', '', '', '51.44', '-0.048', 0, 1, 'uk'), +('SE24', '', '', '51.454', '-0.099', 0, 1, 'uk'), +('SE25', '', '', '51.397', '-0.075', 0, 1, 'uk'), +('SE26', '', '', '51.427', '-0.053', 0, 1, 'uk'), +('SE27', '', '', '51.43', '-0.1', 0, 1, 'uk'), +('SE28', '', '', '51.502', '0.109', 0, 1, 'uk'), +('SE3', '', '', '51.469', '0.02', 0, 1, 'uk'), +('SE4', '', '', '51.461', '-0.033', 0, 1, 'uk'), +('SE5', '', '', '51.473', '-0.091', 0, 1, 'uk'), +('SE6', '', '', '51.438', '-0.015', 0, 1, 'uk'), +('SE7', '', '', '51.484', '0.036', 0, 1, 'uk'), +('SE8', '', '', '51.481', '-0.028', 0, 1, 'uk'), +('SE9', '', '', '51.445', '0.057', 0, 1, 'uk'), +('SG1', '', '', '51.911', '-0.195', 0, 1, 'uk'), +('SG10', '', '', '51.845', '0.072', 0, 1, 'uk'), +('SG11', '', '', '51.881', '0.032', 0, 1, 'uk'), +('SG12', '', '', '51.813', '-0.016', 0, 1, 'uk'), +('SG13', '', '', '51.787', '-0.069', 0, 1, 'uk'), +('SG14', '', '', '51.807', '-0.091', 0, 1, 'uk'), +('SG15', '', '', '52.013', '-0.262', 0, 1, 'uk'), +('SG16', '', '', '52.015', '-0.296', 0, 1, 'uk'), +('SG17', '', '', '52.034', '-0.33', 0, 1, 'uk'), +('SG18', '', '', '52.082', '-0.266', 0, 1, 'uk'), +('SG19', '', '', '52.139', '-0.241', 0, 1, 'uk'), +('SG2', '', '', '51.896', '-0.165', 0, 1, 'uk'), +('SG3', '', '', '51.86', '-0.181', 0, 1, 'uk'), +('SG4', '', '', '51.921', '-0.259', 0, 1, 'uk'), +('SG5', '', '', '51.967', '-0.286', 0, 1, 'uk'), +('SG6', '', '', '51.979', '-0.221', 0, 1, 'uk'), +('SG7', '', '', '52.004', '-0.174', 0, 1, 'uk'), +('SG8', '', '', '52.064', '-0.014', 0, 1, 'uk'), +('SG9', '', '', '51.946', '-0.007', 0, 1, 'uk'), +('SK1', '', '', '53.408', '-2.15', 0, 1, 'uk'), +('SK10', '', '', '53.278', '-2.129', 0, 1, 'uk'), +('SK11', '', '', '53.247', '-2.143', 0, 1, 'uk'), +('SK12', '', '', '53.351', '-2.091', 0, 1, 'uk'), +('SK13', '', '', '53.448', '-1.963', 0, 1, 'uk'), +('SK14', '', '', '53.451', '-2.055', 0, 1, 'uk'), +('SK15', '', '', '53.486', '-2.046', 0, 1, 'uk'), +('SK16', '', '', '53.474', '-2.082', 0, 1, 'uk'), +('SK17', '', '', '53.244', '-1.879', 0, 1, 'uk'), +('SK2', '', '', '53.394', '-2.132', 0, 1, 'uk'), +('SK22', '', '', '53.373', '-1.985', 0, 1, 'uk'), +('SK23', '', '', '53.328', '-1.949', 0, 1, 'uk'), +('SK3', '', '', '53.398', '-2.17', 0, 1, 'uk'), +('SK4', '', '', '53.419', '-2.179', 0, 1, 'uk'), +('SK43', '', '', '53.418512', '-2.200317', 0, 1, 'uk'), +('SK5', '', '', '53.434', '-2.152', 0, 1, 'uk'), +('SK6', '', '', '53.405', '-2.08', 0, 1, 'uk'), +('SK7', '', '', '53.37', '-2.141', 0, 1, 'uk'), +('SK8', '', '', '53.38', '-2.207', 0, 1, 'uk'), +('SK9', '', '', '53.327', '-2.23', 0, 1, 'uk'), +('SL0', '', '', '51.524', '-0.514', 0, 1, 'uk'), +('SL1', '', '', '51.517', '-0.619', 0, 1, 'uk'), +('SL2', '', '', '51.534', '-0.603', 0, 1, 'uk'), +('SL3', '', '', '51.499', '-0.552', 0, 1, 'uk'), +('SL4', '', '', '51.475', '-0.625', 0, 1, 'uk'), +('SL5', '', '', '51.405', '-0.661', 0, 1, 'uk'), +('SL6', '', '', '51.523', '-0.726', 0, 1, 'uk'), +('SL7', '', '', '51.574', '-0.776', 0, 1, 'uk'), +('SL8', '', '', '51.578', '-0.707', 0, 1, 'uk'), +('SL9', '', '', '51.597', '-0.554', 0, 1, 'uk'), +('SM1', '', '', '51.366', '-0.191', 0, 1, 'uk'), +('SM2', '', '', '51.352', '-0.197', 0, 1, 'uk'), +('SM3', '', '', '51.37', '-0.213', 0, 1, 'uk'), +('SM4', '', '', '51.392', '-0.199', 0, 1, 'uk'), +('SM5', '', '', '51.368', '-0.166', 0, 1, 'uk'), +('SM6', '', '', '51.36', '-0.143', 0, 1, 'uk'), +('SM7', '', '', '51.323', '-0.2', 0, 1, 'uk'), +('SN1', '', '', '51.557', '-1.774', 0, 1, 'uk'), +('SN10', '', '', '51.336', '-1.986', 0, 1, 'uk'), +('SN11', '', '', '51.439', '-1.999', 0, 1, 'uk'), +('SN12', '', '', '51.372', '-2.137', 0, 1, 'uk'), +('SN13', '', '', '51.424', '-2.211', 0, 1, 'uk'), +('SN14', '', '', '51.475', '-2.194', 0, 1, 'uk'), +('SN15', '', '', '51.473', '-2.079', 0, 1, 'uk'), +('SN16', '', '', '51.593', '-2.09', 0, 1, 'uk'), +('SN2', '', '', '51.579', '-1.782', 0, 1, 'uk'), +('SN25', '', '', '51.591', '-1.796', 0, 1, 'uk'), +('SN26', '', '', '51.611', '-1.783', 0, 1, 'uk'), +('SN3', '', '', '51.561', '-1.743', 0, 1, 'uk'), +('SN4', '', '', '51.531', '-1.819', 0, 1, 'uk'), +('SN5', '', '', '51.565', '-1.837', 0, 1, 'uk'), +('SN6', '', '', '51.62', '-1.741', 0, 1, 'uk'), +('SN7', '', '', '51.649', '-1.564', 0, 1, 'uk'), +('SN8', '', '', '51.407', '-1.685', 0, 1, 'uk'), +('SN9', '', '', '51.324', '-1.786', 0, 1, 'uk'), +('SO1', '', '', '50.96954', '-1.58632', 0, 1, 'uk'), +('SO14', '', '', '50.908', '-1.395', 0, 1, 'uk'), +('SO15', '', '', '50.916', '-1.423', 0, 1, 'uk'), +('SO16', '', '', '50.935', '-1.431', 0, 1, 'uk'), +('SO17', '', '', '50.926', '-1.394', 0, 1, 'uk'), +('SO18', '', '', '50.924', '-1.36', 0, 1, 'uk'), +('SO19', '', '', '50.902', '-1.354', 0, 1, 'uk'), +('SO2', '', '', '50.92018', '-1.401528', 0, 1, 'uk'), +('SO20', '', '', '51.114', '-1.505', 0, 1, 'uk'), +('SO21', '', '', '51.075', '-1.314', 0, 1, 'uk'), +('SO22', '', '', '51.065', '-1.331', 0, 1, 'uk'), +('SO23', '', '', '51.067', '-1.308', 0, 1, 'uk'), +('SO24', '', '', '51.084', '-1.147', 0, 1, 'uk'), +('SO30', '', '', '50.919', '-1.306', 0, 1, 'uk'), +('SO31', '', '', '50.869', '-1.296', 0, 1, 'uk'), +('SO32', '', '', '50.948', '-1.208', 0, 1, 'uk'), +('SO4', '', '', '50.819376', '-1.307477', 0, 1, 'uk'), +('SO40', '', '', '50.915', '-1.5', 0, 1, 'uk'), +('SO41', '', '', '50.755', '-1.565', 0, 1, 'uk'), +('SO42', '', '', '50.81', '-1.534', 0, 1, 'uk'), +('SO43', '', '', '50.887', '-1.583', 0, 1, 'uk'), +('SO45', '', '', '50.847', '-1.394', 0, 1, 'uk'), +('SO50', '', '', '50.969', '-1.339', 0, 1, 'uk'), +('SO51', '', '', '50.994', '-1.503', 0, 1, 'uk'), +('SO52', '', '', '50.977', '-1.441', 0, 1, 'uk'), +('SO53', '', '', '50.984', '-1.38', 0, 1, 'uk'), +('SP1', '', '', '51.074', '-1.789', 0, 1, 'uk'), +('SP10', '', '', '51.211', '-1.483', 0, 1, 'uk'), +('SP11', '', '', '51.227', '-1.514', 0, 1, 'uk'), +('SP2', '', '', '51.074', '-1.825', 0, 1, 'uk'), +('SP3', '', '', '51.101', '-2.006', 0, 1, 'uk'), +('SP4', '', '', '51.165', '-1.764', 0, 1, 'uk'), +('SP5', '', '', '51.023', '-1.772', 0, 1, 'uk'), +('SP6', '', '', '50.936', '-1.801', 0, 1, 'uk'), +('SP7', '', '', '51.004', '-2.183', 0, 1, 'uk'), +('SP8', '', '', '51.037', '-2.289', 0, 1, 'uk'), +('SP9', '', '', '51.23', '-1.66', 0, 1, 'uk'), +('SQ2', '', '', '51.620921', '-4.017007', 0, 1, 'uk'), +('SR1', '', '', '54.907', '-1.379', 0, 1, 'uk'), +('SR2', '', '', '54.887', '-1.376', 0, 1, 'uk'), +('SR3', '', '', '54.877', '-1.415', 0, 1, 'uk'), +('SR4', '', '', '54.901', '-1.424', 0, 1, 'uk'), +('SR5', '', '', '54.924', '-1.424', 0, 1, 'uk'), +('SR6', '', '', '54.935', '-1.378', 0, 1, 'uk'), +('SR7', '', '', '54.83', '-1.362', 0, 1, 'uk'), +('SR8', '', '', '54.766', '-1.335', 0, 1, 'uk'), +('SR9', '', '', '54.902', '-1.374', 0, 1, 'uk'), +('SS0', '', '', '51.546', '0.692', 0, 1, 'uk'), +('SS1', '', '', '51.537', '0.733', 0, 1, 'uk'), +('SS11', '', '', '51.615', '0.538', 0, 1, 'uk'), +('SS12', '', '', '51.605', '0.522', 0, 1, 'uk'), +('SS13', '', '', '51.574', '0.51', 0, 1, 'uk'), +('SS14', '', '', '51.575', '0.476', 0, 1, 'uk'), +('SS15', '', '', '51.577', '0.431', 0, 1, 'uk'), +('SS16', '', '', '51.562', '0.454', 0, 1, 'uk'), +('SS17', '', '', '51.521', '0.441', 0, 1, 'uk'), +('SS2', '', '', '51.55', '0.717', 0, 1, 'uk'), +('SS3', '', '', '51.543', '0.793', 0, 1, 'uk'), +('SS4', '', '', '51.594', '0.715', 0, 1, 'uk'), +('SS5', '', '', '51.607', '0.65', 0, 1, 'uk'), +('SS6', '', '', '51.588', '0.609', 0, 1, 'uk'), +('SS7', '', '', '51.562', '0.579', 0, 1, 'uk'), +('SS8', '', '', '51.522', '0.591', 0, 1, 'uk'), +('SS9', '', '', '51.554', '0.652', 0, 1, 'uk'), +('ST1', '', '', '53.026', '-2.172', 0, 1, 'uk'), +('ST10', '', '', '52.989', '-1.963', 0, 1, 'uk'), +('ST11', '', '', '52.967', '-2.065', 0, 1, 'uk'), +('ST12', '', '', '52.948', '-2.171', 0, 1, 'uk'), +('ST13', '', '', '53.101', '-2.018', 0, 1, 'uk'), +('ST14', '', '', '52.903', '-1.868', 0, 1, 'uk'), +('ST15', '', '', '52.9', '-2.148', 0, 1, 'uk'), +('ST16', '', '', '52.813', '-2.118', 0, 1, 'uk'), +('ST17', '', '', '52.789', '-2.099', 0, 1, 'uk'), +('ST18', '', '', '52.814', '-2.081', 0, 1, 'uk'), +('ST19', '', '', '52.713', '-2.147', 0, 1, 'uk'), +('ST2', '', '', '53.027', '-2.135', 0, 1, 'uk'), +('ST20', '', '', '52.798', '-2.263', 0, 1, 'uk'), +('ST21', '', '', '52.868', '-2.259', 0, 1, 'uk'), +('ST3', '', '', '52.981', '-2.122', 0, 1, 'uk'), +('ST4', '', '', '52.995', '-2.183', 0, 1, 'uk'), +('ST5', '', '', '53.015', '-2.237', 0, 1, 'uk'), +('ST6', '', '', '53.057', '-2.189', 0, 1, 'uk'), +('ST7', '', '', '53.088', '-2.265', 0, 1, 'uk'), +('ST8', '', '', '53.115', '-2.167', 0, 1, 'uk'), +('ST9', '', '', '53.05', '-2.099', 0, 1, 'uk'), +('SW1', '', '', '51.496', '-0.139', 0, 1, 'uk'), +('SW10', '', '', '51.483', '-0.181', 0, 1, 'uk'), +('SW11', '', '', '51.466', '-0.164', 0, 1, 'uk'), +('SW12', '', '', '51.446', '-0.148', 0, 1, 'uk'), +('SW13', '', '', '51.475', '-0.244', 0, 1, 'uk'), +('SW14', '', '', '51.465', '-0.265', 0, 1, 'uk'), +('SW15', '', '', '51.457', '-0.226', 0, 1, 'uk'), +('SW16', '', '', '51.422', '-0.128', 0, 1, 'uk'), +('SW17', '', '', '51.43', '-0.163', 0, 1, 'uk'), +('SW18', '', '', '51.45', '-0.19', 0, 1, 'uk'), +('SW19', '', '', '51.423', '-0.203', 0, 1, 'uk'), +('SW1A', '', '', '51.503', '-0.132', 0, 1, 'uk'), +('SW1E', '', '', '51.497', '-0.138', 0, 1, 'uk'), +('SW1H', '', '', '51.498', '-0.133', 0, 1, 'uk'), +('SW1P', '', '', '51.495', '-0.132', 0, 1, 'uk'), +('SW1V', '', '', '51.49', '-0.138', 0, 1, 'uk'), +('SW1W', '', '', '51.493', '-0.147', 0, 1, 'uk'), +('SW1X', '', '', '51.498', '-0.153', 0, 1, 'uk'), +('SW1Y', '', '', '51.505', '-0.133', 0, 1, 'uk'), +('SW2', '', '', '51.449', '-0.119', 0, 1, 'uk'), +('SW20', '', '', '51.411', '-0.225', 0, 1, 'uk'), +('SW3', '', '', '51.489', '-0.165', 0, 1, 'uk'), +('SW4', '', '', '51.461', '-0.135', 0, 1, 'uk'), +('SW5', '', '', '51.49', '-0.189', 0, 1, 'uk'), +('SW6', '', '', '51.476', '-0.2', 0, 1, 'uk'), +('SW7', '', '', '51.496', '-0.175', 0, 1, 'uk'), +('SW8', '', '', '51.476', '-0.131', 0, 1, 'uk'), +('SW9', '', '', '51.469', '-0.112', 0, 1, 'uk'), +('SY1', '', '', '52.723', '-2.74', 0, 1, 'uk'), +('SY10', '', '', '52.836', '-3.121', 0, 1, 'uk'), +('SY11', '', '', '52.867', '-3.029', 0, 1, 'uk'), +('SY12', '', '', '52.903', '-2.893', 0, 1, 'uk'), +('SY13', '', '', '52.952', '-2.689', 0, 1, 'uk'), +('SY14', '', '', '53.03', '-2.763', 0, 1, 'uk'), +('SY15', '', '', '52.555', '-3.13', 0, 1, 'uk'), +('SY16', '', '', '52.52', '-3.311', 0, 1, 'uk'), +('SY17', '', '', '52.517', '-3.465', 0, 1, 'uk'), +('SY18', '', '', '52.441', '-3.548', 0, 1, 'uk'), +('SY19', '', '', '52.574', '-3.611', 0, 1, 'uk'), +('SY2', '', '', '52.707', '-2.728', 0, 1, 'uk'), +('SY20', '', '', '52.614', '-3.819', 0, 1, 'uk'), +('SY21', '', '', '52.658', '-3.205', 0, 1, 'uk'), +('SY22', '', '', '52.756', '-3.186', 0, 1, 'uk'), +('SY23', '', '', '52.381', '-4.051', 0, 1, 'uk'), +('SY24', '', '', '52.47', '-4.023', 0, 1, 'uk'), +('SY25', '', '', '52.238', '-3.936', 0, 1, 'uk'), +('SY3', '', '', '52.699', '-2.77', 0, 1, 'uk'), +('SY4', '', '', '52.795', '-2.751', 0, 1, 'uk'), +('SY5', '', '', '52.653', '-2.827', 0, 1, 'uk'), +('SY6', '', '', '52.539', '-2.79', 0, 1, 'uk'), +('SY7', '', '', '52.425', '-2.887', 0, 1, 'uk'), +('SY8', '', '', '52.365', '-2.695', 0, 1, 'uk'), +('SY9', '', '', '52.498', '-2.986', 0, 1, 'uk'), +('TA1', '', '', '51.013', '-3.101', 0, 1, 'uk'), +('TA10', '', '', '51.033', '-2.825', 0, 1, 'uk'), +('TA11', '', '', '51.06', '-2.702', 0, 1, 'uk'), +('TA12', '', '', '50.974', '-2.772', 0, 1, 'uk'), +('TA13', '', '', '50.946', '-2.81', 0, 1, 'uk'), +('TA14', '', '', '50.946', '-2.75', 0, 1, 'uk'), +('TA15', '', '', '50.951', '-2.718', 0, 1, 'uk'), +('TA16', '', '', '50.907', '-2.792', 0, 1, 'uk'), +('TA17', '', '', '50.908', '-2.835', 0, 1, 'uk'), +('TA18', '', '', '50.882', '-2.786', 0, 1, 'uk'), +('TA19', '', '', '50.934', '-2.914', 0, 1, 'uk'), +('TA2', '', '', '51.033', '-3.102', 0, 1, 'uk'), +('TA20', '', '', '50.873', '-2.962', 0, 1, 'uk'), +('TA21', '', '', '50.977', '-3.245', 0, 1, 'uk'), +('TA22', '', '', '51.045', '-3.545', 0, 1, 'uk'), +('TA23', '', '', '51.162', '-3.352', 0, 1, 'uk'), +('TA24', '', '', '51.182', '-3.51', 0, 1, 'uk'), +('TA3', '', '', '50.994', '-3.039', 0, 1, 'uk'), +('TA4', '', '', '51.071', '-3.268', 0, 1, 'uk'), +('TA5', '', '', '51.146', '-3.104', 0, 1, 'uk'), +('TA6', '', '', '51.125', '-3', 0, 1, 'uk'), +('TA7', '', '', '51.13', '-2.912', 0, 1, 'uk'), +('TA8', '', '', '51.244', '-2.994', 0, 1, 'uk'), +('TA81', '', '', '51.235366', '-2.995549', 0, 1, 'uk'), +('TA9', '', '', '51.226', '-2.956', 0, 1, 'uk'), +('TD1', '', '', '55.624', '-2.811', 0, 1, 'uk'), +('TD10', '', '', '55.712', '-2.449', 0, 1, 'uk'), +('TD11', '', '', '55.788', '-2.316', 0, 1, 'uk'), +('TD12', '', '', '55.653', '-2.239', 0, 1, 'uk'), +('TD13', '', '', '55.93', '-2.37', 0, 1, 'uk'), +('TD14', '', '', '55.868', '-2.124', 0, 1, 'uk'), +('TD15', '', '', '55.747', '-2.012', 0, 1, 'uk'), +('TD2', '', '', '55.733', '-2.753', 0, 1, 'uk'), +('TD3', '', '', '55.7', '-2.572', 0, 1, 'uk'), +('TD4', '', '', '55.642', '-2.671', 0, 1, 'uk'), +('TD5', '', '', '55.587', '-2.416', 0, 1, 'uk'), +('TD6', '', '', '55.583', '-2.694', 0, 1, 'uk'), +('TD7', '', '', '55.537', '-2.871', 0, 1, 'uk'), +('TD8', '', '', '55.475', '-2.541', 0, 1, 'uk'), +('TD9', '', '', '55.397', '-2.776', 0, 1, 'uk'), +('TF1', '', '', '52.703', '-2.503', 0, 1, 'uk'), +('TF10', '', '', '52.769', '-2.385', 0, 1, 'uk'), +('TF11', '', '', '52.663', '-2.36', 0, 1, 'uk'), +('TF12', '', '', '52.612', '-2.48', 0, 1, 'uk'), +('TF13', '', '', '52.578', '-2.582', 0, 1, 'uk'), +('TF2', '', '', '52.7', '-2.439', 0, 1, 'uk'), +('TF3', '', '', '52.664', '-2.444', 0, 1, 'uk'), +('TF4', '', '', '52.661', '-2.467', 0, 1, 'uk'), +('TF5', '', '', '52.715', '-2.536', 0, 1, 'uk'), +('TF6', '', '', '52.735', '-2.554', 0, 1, 'uk'), +('TF7', '', '', '52.636', '-2.449', 0, 1, 'uk'), +('TF8', '', '', '52.63', '-2.479', 0, 1, 'uk'), +('TF9', '', '', '52.897', '-2.469', 0, 1, 'uk'), +('TN1', '', '', '51.135', '0.269', 0, 1, 'uk'), +('TN10', '', '', '51.21', '0.286', 0, 1, 'uk'), +('TN11', '', '', '51.206', '0.269', 0, 1, 'uk'), +('TN12', '', '', '51.172', '0.44', 0, 1, 'uk'), +('TN13', '', '', '51.276', '0.186', 0, 1, 'uk'), +('TN14', '', '', '51.295', '0.162', 0, 1, 'uk'), +('TN15', '', '', '51.3', '0.27', 0, 1, 'uk'), +('TN16', '', '', '51.294', '0.052', 0, 1, 'uk'), +('TN17', '', '', '51.096', '0.538', 0, 1, 'uk'), +('TN18', '', '', '51.043', '0.526', 0, 1, 'uk'), +('TN19', '', '', '51.002', '0.408', 0, 1, 'uk'), +('TN2', '', '', '51.138', '0.287', 0, 1, 'uk'), +('TN20', '', '', '51.026', '0.256', 0, 1, 'uk'), +('TN21', '', '', '50.959', '0.265', 0, 1, 'uk'), +('TN22', '', '', '50.981', '0.101', 0, 1, 'uk'), +('TN23', '', '', '51.139', '0.86', 0, 1, 'uk'), +('TN24', '', '', '51.15', '0.887', 0, 1, 'uk'), +('TN25', '', '', '51.144', '0.94', 0, 1, 'uk'), +('TN26', '', '', '51.1', '0.806', 0, 1, 'uk'), +('TN27', '', '', '51.166', '0.707', 0, 1, 'uk'), +('TN28', '', '', '50.982', '0.953', 0, 1, 'uk'), +('TN29', '', '', '50.993', '0.934', 0, 1, 'uk'), +('TN3', '', '', '51.122', '0.252', 0, 1, 'uk'), +('TN30', '', '', '51.062', '0.698', 0, 1, 'uk'), +('TN31', '', '', '50.963', '0.687', 0, 1, 'uk'), +('TN32', '', '', '50.98', '0.49', 0, 1, 'uk'), +('TN33', '', '', '50.91', '0.477', 0, 1, 'uk'), +('TN34', '', '', '50.864', '0.583', 0, 1, 'uk'), +('TN35', '', '', '50.88', '0.612', 0, 1, 'uk'), +('TN36', '', '', '50.921', '0.702', 0, 1, 'uk'), +('TN37', '', '', '50.871', '0.558', 0, 1, 'uk'), +('TN38', '', '', '50.863', '0.546', 0, 1, 'uk'), +('TN39', '', '', '50.846', '0.455', 0, 1, 'uk'), +('TN4', '', '', '51.146', '0.259', 0, 1, 'uk'), +('TN40', '', '', '50.844', '0.484', 0, 1, 'uk'), +('TN5', '', '', '51.064', '0.362', 0, 1, 'uk'), +('TN6', '', '', '51.053', '0.175', 0, 1, 'uk'), +('TN7', '', '', '51.092', '0.109', 0, 1, 'uk'), +('TN8', '', '', '51.195', '0.079', 0, 1, 'uk'), +('TN9', '', '', '51.191', '0.276', 0, 1, 'uk'), +('TQ1', '', '', '50.471', '-3.521', 0, 1, 'uk'), +('TQ10', '', '', '50.424', '-3.819', 0, 1, 'uk'), +('TQ11', '', '', '50.481', '-3.782', 0, 1, 'uk'), +('TQ12', '', '', '50.529', '-3.612', 0, 1, 'uk'), +('TQ13', '', '', '50.593', '-3.718', 0, 1, 'uk'), +('TQ14', '', '', '50.55', '-3.507', 0, 1, 'uk'), +('TQ2', '', '', '50.474', '-3.543', 0, 1, 'uk'), +('TQ3', '', '', '50.443', '-3.575', 0, 1, 'uk'), +('TQ4', '', '', '50.423', '-3.57', 0, 1, 'uk'), +('TQ5', '', '', '50.391', '-3.522', 0, 1, 'uk'), +('TQ6', '', '', '50.347', '-3.589', 0, 1, 'uk'), +('TQ7', '', '', '50.282', '-3.783', 0, 1, 'uk'), +('TQ8', '', '', '50.237', '-3.771', 0, 1, 'uk'), +('TQ9', '', '', '50.416', '-3.69', 0, 1, 'uk'), +('TR1', '', '', '50.263', '-5.054', 0, 1, 'uk'), +('TR10', '', '', '50.166', '-5.118', 0, 1, 'uk'), +('TR11', '', '', '50.149', '-5.086', 0, 1, 'uk'), +('TR12', '', '', '50.043', '-5.179', 0, 1, 'uk'), +('TR13', '', '', '50.109', '-5.285', 0, 1, 'uk'), +('TR14', '', '', '50.21', '-5.296', 0, 1, 'uk'), +('TR15', '', '', '50.233', '-5.237', 0, 1, 'uk'), +('TR16', '', '', '50.232', '-5.221', 0, 1, 'uk'), +('TR17', '', '', '50.125', '-5.468', 0, 1, 'uk'), +('TR18', '', '', '50.117', '-5.541', 0, 1, 'uk'), +('TR19', '', '', '50.1', '-5.627', 0, 1, 'uk'), +('TR2', '', '', '50.253', '-4.952', 0, 1, 'uk'), +('TR20', '', '', '50.131', '-5.488', 0, 1, 'uk'), +('TR21', '', '', '49.93', '-6.256', 0, 1, 'uk'), +('TR22', '', '', '49.892', '-6.344', 0, 1, 'uk'), +('TR23', '', '', '49.953', '-6.352', 0, 1, 'uk'), +('TR24', '', '', '49.955', '-6.334', 0, 1, 'uk'), +('TR25', '', '', '49.964', '-6.293', 0, 1, 'uk'), +('TR26', '', '', '50.202', '-5.478', 0, 1, 'uk'), +('TR27', '', '', '50.182', '-5.403', 0, 1, 'uk'), +('TR3', '', '', '50.217', '-5.109', 0, 1, 'uk'), +('TR36', '', '', '50.248109', '-5.056774', 0, 1, 'uk'), +('TR4', '', '', '50.283', '-5.136', 0, 1, 'uk'), +('TR5', '', '', '50.308', '-5.191', 0, 1, 'uk'), +('TR6', '', '', '50.342', '-5.152', 0, 1, 'uk'), +('TR7', '', '', '50.413', '-5.074', 0, 1, 'uk'), +('TR8', '', '', '50.399', '-5.037', 0, 1, 'uk'), +('TR9', '', '', '50.414', '-4.936', 0, 1, 'uk'), +('TS1', '', '', '54.572', '-1.238', 0, 1, 'uk'), +('TS10', '', '', '54.607', '-1.068', 0, 1, 'uk'), +('TS11', '', '', '54.588', '-1.026', 0, 1, 'uk'), +('TS12', '', '', '54.562', '-0.965', 0, 1, 'uk'), +('TS13', '', '', '54.55', '-0.854', 0, 1, 'uk'), +('TS14', '', '', '54.532', '-1.06', 0, 1, 'uk'), +('TS15', '', '', '54.491', '-1.331', 0, 1, 'uk'), +('TS16', '', '', '54.524', '-1.353', 0, 1, 'uk'), +('TS17', '', '', '54.537', '-1.302', 0, 1, 'uk'), +('TS18', '', '', '54.562', '-1.323', 0, 1, 'uk'), +('TS19', '', '', '54.577', '-1.345', 0, 1, 'uk'), +('TS2', '', '', '54.585', '-1.235', 0, 1, 'uk'), +('TS20', '', '', '54.586', '-1.313', 0, 1, 'uk'), +('TS21', '', '', '54.627', '-1.425', 0, 1, 'uk'), +('TS22', '', '', '54.618', '-1.313', 0, 1, 'uk'), +('TS23', '', '', '54.608', '-1.285', 0, 1, 'uk'), +('TS24', '', '', '54.696', '-1.21', 0, 1, 'uk'), +('TS25', '', '', '54.663', '-1.223', 0, 1, 'uk'), +('TS26', '', '', '54.688', '-1.229', 0, 1, 'uk'), +('TS27', '', '', '54.723', '-1.288', 0, 1, 'uk'), +('TS28', '', '', '54.725', '-1.373', 0, 1, 'uk'), +('TS29', '', '', '54.71', '-1.419', 0, 1, 'uk'), +('TS3', '', '', '54.561', '-1.196', 0, 1, 'uk'), +('TS4', '', '', '54.556', '-1.222', 0, 1, 'uk'), +('TS5', '', '', '54.551', '-1.251', 0, 1, 'uk'), +('TS6', '', '', '54.566', '-1.153', 0, 1, 'uk'), +('TS7', '', '', '54.534', '-1.183', 0, 1, 'uk'), +('TS8', '', '', '54.522', '-1.23', 0, 1, 'uk'), +('TS9', '', '', '54.466', '-1.163', 0, 1, 'uk'), +('TW0', '', '', '51.465384', '-0.300162', 0, 1, 'uk'), +('TW1', '', '', '51.45', '-0.325', 0, 1, 'uk'), +('TW10', '', '', '51.45', '-0.302', 0, 1, 'uk'), +('TW11', '', '', '51.426', '-0.331', 0, 1, 'uk'), +('TW12', '', '', '51.422', '-0.368', 0, 1, 'uk'), +('TW13', '', '', '51.438', '-0.4', 0, 1, 'uk'), +('TW14', '', '', '51.452', '-0.419', 0, 1, 'uk'), +('TW15', '', '', '51.43', '-0.456', 0, 1, 'uk'), +('TW16', '', '', '51.416', '-0.416', 0, 1, 'uk'), +('TW17', '', '', '51.397', '-0.447', 0, 1, 'uk'), +('TW18', '', '', '51.428', '-0.506', 0, 1, 'uk'), +('TW19', '', '', '51.452', '-0.502', 0, 1, 'uk'), +('TW2', '', '', '51.446', '-0.35', 0, 1, 'uk'), +('TW20', '', '', '51.427', '-0.55', 0, 1, 'uk'), +('TW3', '', '', '51.467', '-0.362', 0, 1, 'uk'), +('TW4', '', '', '51.466', '-0.383', 0, 1, 'uk'), +('TW5', '', '', '51.48', '-0.381', 0, 1, 'uk'), +('TW6', '', '', '51.47', '-0.446', 0, 1, 'uk'), +('TW7', '', '', '51.473', '-0.332', 0, 1, 'uk'), +('TW8', '', '', '51.486', '-0.307', 0, 1, 'uk'), +('TW81', '', '', '51.477214', '-0.312279', 0, 1, 'uk'), +('TW9', '', '', '51.468', '-0.293', 0, 1, 'uk'), +('UB1', '', '', '51.514', '-0.372', 0, 1, 'uk'), +('UB10', '', '', '51.548', '-0.453', 0, 1, 'uk'), +('UB11', '', '', '51.519', '-0.458', 0, 1, 'uk'), +('UB2', '', '', '51.499', '-0.378', 0, 1, 'uk'), +('UB3', '', '', '51.505', '-0.422', 0, 1, 'uk'), +('UB4', '', '', '51.524', '-0.407', 0, 1, 'uk'), +('UB5', '', '', '51.543', '-0.375', 0, 1, 'uk'), +('UB6', '', '', '51.539', '-0.342', 0, 1, 'uk'), +('UB7', '', '', '51.506', '-0.469', 0, 1, 'uk'), +('UB8', '', '', '51.535', '-0.473', 0, 1, 'uk'), +('UB9', '', '', '51.581', '-0.49', 0, 1, 'uk'), +('W1', '', '', '51.515', '-0.142', 0, 1, 'uk'), +('W10', '', '', '51.521', '-0.213', 0, 1, 'uk'), +('W11', '', '', '51.512', '-0.204', 0, 1, 'uk'), +('W12', '', '', '51.508', '-0.23', 0, 1, 'uk'), +('W13', '', '', '51.513', '-0.32', 0, 1, 'uk'), +('W14', '', '', '51.494', '-0.209', 0, 1, 'uk'), +('W1A', '', '', '51.519399', '-0.14057', 0, 1, 'uk'), +('W1B', '', '', '51.514', '-0.139', 0, 1, 'uk'), +('W1C', '', '', '51.514', '-0.148', 0, 1, 'uk'), +('W1D', '', '', '51.513', '-0.131', 0, 1, 'uk'), +('W1E', '', '', '51.512877', '-0.136464', 0, 1, 'uk'), +('W1F', '', '', '51.513', '-0.135', 0, 1, 'uk'), +('W1G', '', '', '51.519', '-0.147', 0, 1, 'uk'), +('W1H', '', '', '51.517', '-0.159', 0, 1, 'uk'), +('W1J', '', '', '51.507', '-0.143', 0, 1, 'uk'), +('W1K', '', '', '51.511', '-0.149', 0, 1, 'uk'), +('W1M', '', '', '51.518', '-0.149', 0, 1, 'uk'), +('W1P', '', '', '51.51761', '-0.134368', 0, 1, 'uk'), +('W1S', '', '', '51.511', '-0.141', 0, 1, 'uk'), +('W1T', '', '', '51.52', '-0.135', 0, 1, 'uk'), +('W1U', '', '', '51.518', '-0.152', 0, 1, 'uk'), +('W1W', '', '', '51.519', '-0.14', 0, 1, 'uk'), +('W2', '', '', '51.515', '-0.178', 0, 1, 'uk'), +('W3', '', '', '51.509', '-0.268', 0, 1, 'uk'), +('W4', '', '', '51.491', '-0.262', 0, 1, 'uk'), +('W5', '', '', '51.512', '-0.301', 0, 1, 'uk'), +('W6', '', '', '51.492', '-0.229', 0, 1, 'uk'), +('W7', '', '', '51.511', '-0.334', 0, 1, 'uk'), +('W8', '', '', '51.5', '-0.193', 0, 1, 'uk'), +('W9', '', '', '51.526', '-0.191', 0, 1, 'uk'), +('WA1', '', '', '53.394', '-2.569', 0, 1, 'uk'), +('WA10', '', '', '53.454', '-2.755', 0, 1, 'uk'), +('WA11', '', '', '53.477', '-2.719', 0, 1, 'uk'), +('WA12', '', '', '53.454', '-2.632', 0, 1, 'uk'), +('WA13', '', '', '53.382', '-2.468', 0, 1, 'uk'), +('WA14', '', '', '53.386', '-2.359', 0, 1, 'uk'), +('WA15', '', '', '53.384', '-2.325', 0, 1, 'uk'), +('WA16', '', '', '53.303', '-2.371', 0, 1, 'uk'), +('WA2', '', '', '53.41', '-2.58', 0, 1, 'uk'), +('WA3', '', '', '53.453', '-2.548', 0, 1, 'uk'), +('WA4', '', '', '53.365', '-2.574', 0, 1, 'uk'), +('WA5', '', '', '53.399', '-2.636', 0, 1, 'uk'), +('WA6', '', '', '53.273', '-2.722', 0, 1, 'uk'), +('WA7', '', '', '53.33', '-2.703', 0, 1, 'uk'), +('WA8', '', '', '53.372', '-2.741', 0, 1, 'uk'), +('WA9', '', '', '53.436', '-2.718', 0, 1, 'uk'), +('WC1', '', '', '51.521', '-0.122', 0, 1, 'uk'), +('WC1A', '', '', '51.517', '-0.125', 0, 1, 'uk'), +('WC1B', '', '', '51.518', '-0.126', 0, 1, 'uk'), +('WC1E', '', '', '51.52', '-0.131', 0, 1, 'uk'), +('WC1H', '', '', '51.524', '-0.126', 0, 1, 'uk'), +('WC1N', '', '', '51.522', '-0.12', 0, 1, 'uk'), +('WC1R', '', '', '51.519', '-0.116', 0, 1, 'uk'), +('WC1V', '', '', '51.517', '-0.118', 0, 1, 'uk'), +('WC1X', '', '', '51.525', '-0.116', 0, 1, 'uk'), +('WC2', '', '', '51.513', '-0.123', 0, 1, 'uk'), +('WC2A', '', '', '51.516', '-0.115', 0, 1, 'uk'), +('WC2B', '', '', '51.515', '-0.121', 0, 1, 'uk'), +('WC2E', '', '', '51.512', '-0.123', 0, 1, 'uk'), +('WC2H', '', '', '51.513', '-0.127', 0, 1, 'uk'), +('WC2N', '', '', '51.51', '-0.125', 0, 1, 'uk'), +('WC2R', '', '', '51.512', '-0.119', 0, 1, 'uk'), +('WD1', '', '', '51.647', '-0.4', 0, 1, 'uk'), +('WD17', '', '', '51.661', '-0.405', 0, 1, 'uk'), +('WD18', '', '', '51.648', '-0.414', 0, 1, 'uk'), +('WD19', '', '', '51.631', '-0.391', 0, 1, 'uk'), +('WD2', '', '', '51.667', '-0.377', 0, 1, 'uk'), +('WD23', '', '', '51.645', '-0.365', 0, 1, 'uk'), +('WD24', '', '', '51.67', '-0.398', 0, 1, 'uk'), +('WD25', '', '', '51.684', '-0.389', 0, 1, 'uk'), +('WD3', '', '', '51.645', '-0.481', 0, 1, 'uk'), +('WD4', '', '', '51.709', '-0.456', 0, 1, 'uk'), +('WD5', '', '', '51.705', '-0.417', 0, 1, 'uk'), +('WD6', '', '', '51.657', '-0.275', 0, 1, 'uk'), +('WD7', '', '', '51.686', '-0.309', 0, 1, 'uk'), +('WF1', '', '', '53.687', '-1.492', 0, 1, 'uk'), +('WF10', '', '', '53.724', '-1.344', 0, 1, 'uk'), +('WF11', '', '', '53.711', '-1.256', 0, 1, 'uk'), +('WF12', '', '', '53.684', '-1.62', 0, 1, 'uk'), +('WF13', '', '', '53.692', '-1.645', 0, 1, 'uk'), +('WF14', '', '', '53.68', '-1.693', 0, 1, 'uk'), +('WF15', '', '', '53.708', '-1.698', 0, 1, 'uk'), +('WF16', '', '', '53.71', '-1.669', 0, 1, 'uk'), +('WF17', '', '', '53.719', '-1.641', 0, 1, 'uk'), +('WF2', '', '', '53.673', '-1.511', 0, 1, 'uk'), +('WF3', '', '', '53.723', '-1.524', 0, 1, 'uk'), +('WF4', '', '', '53.647', '-1.519', 0, 1, 'uk'), +('WF5', '', '', '53.68', '-1.576', 0, 1, 'uk'), +('WF6', '', '', '53.7', '-1.414', 0, 1, 'uk'), +('WF7', '', '', '53.667', '-1.35', 0, 1, 'uk'), +('WF8', '', '', '53.685', '-1.299', 0, 1, 'uk'), +('WF9', '', '', '53.606', '-1.32', 0, 1, 'uk'), +('WN1', '', '', '53.554', '-2.626', 0, 1, 'uk'), +('WN2', '', '', '53.537', '-2.582', 0, 1, 'uk'), +('WN3', '', '', '53.529', '-2.645', 0, 1, 'uk'), +('WN4', '', '', '53.495', '-2.643', 0, 1, 'uk'), +('WN5', '', '', '53.532', '-2.685', 0, 1, 'uk'), +('WN6', '', '', '53.574', '-2.669', 0, 1, 'uk'), +('WN7', '', '', '53.498', '-2.517', 0, 1, 'uk'), +('WN8', '', '', '53.553', '-2.768', 0, 1, 'uk'), +('WR1', '', '', '52.197', '-2.217', 0, 1, 'uk'), +('WR10', '', '', '52.114', '-2.064', 0, 1, 'uk'), +('WR11', '', '', '52.095', '-1.929', 0, 1, 'uk'), +('WR12', '', '', '52.043', '-1.874', 0, 1, 'uk'), +('WR13', '', '', '52.094', '-2.342', 0, 1, 'uk'), +('WR14', '', '', '52.113', '-2.319', 0, 1, 'uk'), +('WR15', '', '', '52.305', '-2.568', 0, 1, 'uk'), +('WR2', '', '', '52.19', '-2.241', 0, 1, 'uk'), +('WR3', '', '', '52.216', '-2.21', 0, 1, 'uk'), +('WR4', '', '', '52.205', '-2.184', 0, 1, 'uk'), +('WR5', '', '', '52.177', '-2.199', 0, 1, 'uk'), +('WR6', '', '', '52.228', '-2.37', 0, 1, 'uk'), +('WR7', '', '', '52.197', '-2.052', 0, 1, 'uk'), +('WR8', '', '', '52.082', '-2.203', 0, 1, 'uk'), +('WR9', '', '', '52.268', '-2.157', 0, 1, 'uk'), +('WS1', '', '', '52.579', '-1.977', 0, 1, 'uk'), +('WS10', '', '', '52.56', '-2.021', 0, 1, 'uk'), +('WS11', '', '', '52.689', '-2.017', 0, 1, 'uk'), +('WS12', '', '', '52.706', '-1.999', 0, 1, 'uk'), +('WS13', '', '', '52.692', '-1.818', 0, 1, 'uk'), +('WS14', '', '', '52.663', '-1.814', 0, 1, 'uk'), +('WS15', '', '', '52.758', '-1.917', 0, 1, 'uk'), +('WS19', '', '', '52.556436', '-2.020665', 0, 1, 'uk'), +('WS2', '', '', '52.588', '-2.002', 0, 1, 'uk'), +('WS3', '', '', '52.618', '-1.99', 0, 1, 'uk'), +('WS4', '', '', '52.605', '-1.959', 0, 1, 'uk'), +('WS5', '', '', '52.567', '-1.959', 0, 1, 'uk'), +('WS6', '', '', '52.658', '-2.022', 0, 1, 'uk'), +('WS7', '', '', '52.68', '-1.913', 0, 1, 'uk'), +('WS8', '', '', '52.646', '-1.933', 0, 1, 'uk'), +('WS9', '', '', '52.609', '-1.917', 0, 1, 'uk'), +('WV1', '', '', '52.586', '-2.115', 0, 1, 'uk'), +('WV10', '', '', '52.617', '-2.112', 0, 1, 'uk'), +('WV11', '', '', '52.61', '-2.071', 0, 1, 'uk'), +('WV12', '', '', '52.606', '-2.039', 0, 1, 'uk'), +('WV13', '', '', '52.585', '-2.06', 0, 1, 'uk'), +('WV14', '', '', '52.557', '-2.078', 0, 1, 'uk'), +('WV15', '', '', '52.516', '-2.375', 0, 1, 'uk'), +('WV16', '', '', '52.511', '-2.44', 0, 1, 'uk'), +('WV2', '', '', '52.574', '-2.118', 0, 1, 'uk'), +('WV3', '', '', '52.58', '-2.151', 0, 1, 'uk'), +('WV4', '', '', '52.563', '-2.142', 0, 1, 'uk'), +('WV5', '', '', '52.533', '-2.209', 0, 1, 'uk'), +('WV6', '', '', '52.596', '-2.181', 0, 1, 'uk'), +('WV7', '', '', '52.633', '-2.27', 0, 1, 'uk'), +('WV8', '', '', '52.623', '-2.183', 0, 1, 'uk'), +('WV9', '', '', '52.633', '-2.14', 0, 1, 'uk'), +('Y03', '', '', '53.971664', '-1.047148', 0, 1, 'uk'), +('YO1', '', '', '53.958', '-1.081', 0, 1, 'uk'), +('YO10', '', '', '53.95', '-1.058', 0, 1, 'uk'), +('YO11', '', '', '54.265', '-0.395', 0, 1, 'uk'), +('YO12', '', '', '54.274', '-0.422', 0, 1, 'uk'), +('YO13', '', '', '54.288', '-0.496', 0, 1, 'uk'), +('YO14', '', '', '54.199', '-0.297', 0, 1, 'uk'), +('YO15', '', '', '54.094', '-0.177', 0, 1, 'uk'), +('YO16', '', '', '54.095', '-0.201', 0, 1, 'uk'), +('YO17', '', '', '54.136', '-0.753', 0, 1, 'uk'), +('YO18', '', '', '54.258', '-0.767', 0, 1, 'uk'), +('YO19', '', '', '53.91', '-1.021', 0, 1, 'uk'), +('YO2', '', '', '54.272252', '-0.935131', 0, 1, 'uk'), +('YO21', '', '', '54.477', '-0.712', 0, 1, 'uk'), +('YO22', '', '', '54.451', '-0.621', 0, 1, 'uk'), +('YO23', '', '', '53.925', '-1.121', 0, 1, 'uk'), +('YO24', '', '', '53.946', '-1.114', 0, 1, 'uk'), +('YO25', '', '', '54.005', '-0.413', 0, 1, 'uk'), +('YO26', '', '', '53.975', '-1.172', 0, 1, 'uk'), +('YO3', '', '', '53.963055', '-1.085481', 0, 1, 'uk'), +('YO30', '', '', '53.986', '-1.114', 0, 1, 'uk'), +('YO31', '', '', '53.969', '-1.063', 0, 1, 'uk'), +('YO32', '', '', '54.011', '-1.059', 0, 1, 'uk'), +('YO41', '', '', '53.969', '-0.902', 0, 1, 'uk'), +('YO42', '', '', '53.923', '-0.79', 0, 1, 'uk'), +('YO43', '', '', '53.85', '-0.69', 0, 1, 'uk'), +('YO5', '', '', '53.996416', '-1.300782', 0, 1, 'uk'), +('YO51', '', '', '54.082', '-1.376', 0, 1, 'uk'), +('YO60', '', '', '54.082', '-0.941', 0, 1, 'uk'), +('YO61', '', '', '54.115', '-1.193', 0, 1, 'uk'), +('YO62', '', '', '54.242', '-0.993', 0, 1, 'uk'), +('YO7', '', '', '54.224', '-1.35', 0, 1, 'uk'), +('YO8', '', '', '53.781', '-1.058', 0, 1, 'uk'), +('YO91', '', '', '53.975436', '-1.07902', 0, 1, 'uk'), +('ZE1', '', '', '60.152', '-1.168', 0, 1, 'uk'), +('ZE2', '', '', '60.331', '-1.226', 0, 1, 'uk'), +('ZE3', '', '', '59.884', '-1.302', 0, 1, 'uk'); \ No newline at end of file diff --git a/samples/Text/filenames/LICENSE.mysql b/samples/Text/filenames/LICENSE.mysql new file mode 100644 index 0000000000..ecbc059373 --- /dev/null +++ b/samples/Text/filenames/LICENSE.mysql @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. \ No newline at end of file diff --git a/samples/Text/filenames/README.mysql b/samples/Text/filenames/README.mysql new file mode 100644 index 0000000000..2bdc9aa4a6 --- /dev/null +++ b/samples/Text/filenames/README.mysql @@ -0,0 +1,24 @@ +README for users interested in using MySQL as a triplestore backend +=================================================================== + +The KiWi Triple Store used by Apache Marmotta supports different database +backends, including H2, PostgreSQL and MySQL. However, for legal reasons, +we are not allowed to distribute the MySQL connector library together with +the Apache Marmotta source code or binaries, as it is licensed under GPL +license. + +Nonetheless, it is possible to use MySQL by downloading and installing the +connector manually: + 1. download and unpack the MySQL Connector/J from + http://dev.mysql.com/downloads/connector/j/ + 2. copy the mysql-connector-java-5.x.x.jar file to + a. the library directory of the application server + (e.g. $TOMCAT_HOME/lib) + -- OR -- + b. the library directory of the Apache Marmotta Web application + (e.g. $TOMCAT_HOME/webapps/marmotta/WEB-INF/lib) + 3. restart the application server + +Apache Marmotta will then automatically be able to use the MySQL connector +to connect to a MySQL database. Please note that Marmotta requires at least +MySQL 5.x, because it makes use of nested queries and foreign keys. \ No newline at end of file diff --git a/samples/YAML/database.yml.mysql b/samples/YAML/database.yml.mysql new file mode 100644 index 0000000000..d970287024 --- /dev/null +++ b/samples/YAML/database.yml.mysql @@ -0,0 +1,42 @@ +# +# PRODUCTION +# +production: + adapter: mysql2 + encoding: utf8mb4 + collation: utf8mb4_general_ci + reconnect: false + database: gitlabhq_production + pool: 10 + username: git + password: "secure password" + # host: localhost + # socket: /tmp/mysql.sock + +# +# Development specific +# +development: + adapter: mysql2 + encoding: utf8mb4 + collation: utf8mb4_general_ci + reconnect: false + database: gitlabhq_development + pool: 5 + username: root + password: "secure password" + # socket: /tmp/mysql.sock + +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: &test + adapter: mysql2 + encoding: utf8mb4 + collation: utf8mb4_general_ci + reconnect: false + database: gitlabhq_test + pool: 5 + username: root + password: + # socket: /tmp/mysql.sock From 8f2820e9cc8e5a3a444b0541d8f3cb16f645614d Mon Sep 17 00:00:00 2001 From: Samantha McVey Date: Tue, 3 Jan 2017 13:29:00 -0800 Subject: [PATCH 0204/1214] Add XCompose language and highlighter (#3402) * Add XCompose language and highlighter * XCompose fix some errors in the Travis build * Remove xmodmap files for XCompose Most xmodmap files aren't XCompose, and there's not enough xmodmap files which are XCompose to be worth adding to heuristics * Remove some extensions/filenames from XCompose * Rename and move sample to correct folder and filename That we have added in languages.yml * Use generated language id --- .gitmodules | 3 + grammars.yml | 2 + lib/linguist/languages.yml | 9 + samples/XCompose/filenames/XCompose | 1297 +++++++++++++++++ vendor/README.md | 1 + vendor/grammars/language-xcompose | 1 + vendor/licenses/grammar/language-xcompose.txt | 27 + 7 files changed, 1340 insertions(+) create mode 100644 samples/XCompose/filenames/XCompose create mode 160000 vendor/grammars/language-xcompose create mode 100644 vendor/licenses/grammar/language-xcompose.txt diff --git a/.gitmodules b/.gitmodules index 4b188e2e53..dd1d932247 100644 --- a/.gitmodules +++ b/.gitmodules @@ -809,3 +809,6 @@ [submodule "vendor/grammars/reason"] path = vendor/grammars/reason url = https://github.com/facebook/reason +[submodule "vendor/grammars/language-xcompose"] + path = vendor/grammars/language-xcompose + url = https://github.com/samcv/language-xcompose diff --git a/grammars.yml b/grammars.yml index a60b1a08be..ac1c772488 100755 --- a/grammars.yml +++ b/grammars.yml @@ -439,6 +439,8 @@ vendor/grammars/language-wavefront: - source.wavefront.obj vendor/grammars/language-xbase: - source.harbour +vendor/grammars/language-xcompose: +- config.xcompose vendor/grammars/language-yaml: - source.yaml vendor/grammars/language-yang: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 4ef73a65e2..0f2481d7c2 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -4584,6 +4584,15 @@ XC: codemirror_mode: clike codemirror_mime_type: text/x-csrc language_id: 398 +XCompose: + type: data + filenames: + - ".XCompose" + - "XCompose" + - "xcompose" + tm_scope: 'config.xcompose' + ace_mode: text + language_id: 225167241 XML: type: data ace_mode: xml diff --git a/samples/XCompose/filenames/XCompose b/samples/XCompose/filenames/XCompose new file mode 100644 index 0000000000..c87c297eec --- /dev/null +++ b/samples/XCompose/filenames/XCompose @@ -0,0 +1,1297 @@ +# for Emacs: -*- coding: utf-8 -*- +include "%L" + +# def emit(keys, codepoint, word): +# print (' %s \t: "%s"\tU%04X\t\t# CIRCLED DIGIT %s' % +# (keys, unichr(codepoint), codepoint, word)).encode('utf8') +# numbers = 'one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen twenty' +# words = numbers.upper().split() +# emit('<0>', 0x24EA, "ZERO") +# for num, word in zip(range(1, 21), words): +# emit(' '.join("<%s>" % char for char in str(num)), 0x245f + num, word) + +# Custom additions: Typography + : "…" U2026 # HORIZONTAL ELLIPSIS + : "⋮" U22EE # VERTICAL ELLIPSIS + : "⋯" U22EF # MIDLINE HORIZONTAL ELLIPSIS + : "⋰" U22F0 # UP RIGHT DIAGONAL ELLIPSIS +# To avoid conflict with \. for combining dot above. +# : "⋱" U22F1 # DOWN RIGHT DIAGONAL ELLIPSIS + : "⋱" U22F1 # DOWN RIGHT DIAGONAL ELLIPSIS +# Will we someday regret this, wanting 2. for ⒉ ? + <2> : "‥" U2025 # TWO DOT LEADER +# This should not be needed. +# <1> : "․" U2024 # ONE DOT LEADER + <1> : "·" U00B7 # MIDDLE DOT (maybe I can remember the keystroke better? + : "⁒" U2052 # COMMERCIAL MINUS SIGN +# Printable sign for space. But is \ too useful a key combo to use +# for this? + : "␣" U2423 # OPEN BOX +# These two are already present for me: +# : "—" U2014 # EM DASH +# : "–" U2013 # EN DASH + : "– " # EN DASH (followed by space) + : "―" U2015 # HORIZONTAL BAR + <2> : "⸺" U2E3A # TWO-EM DASH + <3> : "⸻" U2E3B # THREE-EM DASH + : "­" U00AD # SOFT HYPHEN +# This is the recommended typographical practice for em dashes in English. +# Unfortunately, it doesn’t work out all that well in monospace fonts, +# where the thin spaces aren’t thin. But I think this is okay. +# This conflicts with the default binding to “~”, which is potentially +# a problem for non-American keyboards. + : " — " # EM DASH surrounded by THIN SPACEs. + + +# Quotation marks. + : "‚" U201A # SINGLE LOW-9 QUOTATION MARK + : "„" U201E # DOUBLE LOW-9 QUOTATION MARK + : "⹂" U2E42 # DOUBLE LOW-REVERSED-9 QUOTATION MARK + : "’" U2019 # RIGHT SINGLE QUOTATION MARK + : "”" U201D # RIGHT DOUBLE QUOTATION MARK + : "‘" U2018 # LEFT SINGLE QUOTATION MARK + : "“" U201C # LEFT DOUBLE QUOTATION MARK + <6> : "‘" U2018 # LEFT SINGLE QUOTATION MARK (high 6) + <6> : "“" U201C # LEFT DOUBLE QUOTATION MARK (66) + <9> : "’" U2019 # RIGHT SINGLE QUOTATION MARK (high 9) + <9> : "”" U201D # RIGHT DOUBLE QUOTATION MARK (99) + <9> : "‛" U201B # SINGLE HIGH-REVERSED-9 QUOTATION MARK + <9> : "‟" U201F # DOUBLE HIGH-REVERSED-9 QUOTATION MARK + : "‚" U201A # SINGLE LOW-9 QUOTATION MARK (quote resembling a comma) + : "„" U201E # DOUBLE LOW-9 QUOTATION MARK + +# Convenience shortcuts for quotation marks. + : " “" # space followed by LEFT DOUBLE QUOTATION MARK + : "” " # RIGHT DOUBLE QUOTATION MARK followed by space + : " ‘" # space followed by LEFT SINGLE QUOTATION MARK +# Unfortunately is, asymmetrically, just "’". Whatever. + : "n’t " # Apostrophized English “not.” +# Some more English shortcuts: + : " the " + : " The " + : " and " + : " I’m " + : "’ve " + + : "⸲" U2E32 # TURNED COMMA +# Conflicts with system def? (·) + : "⸳" U2E33 # RAISED DOT + : "⸳" U2E33 # RAISED DOT + : "⸴" U2E34 # RAISED COMMA + : "⸵" U2E35 # TURNED SEMICOLON +# Convlicts with system def? (⍭) + : "ⸯ" U2E2F # VERTICAL TILDE + : "ⸯ" U2E2F # VERTICAL TILDE + : "⹀" U2E40 # DOUBLE HYPHEN + : "⹁" U2E41 # REVERSED COMMA + : "↵" U21B5 # DOWNWARDS ARROW WITH CORNER LEFTWARDS +# The bullet was , but it clashes with ꙭ + <1> : "•" U2022 # BULLET +# By default does this, but we broke that with the ... binding. + : "⁃" U2043 # HYPHEN BULLET + : "·" periodcentered # MIDDLE DOT +# I don’t use this nearly as often as the em-dash sequence I’ve remapped it to: +# : "‑" U2011 # NON-BREAKING HYPHEN +# Already present for me: +# : " " U00A0 # NO-BREAK SPACE +# Do we want/need these? + : "†" U2020 # DAGGER + : "‡" U2021 # DOUBLE DAGGER +# We used to have THIN SPACE as , but now that’s remapped +# to " ‘", for conveniently enclosing things in proper single-quotes. + : " " U2009 # THIN SPACE + : "§" U00A7 # SECTION SIGN +# It's in the Asian section, but it's a general-purpose punctuation: + : "〃" U3003 # DITTO MARK +# Working with the pattern from FLOOR/CEILING + <7> : "⸢" U2E22 # TOP LEFT HALF BRACKET + <7> : "⸣" U2E23 # TOP RIGHT HALF BRACKET + : "⸤" U2E24 # BOTTOM LEFT HALF BRACKET + : "⸥" U2E25 # BOTTOM RIGHT HALF BRACKET +# Consider <7> / for ⸂⸃ maybe? and for ⸉⸊⸌⸍ ...? +# I guess we can get by with sub/superset for ⸦⸧. + + : "←" leftarrow # LEFTWARDS ARROW + : "↑" uparrow # UPWARDS ARROW + : "→" rightarrow # RIGHTWARDS ARROW + : "↓" downarrow # DOWNWARDS ARROW + : "↔" U2194 # LEFT RIGHT ARROW (kragen's) + + : "←" leftarrow # LEFTWARDS ARROW + : "↑" uparrow # UPWARDS ARROW + : "→" rightarrow # RIGHTWARDS ARROW + : "↓" downarrow # DOWNWARDS ARROW + : "↔" U2194 # LEFT RIGHT ARROW (kragen's) + : "↔" U2194 # LEFT RIGHT ARROW (kragen's) + : "↕" U2195 # UP DOWN ARROW (kragen's) + : "⇵" U21F5 # DOWNWARDS ARROW LEFTWARDS OF UPWARDS ARROW + : "↵" U21B5 # DOWNWARDS ARROW WITH CORNER LEFTWARDS + : "⟲" U27F2 # ANTICLOCKWISE GAPPED CIRCLE ARROW + : "⟳" U27F3 # CLOCKWISE GAPPED CIRCLE ARROW + : "↺" U21BA # ANTICLOCKWISE OPEN CIRCLE ARROW + : "↻" U21BB # CLOCKWISE OPEN CIRCLE ARROW + : "⇜" U21DC # LEFTWARDS SQUIGGLE ARROW + : "⇝" U21DD # RIGHTWARDS SQUIGGLE ARROW + : "⇤" U21E4 # LEFTWARDS ARROW TO BAR + : "⇥" U21E5 # RIGHTWARDS ARROW TO BAR + : "⇠" U21E0 # LEFTWARDS DASHED ARROW + : "⇡" U21E1 # UPWARDS DASHED ARROW + : "⇢" U21E2 # RIGHTWARDS DASHED ARROW + : "⇣" U21E3 # DOWNWARDS DASHED ARROW + +# Arrow keys don't always work: some apps trap them for cursor control and +# other boring things. The arrow symbols have alternate keystrokes. Do +# we need others for these printer's fists? If so, what? The -= and =- +# we had before are not necessarily the best choices. + : "☚" U261A # BLACK LEFT POINTING INDEX + : "☛" U261B # BLACK RIGHT POINTING INDEX + : "☜" U261C # WHITE LEFT POINTING INDEX + : "☝" U261D # WHITE UP POINTING INDEX + : "☞" U261E # WHITE RIGHT POINTING INDEX + : "☟" U261F # WHITE DOWN POINTING INDEX + : "✌" U270C # VICTORY HAND + : "✍" U270D # WRITING HAND +

: "✎" U270E # LOWER RIGHT PENCIL +

: "✏" U270F # PENCIL +

: "✐" U2710 # UPPER RIGHT PENCIL + +# For some logical statements. I prefer doubled arrows for implication. + : "⇒" U21D2 # RIGHTWARDS DOUBLE ARROW + : "⇐" U21D0 # LEFTWARDS DOUBLE ARROW + : "⇔" U21D4 # LEFT RIGHT DOUBLE ARROW + : "⇒" U21D2 # RIGHTWARDS DOUBLE ARROW + : "⇐" U21D0 # LEFTWARDS DOUBLE ARROW + : "⇔" U21D4 # LEFT RIGHT DOUBLE ARROW + : "⇔" U21D4 # LEFT RIGHT DOUBLE ARROW + : "⇑" U21D1 # UPWARDS DOUBLE ARROW + : "⇓" U21D3 # DOWNWARDS DOUBLE ARROW + : "⇕" U21D5 # UP DOWN DOUBLE ARROW + : "⏎" U23CE # RETURN SYMBOL +# These are just too cool-looking not to have (if your font supports them) + : "⸎" U2E0E # EDITORIAL CORONIS +

: "ꟼ" UA7FC # LATIN EPIGRAPHIC LETTER REVERSED P + : "ꟻ" UA7FB # LATIN EPIGRAPHIC LETTER REVERSED F +

: "ꟼ" UA7FC # LATIN EPIGRAPHIC LETTER REVERSED P + : "ꟽ" UA7FD # LATIN EPIGRAPHIC LETTER INVERTED M + : "ꟾ" UA7FE # LATIN EPIGRAPHIC LETTER I LONGA + : "ꟿ" UA7FF # LATIN EPIGRAPHIC LETTER ARCHAIC M +# I'd been avoiding this because we already have ∃... +# Hey, these, being *letters* can be used as identifiers in some languages... + : "Ǝ" U018E # LATIN CAPITAL LETTER REVERSED E + : "Ǝ" U018E # LATIN CAPITAL LETTER REVERSED E + : "ɘ" U0258 # LATIN SMALL LETTER REVERSED E + : "ɘ" U0258 # LATIN SMALL LETTER REVERSED E +# Complete the set + : "Ɐ" U2C6F # LATIN CAPITAL LETTER TURNED A +# These seem too long as keystrokes; any suggestions? +# How about 2o? + : "ꝏ" UA74F # LATIN SMALL LETTER OO + : "Ꝏ" UA74E # LATIN CAPITAL LETTER OO + <2> : "ꝏ" UA74F # LATIN SMALL LETTER OO + <2> : "Ꝏ" UA74E # LATIN CAPITAL LETTER OO +# Latin-D chars I'm particularly thinking about: +# (side note: "I" has many referents in this file.) +# ꜲꜳꜴꜵꜶꜷꜸꜹꜼꜽꝒꝓꝔꝕꝚꝛꝜꝝꝠꝡꝪꝫꝸ +# The ligature pairs are so easy, might as well include them (probably +# using ampersand though). P with flourish? Squirrel tail? How +# pretty! I like the r and rum rotunda, and et actually has something +# close to usefulness (it was very common for abbreviations, and is the +# source of the "z" in abbreviations like oz. and viz.) Some others +# are a little appealing too. + + : "Ꜳ" UA732 # LATIN CAPITAL LETTER AA + : "ꜳ" UA733 # LATIN SMALL LETTER AA + <2> : "Ꜳ" UA732 # LATIN CAPITAL LETTER AA + <2> : "ꜳ" UA733 # LATIN SMALL LETTER AA + : "Ꜵ" UA734 # LATIN CAPITAL LETTER AO + : "ꜵ" UA735 # LATIN SMALL LETTER AO + : "Ꜷ" UA736 # LATIN CAPITAL LETTER AU + : "ꜷ" UA737 # LATIN SMALL LETTER AU + : "Ꜹ" UA738 # LATIN CAPITAL LETTER AV + : "ꜹ" UA739 # LATIN SMALL LETTER AV + : "Ꜽ" UA73C # LATIN CAPITAL LETTER AY + : "ꜽ" UA73D # LATIN SMALL LETTER AY + : "Ꝇ" UA746 # LATIN CAPITAL LETTER BROKEN L + : "ꝇ" UA747 # LATIN SMALL LETTER BROKEN L +# (See above for reason behind keystrokes) + : "Ꝫ" UA75A # LATIN CAPITAL LETTER ET + : "ꝫ" UA75B # LATIN SMALL LETTER ET + : "Ꝡ" UA760 # LATIN CAPITAL LETTER VY + : "ꝡ" UA761 # LATIN SMALL LETTER VY + : "Ꝣ" UA762 # LATIN CAPITAL LETTER VISIGOTHIC Z + : "ꝣ" UA763 # LATIN SMALL LETTER VISIGOTHIC Z + : "Ỻ" U1EFA # LATIN CAPITAL LETTER MIDDLE-WELSH LL + : "ỻ" U1EFB # LATIN SMALL LETTER MIDDLE-WELSH LL + : "Ỽ" U1EFC # LATIN CAPITAL LETTER MIDDLE-WELSH V + : "ỽ" U1EFD # LATIN SMALL LETTER MIDDLE-WELSH V + : "ȸ" U0238 # LATIN SMALL LETTER DB DIGRAPH +

: "ȹ" U0239 # LATIN SMALL LETTER QP DIGRAPH + : "ƿ" U01BF # LATIN LETTER WYNN + : "Ƿ" U01F7 # LATIN CAPITAL LETTER WYNN + : "Ȣ" U0222 # LATIN CAPITAL LETTER OU + : "ȣ" U0223 # LATIN SMALL LETTER OU + : "Ʀ" U01A6 # LATIN LETTER YR + +# Custom additions: Mathematical symbols + : "≠" U2260 # NOT EQUAL TO + : "≠" U2260 # NOT EQUAL TO + : "≤" U2264 # LESS-THAN OR EQUAL TO + : "≥" U2265 # GREATER-THAN OR EQUAL TO + : "≸" U2278 # NEITHER LESS-THAN NOR GREATER-THAN +# MUCH is usually enough for me. No need for VERY. + : "≪" U226A # MUCH LESS-THAN + : "≫" U226B # MUCH GREATER-THAN +# Damn. That makes this conflict with the standard plus plus -> # + : "⋘" U22D8 # VERY MUCH LESS-THAN + : "⋙" U22D9 # VERY MUCH GREATER-THAN + <3> : "⋙" U22D9 # VERY MUCH GREATER-THAN + <3> : "⋘" U22D8 # VERY MUCH LESS-THAN + : "∈" U2208 # ELEMENT OF + : "∉" U2209 # NOT AN ELEMENT OF + : "∉" U2209 # NOT AN ELEMENT OF (I have ∈ on my keyboard...) + : "∋" U220B # CONTAINS AS MEMBER (I hope this doesn't conflict) + : "∌" U220C # DOES NOT CONTAIN AS MEMBER +# would conflict, with for N WITH UNDERDOT, etc. + : "∌" U220C # DOES NOT CONTAIN AS MEMBER + : "≅" U2245 # APPROXIMATELY EQUAL TO (It actually means "congruent"!) + : "≟" U225f # QUESTIONED EQUAL TO + : "≝" U225D # EQUAL TO BY DEFINITION + : "≝" U225D # EQUAL TO BY DEFINITION + : "≡" U2261 # IDENTICAL TO + : "≔" U2254 # COLON EQUALS + : "≕" U2255 # EQUALS COLON +# Using conflicts. + : "≢" U2262 # NOT IDENTICAL TO +# We already have ± + : "∓" U2213 # MINUS OR PLUS SIGN + : "√" U221A # SQUARE ROOT +# keystrokes might not make the most sense, but you know what they mean... + <3> : "∛" U221B # CUBE ROOT + <4> : "∜" U221C # FOURTH ROOT + # “(Note: I had put the backslash in position 5/15. It enabled the + # ALGOL “and” to be “/\” and the “or” to be “\/”.)” --- Bob Bemer, + # http://home.ccil.org/~remlaps/www.bobbemer.com/BRACES.HTM, quoting + # himself in “A view of the history of the ISO character code”, 1972 + : "∧" U2227 # LOGICAL AND + : "∨" U2228 # LOGICAL OR + : "⊻" U22BB # XOR + : "¬" U00AC # NOT SIGN + : "∘" U2218 # RING OPERATOR (function composition) + : "⨯" U2A2F # CROSS PRODUCT + : "⋅" U22C5 # DOT OPERATOR (dot product) + <0> : "∅" U2205 # EMPTY SET (thanks jsled!) + <0> : "∅" U2205 # EMPTY SET +# I'm hoping { can work as a set mnemonic + : "∪" U222A # UNION + : "∩" U2229 # INTERSECTION + : "⊂" U2282 # SUBSET OF + : "⊆" U2286 # SUBSET OF OR EQUAL TO + : "⊄" U2284 # NOT A SUBSET OF + : "⊄" U2284 # NOT A SUBSET OF + : "⊃" U2283 # SUPERSET OF + : "⊇" U2287 # SUPERSET OF OR EQUAL TO + : "∃" U2203 # THERE EXISTS +# We can't use ! E E, because ! E maps to E-WITH-UNDERDOT. + : "∄" U2204 # THERE DOES NOT EXIST + : "∀" U2200 # FOR ALL + : "∎" U220E # END OF PROOF + <8> <8> : "∞" U221E # INFINITY +

: "ℵ" U2135 # ALEF SYMBOL +

<0> : "ℵ₀" # ALEF Null +

<1> : "ℵ₁" # ALEF One + : "ℵ" U2135 # ALEF SYMBOL + : "∗" U2217 # ASTERISK OPERATOR + : "⊕" U2295 # CIRCLED PLUS + : "⊖" U2296 # CIRCLED MINUS + : "⊗" U2297 # CIRCLED TIMES + : "⊘" U2298 # CIRCLED DIVISION SLASH + : "⊛" U229B # CIRCLED ASTERISK OPERATOR +# )- conflicts with system for }. + : "⟌" U27CC # LONG DIVISION + : "∴" U2234 # THEREFORE + : "∵" U2235 # BECAUSE + : "∵" U2235 # BECAUSE + : "‱" U2031 # PER TEN THOUSAND (basis points) + : "µ" U00B5 # MICRO SIGN +# Ordinal indicators, for femenine and masculine, used in Romance languages + : "ª" U00AA # FEMININE ORDINAL INDICATOR + : "º" U00BA # MASCULINE ORDINAL INDICATOR + +# See also U03A3 (Greek capital sigma) + : "∑" U2211 # N-ARY SUMMATION +# OK, absolutely cannot believe we made it this long without NABLA or INTEGRAL +# or PARTIAL DIFFERENTIAL + : "∫" U222B # INTEGRAL + : "⨛" U2A1B # UPPER INTEGRAL + : "⨜" U2A1C # LOWER INTEGRAL + : "∬" U222C # DOUBLE INTEGRAL + : "∭" U222D # TRIPLE INTEGRAL + : "⨌" U2A0C # QUADRUPLE INTEGRAL + : "∮" U222E # CONTOUR INTEGRAL +

: "⨕" U2A15 # SEMICIRCULAR POLE INTEGRAL +

: "⨓" U2A13 # INTEGRAL AROUND POINT + : "∯" U222F # SURFACE INTEGRAL + : "∰" U2230 # VOLUME INTEGRAL + : "⨘" U2A18 # GEOMETRIC INTEGRAL + : "⨋" U2A0B # SUM/INTEGRAL +#Now for some WTF integrals: ⨙ ⨚ + : "∇" U2207 # NABLA +

: "∂" U2202 # PARTIAL DIFFERENTIAL + : "∂" U2202 # PARTIAL DIFFERENTIAL + : "ℜ" U211C # BLACK-LETTER CAPITAL R (Real Part) + : "ℑ" U2111 # BLACK-LETTER CAPTIAL I (Imaginary Part) + : "ℏ" U210F # PLANCK CONSTANT OVER TWO PI + : "ℏ" U210F # PLANCK CONSTANT OVER TWO PI +

: "ℎ" U210E # PLANCK CONSTANT +

: "ℯ" U212F # SCRIPT SMALL E + <1> <0> : "⏨" U23E8 # DECIMAL EXPONENT SYMBOL +

: "℘" U2118 # SCRIPT CAPITAL P +# Would we prefer 20D1 COMBINING RIGHT HARPOON ABOVE? + : "⃗" U20D7 # COMBINING RIGHT ARROW ABOVE (vector) +# There's a whole passel of these guys starting at U+1D538 but I have no fonts for those. + : "ℂ" U2102 # DOUBLE-STRUCK CAPITAL C (set of complex numbers) + : "ℕ" U2115 # DOUBLE-STRUCK CAPITAL N (natural number) +

: "ℙ" U2119 # DOUBLE-STRUCK CAPITAL P + : "ℚ" U211A # DOUBLE-STRUCK CAPITAL Q (set of rational numbers) + : "ℝ" U211D # DOUBLE-STRUCK CAPITAL R (set of real numbers) + : "ℤ" U2124 # DOUBLE-STRUCK CAPITAL Z (set of integers) + : "ℍ" U210d # DOUBLE-STRUCK CAPITAL H + : "ⅇ" U2147 # DOUBLE-STRUCK ITALIC SMALL E + : "ⅈ" U2148 # DOUBLE-STRUCK ITALIC SMALL I + : "ⅉ" U2149 # DOUBLE-STRUCK ITALIC SMALL J +

: "ℼ" U213C # DOUBLE-STRUCK SMALL PI + : "ℼ" U213C # DOUBLE-STRUCK SMALL PI +

: "ℿ" U213F # DOUBLE-STRUCK CAPITAL PI + : "ℿ" U213F # DOUBLE-STRUCK CAPITAL PI + : "⅀" U2140 # DOUBLE-STRUCK N-ARY SUMMATION + : "⅀" U2140 # DOUBLE-STRUCK N-ARY SUMMATION + : "⦂" U2982 # Z NOTATION TYPE COLON +# Apparently it is only for historical reasons that this is not unified with +# ⨟ U+2A1F Z NOTATION SCHEMA COMPOSITION + : "⨾" U2A3E # Z NOTATION RELATIONAL COMPOSITION +# The *look* double-struck. + : "⦃" U2983 # LEFT WHITE CURLY BRACKET + : "⦄" U2984 # RIGHT WHITE CURLY BRACKET +# ⦅⦆⦇⦈⦉⦊ too? +# The rest of that block? Some there may be worth it. +# Ooh. There are lots of nice brackets to consider: +# ⟅⟆⟨⟩⟪⟫⟬⟭⟮⟯⦑⦒⦓⦔⦕⦖⦗⦘⧼⧽⧘⧙⧚⧛⸢⸣⸤⸥⸨⸩「」『』 +# Others too, of course, but these to start with. Some are likely worthy. + : "⟅" U27C5 # LEFT S-SHAPED BAG DELIMITER + : "⟆" U27C6 # RIGHT S-SHAPED BAG DELIMITER +# There are a lot of angle brackets (3008/9, 27E8/9, 2329/A). I'm deciding +# to go with the mathematical brackets from now on, since they seem to be +# better supported. + : "⟨" U27E8 # MATHEMATICAL LEFT ANGLE BRACKET + : "⟩" U27E9 # MATHEMATICAL RIGHT ANGLE BRACKET + : "⟦" U27E6 # MATHEMATICAL LEFT WHITE SQUARE BRACKET + : "⟧" U27E7 # MATHEMATICAL RIGHT WHITE SQUARE BRACKET + : "⧘" U29D8 # LEFT WIGGLY FENCE + : "⧙" U29D9 # RIGHT WIGGLY FENCE + <2> : "⧚" U29DA # LEFT DOUBLE WIGGLY FENCE + <2> : "⧛" U29DB # RIGHT DOUBLE WIGGLY FENCE + : "⸨" U2E28 # LEFT DOUBLE PARENTHESIS + : "⸩" U2E29 # RIGHT DOUBLE PARENTHESIS + <2> : "⸨" U2E28 # LEFT DOUBLE PARENTHESIS + <2> : "⸩" U2E29 # RIGHT DOUBLE PARENTHESIS + : "༼" U0F3C # TIBETAN MARK ANG KHANG GYON + : "༽" U0F3D # TIBETAN MARK ANG KHANG GYAS +# I'm thinking shape-mnemonics for these, somehow: + : "⌊" U230A # LEFT FLOOR + : "⌋" U230B # RIGHT FLOOR + <7> : "⌈" U2308 # LEFT CEILING + <7> : "⌉" U2309 # RIGHT CEILING +# These are actually quotes, hence the mnemonic. + <7> : "「" UFF62 # HALFWIDTH LEFT CORNER BRACKET + : "」" UFF63 # HALFWIDTH RIGHT CORNER BRACKET + <7> : "『" U300E # LEFT WHITE CORNER BRACKET + : "』" U300F # RIGHT WHITE CORNER BRACKET + : "≬" U226C # BETWEEN + : "ℓ" U2113 # SCRIPT SMALL L + : "⊏" U228F # SQUARE IMAGE OF + : "⊑" U2291 # SQUARE IMAGE OF OR EQUAL TO + : "⊑" U2291 # SQUARE IMAGE OF OR EQUAL TO + : "⊐" U2290 # SQUARE ORIGINAL OF + : "⊒" U2292 # SQUARE ORIGINAL OF OR EQUAL TO + : "⊒" U2292 # SQUARE ORIGINAL OF OR EQUAL TO +# If I did more Haskell, I'd want this more: + : "⊥" U22A5 # UP TACK (bottom) or should we use U27C2 PERPENDICULAR? + : "⊤" U22A4 # DOWN TACK (opposite of False) + : "⊢" U22A2 # RIGHT TACK + : "⊣" U22A2 # LEFT TACK +# Handy for UNIX filenames... but XXX conflicts with standard → "\" + : "⁄" U2044 # FRACTION SLASH + +# The system file gives us subscript numbers, plus/minus, and parens. But +# there are letters missing. It would be nice to have at least a few of them. + +# block U+208x + <0> : "₀" U2080 # SUBSCRIPT ZERO + <1> : "₁" U2081 # SUBSCRIPT ONE + <2> : "₂" U2082 # SUBSCRIPT TWO + <3> : "₃" U2083 # SUBSCRIPT THREE + <4> : "₄" U2084 # SUBSCRIPT FOUR + <5> : "₅" U2085 # SUBSCRIPT FIVE + <6> : "₆" U2086 # SUBSCRIPT SIX + <7> : "₇" U2087 # SUBSCRIPT SEVEN + <8> : "₈" U2088 # SUBSCRIPT EIGHT + <9> : "₉" U2089 # SUBSCRIPT NONE + : "₊" U208A # SUBSCRIPT PLUS + : "₋" U208B # SUBSCRIPT MINUS + : "₌" U208C # SUBSCRIPT EQUALS SIGN + : "₍" U208D # SUBSCRIPT LEFT PARENTHESIS + : "₎" U208E # SUBSCRIPT RIGHT PARENTHESIS + +# block U+209x + : "ₐ" U2090 # LATIN SUBSCRIPT SMALL LETTER A + : "ₑ" U2091 # LATIN SUBSCRIPT SMALL LETTER E + : "ₒ" U2092 # LATIN SUBSCRIPT SMALL LETTER O + : "ₓ" U2093 # LATIN SUBSCRIPT SMALL LETTER X + : "ₕ" U2095 # LATIN SUBSCRIPT SMALL LETTER H + : "ₖ" U2096 # LATIN SUBSCRIPT SMALL LETTER K + : "ₗ" U2097 # LATIN SUBSCRIPT SMALL LETTER L + : "ₘ" U2098 # LATIN SUBSCRIPT SMALL LETTER M + : "ₙ" U2099 # LATIN SUBSCRIPT SMALL LETTER N +

: "ₚ" U209A # LATIN SUBSCRIPT SMALL LETTER P + : "ₛ" U209B # LATIN SUBSCRIPT SMALL LETTER S + : "ₜ" U209C # LATIN SUBSCRIPT SMALL LETTER T + +# subscripts in other blocks + : "ᵢ" U1D62 # LATIN SUBSCRIPT SMALL LETTER I + : "ⱼ" U2C7C # LATIN SUBSCRIPT SMALL LETTER J + : "ᵣ" U1D63 # LATIN SUBSCRIPT SMALL LETTER R + : "ᵤ" U1D64 # LATIN SUBSCRIPT SMALL LETTER U + : "ᵥ" U1D65 # LATIN SUBSCRIPT SMALL LETTER V + : "ᵦ" U1D66 # GREEK SUBSCRIPT SMALL LETTER BETA + : "ᵧ" U1D67 # GREEK SUBSCRIPT SMALL LETTER GAMMA + : "ᵨ" U1D68 # GREEK SUBSCRIPT SMALL LETTER RHO + : "ᵩ" U1D69 # GREEK SUBSCRIPT SMALL LETTER PHI + : "ᵪ" U1D6A # GREEK SUBSCRIPT SMALL LETTER CHI + +# Custom additions: Greek letters. Mapping corresponds to Emacs Greek +# input method. Aristotle Pagaltzis informs me that this is the +# standard Greek keyboard layout, which is good. + : "α" U03B1 # GREEK SMALL LETTER ALPHA + : "β" U03B2 # GREEK SMALL LETTER BETA + : "ψ" U03C8 # GREEK SMALL LETTER PSI + : "δ" U03B4 # GREEK SMALL LETTER DELTA + : "ε" U03B5 # GREEK SMALL LETTER EPSILON + : "φ" U03C6 # GREEK SMALL LETTER PHI + : "γ" U03B3 # GREEK SMALL LETTER GAMMA + : "η" U03B7 # GREEK SMALL LETTER ΕΤΑ + : "ι" U03B9 # GREEK SMALL LETTER ΙΟΤΑ + : "ξ" U03BE # GREEK SMALL LETTER XI + : "κ" U03BA # GREEK SMALL LETTER KAPPA + : "λ" U03BB # GREEK SMALL LETTER LAMBDA + : "μ" U03BC # GREEK SMALL LETTER MU + : "ν" U03BD # GREEK SMALL LETTER NU + : "ο" U03BF # GREEK SMALL LETTER OMICRON +

: "π" U03C0 # GREEK SMALL LETTER PI +# no mapping for q; in Emacs that's ";" +# U037E GREEK QUESTION MARK is canonically equivalent to U003B SEMICOLON. + : "ρ" U03C1 # GREEK SMALL LETTER RHO + : "σ" U03C3 # GREEK SMALL LETTER SIGMA + : "τ" U03C4 # GREEK SMALL LETTER TAU + : "θ" U03B8 # GREEK SMALL LETTER THETA + : "ω" U03C9 # GREEK SMALL LETTER OMEGA + : "ς" U03C2 # GREEK SMALL LETTER FINAL SIGMA + : "χ" U03C7 # GREEK SMALL LETTER CHI + : "υ" U03C5 # GREEK SMALL LETTER UPSILON + : "ζ" U03B6 # GREEK SMALL LETTER ZETA + +# Capital greek letters. + : "Α" U0391 # GREEK CAPITAL LETTER ALPHA + : "Β" U0392 # GREEK CAPITAL LETTER BETA + : "Ψ" U03A8 # GREEK CAPITAL LETTER PSI + : "Δ" U0394 # GREEK CAPITAL LETTER DELTA + : "Ε" U0395 # GREEK CAPITAL LETTER EPSILON + : "Φ" U03A6 # GREEK CAPITAL LETTER PHI + : "Γ" U0393 # GREEK CAPITAL LETTER GAMMA + : "Η" U0397 # GREEK CAPITAL LETTER ΕΤΑ + : "Ι" U0399 # GREEK CAPITAL LETTER ΙΟΤΑ + : "Ξ" U039E # GREEK CAPITAL LETTER XI + : "Κ" U039A # GREEK CAPITAL LETTER KAPPA + : "Λ" U039B # GREEK CAPITAL LETTER LAMBDA + : "Μ" U039C # GREEK CAPITAL LETTER MU + : "Ν" U039D # GREEK CAPITAL LETTER NU + : "Ο" U039F # GREEK CAPITAL LETTER OMICRON +

: "Π" U03A0 # GREEK CAPITAL LETTER PI +# see below for Q qoppa; in Emacs Q is “:” + : "Ρ" U03A1 # GREEK CAPITAL LETTER RHO + : "Σ" U03A3 # GREEK CAPITAL LETTER SIGMA + : "Τ" U03A4 # GREEK CAPITAL LETTER TAU + : "Θ" U0398 # GREEK CAPITAL LETTER THETA + : "Ω" U03A9 # GREEK CAPITAL LETTER OMEGA +# Emacs maps W to "Σ", but I think that’s stupid +# I think that's from the Greek keyboard. + : "Χ" U03A7 # GREEK CAPITAL LETTER CHI + : "Υ" U03A5 # GREEK CAPITAL LETTER UPSILON + : "Ζ" U0396 # GREEK CAPITAL LETTER ZETA + +# Some archaic Greek. If we only wanted *normal* characters we wouldn't be +# doing this at all! +# "period" will indicate a sort of variant of some kind; asterisk is still the "greek" marker +

: "ϖ" U03D6 # GREEK PI SYMBOL +# Reserving .f in case we want PHI SYMBOL. Digamma was "w" sound anyway. + : "ϝ" U03DD # GREEK SMALL LETTER DIGAMMA + : "Ϝ" U03DC # GREEK CAPITAL LETTER DIGAMMA + : "Ϟ" U03DE # GREEK LETTER QOPPA + : "ϟ" U03DF # GREEK SMALL LETTER QOPPA + : "Ϙ" U03D8 # GREEK LETTER ARCHAIC QOPPA + : "ϙ" U03D9 # GREEK SMALL LETTER ARCHAIC QOPPA + : "ϗ" U03D7 # GREEK KAI SYMBOL + : "Ϡ" U03E0 # GREEK LETTER SAMPI + : "ϡ" U03E1 # GREEK SMALL LETTER SAMPI + : "Ͳ" U0372 # GREEK CAPITAL LETTER ARCHAIC SAMPI + : "ͳ" U0373 # GREEK SMALL LETTER ARCHAIC SAMPI +# Sorry, couldn't think of better ones for these. Might want .s for SAN. + : "Ϛ" U03DA # GREEK LETTER STIGMA + : "ϛ" U03DB # GREEK SMALL LETTER STIGMA + : "ʹ" U02B9 # MODIFIER LETTER PRIME, canonically equivalent to U0374 GREEK NUMERAL SIGN +# While we're at it... + : "′" U2032 # PRIME + : "″" U2033 # DOUBLE PRIME + : "͵" U0375 # GREEK LOWER NUMERAL SIGN (for thousands) +# Do we want BETA SYMBOL, RHO SYMBOL, KAPPA SYMBOL, PHI SYMBOL, THETA SYMBOL? +# The format makes them obvious enough I guess. PI SYMBOL is different enough +# that there's no question, and it is separate from these. + : "ϐ" U03D0 # GREEK BETA SYMBOL + : "ϑ" U03D1 # GREEK THETA SYMBOL + : "ϒ" U03D2 # GREEK UPSILON WITH HOOK SYMBOL + : "ϕ" U03D5 # GREEK PHI SYMBOL + : "ϰ" U03F0 # GREEK KAPPA SYMBOL + : "ϱ" U03F1 # GREEK RHO SYMBOL + : "ϴ" U03F4 # GREEK CAPITAL THETA SYMBOL + : "ϵ" U03F5 # GREEK LUNATE EPSILON SYMBOL +# Not doing the lunate sigmas and dotted versions thereof... What about SAN, which is at least a letter? + : "ϻ" U03FB # GREEK SMALL LETTER SAN + : "Ϻ" U03FA # GREEK CAPITAL LETTER SAN + +# If you wanted to actually type in Greek, you would also need άίέ +# etc. But you would probably just switch to a Greek keyboard layout. + +# Custom additions: fractions + <1> <3> : "⅓" U2153 # VULGAR FRACTION ONE THIRD + <2> <3> : "⅔" U2154 # VULGAR FRACTION TWO THIRDS +# more extensive fractions from jsled + <1> <5> : "⅕" U2155 # VULGAR FRACTION ONE FIFTH + <2> <5> : "⅖" U2156 # VULGAR FRACTION TWO FIFTHS + <3> <5> : "⅗" U2157 # VULGAR FRACTION THREE FIFTHS + <4> <5> : "⅘" U2158 # VULGAR FRACTION FOUR FIFTHS + <1> <6> : "⅙" U2159 # VULGAR FRACTION ONE SIXTH + <5> <6> : "⅚" U215A # VULGAR FRACTION FIVE SIXTHS + <1> <8> : "⅛" U215B # VULGAR FRACTION ONE EIGHTH + <3> <8> : "⅜" U215C # VULGAR FRACTION THREE EIGHTHS + <5> <8> : "⅝" U215D # VULGAR FRACTION FIVE EIGHTHS + <7> <8> : "⅞" U215E # VULGAR FRACTION SEVEN EIGHTHS + <1> <7> : "⅐" U2150 # VULGAR FRACTION ONE SEVENTH + <1> <9> : "⅑" U2151 # VULGAR FRACTION ONE NINTH + <1> : "⅒" U2152 # VULGAR FRACTION ONE TENTH + <0> <3> : "↉" U2189 # VULGAR FRACTION ZERO THIRDS + <1> : "⅟" U215F # FRACTION NUMERATOR ONE + +# How about roman numerals? Percent for numerical mnemonic? +# Does this go against the spirit of this file? These symbols are accessible +# as regular letters and would look okay. Maybe only for I-X? + <1> : "ⅰ" U2170 # SMALL ROMAN NUMERAL ONE + <2> : "ⅱ" U2171 # SMALL ROMAN NUMERAL TWO + <3> : "ⅲ" U2172 # SMALL ROMAN NUMERAL THREE + <4> : "ⅳ" U2173 # SMALL ROMAN NUMERAL FOUR + <5> : "ⅴ" U2174 # SMALL ROMAN NUMERAL FIVE + <6> : "ⅵ" U2175 # SMALL ROMAN NUMERAL SIX + <7> : "ⅶ" U2176 # SMALL ROMAN NUMERAL SEVEN + <8> : "ⅷ" U2177 # SMALL ROMAN NUMERAL EIGHT + <9> : "ⅸ" U2178 # SMALL ROMAN NUMERAL NINE + : "ⅹ" U2179 # SMALL ROMAN NUMERAL TEN +# How do we handle eleven and twelve? + <1> : "ⅺ" U217A # SMALL ROMAN NUMERAL ELEVEN + <2> : "ⅻ" U217B # SMALL ROMAN NUMERAL TWELVE +# That okay? + : "ⅼ" U217C # SMALL ROMAN NUMERAL FIFTY + : "ⅽ" U217D # SMALL ROMAN NUMERAL ONE HUNDRED + : "ⅾ" U217E # SMALL ROMAN NUMERAL FIVE HUNDRED + : "ⅿ" U217F # SMALL ROMAN NUMERAL ONE THOUSAND +### + <0> <1> : "Ⅰ" U2160 # ROMAN NUMERAL ONE + <0> <2> : "Ⅱ" U2161 # ROMAN NUMERAL TWO + <0> <3> : "Ⅲ" U2162 # ROMAN NUMERAL THREE + <0> <4> : "Ⅳ" U2163 # ROMAN NUMERAL FOUR + <0> <5> : "Ⅴ" U2164 # ROMAN NUMERAL FIVE + <0> <6> : "Ⅵ" U2165 # ROMAN NUMERAL SIX + <0> <7> : "Ⅶ" U2166 # ROMAN NUMERAL SEVEN + <0> <8> : "Ⅷ" U2167 # ROMAN NUMERAL EIGHT + <0> <9> : "Ⅸ" U2168 # ROMAN NUMERAL NINE + <0> : "Ⅹ" U2169 # ROMAN NUMERAL TEN +# How do we handle eleven and twelve? + <0> <1> : "Ⅺ" U216A # ROMAN NUMERAL ELEVEL + <0> <2> : "Ⅻ" U216B # ROMAN NUMERAL TWELVE + <0> : "Ⅼ" U216C # ROMAN NUMERAL FIFTY + <0> : "Ⅽ" U216D # ROMAN NUMERAL ONE HUNDRED + <0> : "Ⅾ" U216E # ROMAN NUMERAL FIVE HUNDRED + <0> : "Ⅿ" U216F # ROMAN NUMERAL ONE THOUSAND + : "Ⅹ" U2169 # ROMAN NUMERAL TEN + : "Ⅼ" U216C # ROMAN NUMERAL FIFTY + : "Ⅽ" U216D # ROMAN NUMERAL ONE HUNDRED + : "Ⅾ" U216E # ROMAN NUMERAL FIVE HUNDRED + : "Ⅿ" U216F # ROMAN NUMERAL ONE THOUSAND + <0> : "ↀ" U2180 # ROMAN NUMERAL ONE THOUSAND C D + <0> : "ↁ" U2181 # ROMAN NUMERAL FIVE THOUSAND + <0> : "ↂ" U2182 # ROMAN NUMERAL TEN THOUSAND + <0> <0> : "ↇ" U2187 # ROMAN NUMERAL FIFTY THOUSAND + <0> <0> : "ↈ" U2188 # ROMAN NUMERAL ONE HUNDRED THOUSAND + + +# Custom additions: for chat (kragen) + : "☻" U263B # BLACK SMILING FACE + : "☺" U263A # WHITE SMILING FACE + : "☹" U2639 # WHITE FROWNING FACE + : "⍨" U2368 # APL FUNCTIONAL SYMBOL TILDE DIAERESIS + : "⸚" U2E1A # HYPHEN WITH DIAERESIS + : "°͜°" # Funny smiley-face. +# Those are archaic cyrilic letters... but look so _perfect_ for use +# in chat. And about the last, the "multiocular O"... Well, I don't +# know what it can be used for, but given the description, how could I +# leave it out‽ +# (I guess using U+1F440 EYES would be more straightforward, but not as funny?) + : "Ꙭ" UA66C # CYRILLIC CAPITAL LETTER DOUBLE MONOCULAR O * used in the dual of words based on the root for 'eye' + : "ꙭ" UA66D # CYRILLIC SMALL LETTER DOUBLE MONOCULAR O + : "Ꙫ" UA66A # CYRILLIC CAPITAL LETTER BINOCULAR O * used in the dual of words based on the root for 'eye' + : "ꙫ" UA66B # CYRILLIC SMALL LETTER BINOCULAR O + : "ꙮ" UA66E # CYRILLIC LETTER MULTIOCULAR O * used in the epithet 'many-eyed' +# While we're doing stacks of circles with dots. + <3> : "߷" U07F7 # NKO SYMBOL GBAKURUNEN + : "‽" U203D # INTERROBANG + : "⸘" U2E18 # INVERTED INTERROBANG, standard now. + : "⸘" U2E18 # INVERTED INTERROBANG (if you have a ¡ key. Otherwise...? "?i" maybe? + : "⸘" U2E18 # INVERTED INTERROBANG (if you have a ¡ key. Otherwise...? "?i" maybe? + : "⸮" U2E2E # REVERSED QUESTION MARK + : "⸮" U2E2E # REVERSED QUESTION MARK + : "⁇" U2047 # DOUBLE QUESTION MARK + <2> : "⁇" U2047 # DOUBLE QUESTION MARK + : "⁈" U2048 # QUESTION EXCLAMATION MARK + : "⁉" U2049 # EXCLAMATION QUESTION MARK + : "‼" U203C # DOUBLE EXCLAMATION MARK + <2> : "‼" U203C # DOUBLE EXCLAMATION MARK + <2> : "∷" U2237 # PROPORTION -- not strictly 2 times COLON + : "⁏" U204F # REVERSED SEMICOLON + : "⁏" U204F # REVERSED SEMICOLON +# Keep looking into big hunks of Latin Extended-D, A720- et seq. + <3> : "♥" U2665 # BLACK HEART SUIT + <3> <3> : "♣" U2663 # BLACK CLUB SUIT + <8> : "♣" U2663 # BLACK CLUB SUIT + <3> : "♣" U2663 # BLACK CLUB SUIT + : "♢" U2662 # WHITE DIAMOND SUIT + <3> : "♠" U2660 # BLACK SPADE SUIT + : "♠" U2660 # BLACK SPADE SUIT + : "♡" U2661 # WHITE HEART SUIT +# "shamrock" is too long; there IS a limit to these! + : "☘" U2618 # SHAMROCK + : "☘" U2618 # SHAMROCK +

: "☮" U262E # PEACE SYMBOL +

: "☮" U262E # PEACE SYMBOL + : "☯" U262F # YIN YANG + : "☯" U262F # YIN YANG +# And now that we are into hearts... + <3> : "❥" U2765 # ROTATED HEAVY BLACK HEART BULLET + <3> : "❣" U2763 # HEAVY HEART EXCLAMATION MARK ORNAMENT + <3> : "❦" U2766 # FLORAL HEART + <3> : "❧" U2767 # ROTATED FLORAL HEART BULLET + <3> : "☙" U2619 # REVERSED ROTATED FLORAL HEART BULLET + : "☎" U260E # BLACK TELEPHONE + : "☕" U2615 # HOT BEVERAGE +# These last two bother me less, though they can still be improved. +# Other possibly useful symbols: +# 2668 HOT SPRINGS (for chat, for running off to shower?) +# I want 2713-2714 and 2717-2718 +# We need a Dingbats prefix, for ❛❜❝❞❢ + : "☐" U2610 # BALLOT BOX +# Better keystrokes anyone? This one breaks the pattern. [c]? [v]? [y]? [/]? + : "☑" U2611 # BALLOT BOX WITH CHECK + : "☑" U2611 # BALLOT BOX WITH CHECK + : "☒" U2612 # BALLOT BOX WITH X +# @ for dingbats? + : "✓" U2713 # CHECK MARK + : "✔" U2714 # HEAVY CHECK MARK + : "✗" U2717 # BALLOT X + : "✘" U2718 # HEAVY BALLOT X +# Will I want for something else? +# Now there is such a thing as text style and emoji style. Use the +# "dingbat prefix" in an unusual way: + : "️" UFE0F # Emoji selector + : "︎" UFE0E # Text selector +# How about dice? + <1> : "⚀" U2680 # DIE FACE-1 + <2> : "⚁" U2681 # DIE FACE-2 + <3> : "⚂" U2682 # DIE FACE-3 + <4> : "⚃" U2683 # DIE FACE-4 + <5> : "⚄" U2684 # DIE FACE-5 + <6> : "⚅" U2685 # DIE FACE-6 +# 267B BLACK UNIVERSAL RECYCLING SYMBOL + +# Keystrokes okay? + : "⚜" U269C # FLEUR-DE-LIS + : "⚛" U269B # ATOM SYMBOL +

: "☭" U262D # HAMMER AND SICKLE + : "⚠" U26A0 # WARNING SIGN + : "⚠" U26A0 # WARNING SIGN +

: "⚡" U26A1 # HIGH VOLTAGE SIGN +# Shouldn't use just because it's too likely to be a prefix for +# a useful word. + : "☢" U2622 # RADIOACTIVE SIGN + : "☣" U2623 # BIOHAZARD SIGN + : "☣" U2623 # BIOHAZARD SIGN +# Changing this from ⚝ + : "⛤" U26E4 # PENTAGRAM (pentalpha, get it?) +

: "✈" U2708 # AIRPLANE + : "✉" U2709 # ENVELOPE + : "♿" U267F # WHEELCHAIR SYMBOL + : "☤" U2624 # CADEUCEUS +# Something different for STAFF OF AESCULAPIUS? + <1> : "⚕" U2695 # STAFF OF AESCULAPIUS +# 26B0 COFFIN ? +# One of the SNOWFLAKEs? +# SNOWMAN? COMET? ANCHOR? +# Maybe if we go with having a "word" symbol and spelling out lots and +# lots of whole words, we can have all the planets. +# +# I already have STAR OF DAVID on another map. +# 231A, 231B -- WATCH and HOURGLASS -- one should be &-w-a-i-t +# 23D4 METRICAL LONG OVER TWO SHORTS a.k.a. METRICAL BOOBS +# 0950 DEVANAGARI OM? +# 212E ESTIMATED SYMBOL? +# 2324 UP ARROWHEAD BETWEEN TWO HORIZONTAL BARS a.k.a. NOT AMUSED +# 237E BELL SYMBOL a.k.a. ALIENS LANDING + + : "♀" U2640 # FEMALE SIGN + : "♂" U2642 # MALE SIGN + + : "⚣" U26A3 # DOUBLED MALE SIGN + : "⚢" U26A2 # DOUBLED FEMALE SIGN + : "⚤" U26A4 # INTERLOCKED FEMALE AND MALE SIGN + +# 'trans': short for transgender/transexual +# 'genderq': short for genderqueer. +# Wasn't sure which to call which symbol, and wanted to include both + : "⚥" U26A5 # MALE AND FEMALE SIGN + : "⚧" U26A7 # MALE WITH STROKE AND MALE AND FEMALE SIGN + + + : "☠" U2620 # SKULL AND CROSSBONES + : "☠" U2620 # SKULL AND CROSSBONES + : "☠" U2620 # SKULL AND CROSSBONES + : "⌨" U2328 # KEYBOARD + : "☞" U261E # WHITE RIGHT POINTING INDEX + : "☜" U261C # WHITE LEFT POINTING INDEX + :"★" U2605 # BLACK STAR + <0> :"☆" U2606 # WHITE STAR + :"✪" U272A # CIRCLED WHITE STAR + <3> :"⁂" U2042 # ASTERISM + <3> :"⁂" U2042 # ASTERISM + <2> :"⁑" U2051 # TWO ASTERISKS ALIGNED VERTICALLY + <4> :"✢" U2722 # FOUR TEARDROP-SPOKED ASTERISK + <6> :"✡" U2721 # STAR OF DAVID + :"✯" U272F # PINWHEEL STAR + :"✱" U2731 # HEAVY ASTERISK + : "❖" U2756 # BLACK DIAMOND MINUS WHITE X + : "⌘" U2318 # PLACE OF INTEREST SIGN +# Using backslash-minus-slash etc. conflicts with combining accents. + : "⚞" U269E # THREE LINES CONVERGING RIGHT + : "⚟" U269F # THREE LINES CONVERGING LEFT + : "⍾" U237E # BELL SYMBOL (or ALIENS LANDING) -- &-a-l-i-e-n ? +# Other monstery characters... ѪꙚ (alien abductions?) +# ඏൠഋ & others from Kannada et al...? +# Can't use -^- for this; conflicts with -^ for ↑, and getting those arrows +# workable was complicated enough. How about this? + : "⌤" U2324 # UP ARROWHEAD BETWEEN TWO HORIZONTAL BARS; aka ENTER KEY, aka NOT AMUSED. + : "⌛" U231B # HOURGLASS + : "⌛" U231B # HOURGLASS + : "⌚" U231A # WATCH + : "⌚" U231A # WATCH + : " " U2002 # EN SPACE + : " " U2003 # EM SPACE + <3> : " " U2004 # THREE-PER-EM SPACE + <4> : " " U2005 # FOUR-PER-EM SPACE + : "◌" U25CC # DOTTED CIRCLE + : "⬚" U2B1A # DOTTED SQUARE + : "﴾" UFD3E # ORNATE LEFT PARENTHESIS + : "﴿" UFD3F # ORNATE RIGHT PARENTHESIS + : "ʘ" U0298 # LATIN LETTER BILABIAL CLICK (kiss sound) + : "‣" U2023 # TRIANGULAR BULLET +#SUPERSCRIPTS: +#To avoid namespace clashes, is doubled (will I regret that?) + : "ʰ" U02B0 # SUPERSCRIPT H + : "ⁱ" U2071 # SUPERSCRIPT I + : "ʲ" U02B2 # SUPERSCRIPT J + : "ⁿ" U207F # SUPERSCRIPT N + : "ʳ" U02B3 # SUPERSCRIPT R + : "ʷ" U02B7 # SUPERSCRIPT W + : "ʸ" U02B8 # SUPERSCRIPT Y +# So I can use yᵗ/þᵗ and yᵉ/þᵉ + : "ᵉ" U1D49 # MODIFIER LETTER SMALL E + : "ᵗ" U1D57 # MODIFIER LETTER SMALL T +# Abbreviation for "that": + : "ꝥ" UA765 # LATIN SMALL LETTER THORN WITH STROKE +#Maybe add: ˀˁ˃˂ Need to be able to talk about ʔˁ... + : "ˀ" U02C0 # MODIFIER LETTER GLOTTAL STOP + : "ˁ" U02C1 # MODIFIER LETTER REVERSED GLOTTAL STOP + : "⁻" U207B # SUPERSCRIPT MINUS + : "⁺" U207A # SUPERSCRIPT PLUS + + : "≈" U2248 # ALMOST EQUAL TO + : "ʃ" U0283 # LATIN SMALL LETTER ESH + : "ʒ" U0292 # LATIN SMALL LETTER EZH + : "ɬ" U026C # LATIN SMALL LETTER L WITH BELT + <3> : "ɮ" U026E # LATIN SMALL LETTER LEZH + : "ȝ" U021D # LATIN SMALL LETTER YOGH + : "Ȝ" U021C # LATIN CAPITAL LETTER YOGH + : "ʔ" U0294 # LATIN LETTER GLOTTAL STOP + : "ʕ" U0295 # LATIN LETTER PHARYNGEAL VOICED FRICATIVE +# Not great keystrokes... + : "ʖ" U0296 # LATIN LETTER INVERTED GLOTTAL STOP + : "ʡ" U02A1 # LATIN LETTER GLOTTAL STOP WITH STROKE + : "ʢ" U02A2 # LATIN LETTER REVERSED GLOTTAL STOP WITH STROKE +# How about ɸ? φ isn’t the IPA glyph. +

: "ɸ" U0278 # LATIN SMALL LETTER PHI + : "ɪ" U026A # LATIN LETTER SMALL CAPITAL I + : "ɪ" U026A # LATIN LETTER SMALL CAPITAL I + : "ʊ" U028A # LATIN SMALL LETTER UPSILON + : "ʊ" U028A # LATIN SMALL LETTER UPSILON + : "ɑ" U0251 # LATIN SMALL LETTER ALPHA + : "ɚ" U025A # LATIN SMALL LETTER SCHWA WITH HOOK + :"ɔ" U0254 # LATIN SMALL LETTER OPEN O + : "ɔ" U0254 # LATIN SMALL LETTER OPEN O + :"Ɔ" U0186 # LATIN CAPITAL LETTER OPEN O + : "Ɔ" U0186 # LATIN CAPITAL LETTER OPEN O + : "ɛ" U025B # LATIN SMALL LETTER OPEN E +# Have to put the at the beginning for these. + : "ɜ" U025C # LATIN SMALL LETTER REVERSED OPEN E + : "ɜ" U025C # LATIN SMALL LETTER REVERSED OPEN E + : "ɝ" U025D # LATIN SMALL LETTER REVERSED OPEN E WITH HOOK + : "ɝ" U025D # LATIN SMALL LETTER REVERSED OPEN E WITH HOOK +# It's spelled "gy" in Hungarian... + : "ɟ" U025F # LATIN SMALL LETTER DOTLESS J WITH STROKE +# How are these keystrokes? + : "ˈ" U02C8 # MODIFIER LETTER VERTICAL LINE + : "ˌ" U02CC # MODIFIER LETTER LOW VERTICAL LINE + : "̩" U0329 # COMBINING VERTICAL LINE BELOW +# Harmonize with other combiners. + : "̩" U0329 # COMBINING VERTICAL LINE BELOW + : "ɹ" U0279 # LATIN SMALL LETTER TURNED R: voiced alveolar approximant (American English (at least) R) + : "ɾ" U027E # LATIN SMALL LETTER R WITH FISHHOOK: voiced alveolar flap or tap (American English intervocalic allophone of d, or Spanish r) + : "ʌ" U028C # LATIN SMALL LETTER TURNED V + : "ɯ" U026F # LATIN SMALL LETTER TURNED M +# doubling a letter seems to be mostly used for turning + : "ʍ" U028D # LATIN SMALL LETTER TURNED W + : "ʎ" U028E # LATIN SMALL LETTER TURNED Y + : "ɐ" U0250 # LATIN SMALL LETTER TURNED A +# ı is already available in the "standard" .XCompose + : "ȷ" U0237 # LATIN SMALL LETTER DOTLESS J +# I'll use capitals for a different double + : "ʬ" U02AC # LATIN LETTER BILABIAL PERCUSSIVE +# Sorry, I miss having this and hate having to use colon instead: + : "ː" U02D0 # MODIFIER LETTER TRIANGULAR COLON +# Also handy for writing urls: http://ʬw.omniglot.com/ +# ɣ? ᴥ? Important enough to add? ᴥ is cool just as a "latin" letter. + : "ɣ" U0263 # LATIN SMALL LETTER GAMMA +# It looks like a ɣ and makes an "o" sorta sound: + : "ɤ" U0264 # LATIN SMALL LETTER RAMS HORN + : "ᴥ" U1D25 # LATIN LETTER AIN +# Sometimes it's a "tail", sometimes a "hook", and sometimes a "retroflex hook" + : "ɖ" U0256 # LATIN SMALL LETTER D WITH TAIL + : "ɭ" U026D # LATIN SMALL LETTER L WITH RETROFLEX HOOK + : "ɳ" U0273 # LATIN SMALL LETTER N WITH RETROFLEX HOOK + : "ʂ" U0282 # LATIN SMALL LETTER S WITH HOOK + : "ʈ" U0288 # LATIN SMALL LETTER T WITH RETROFLEX HOOK + : "ʐ" U0290 # LATIN SMALL LETTER Z WITH RETROFLEX HOOK +# This is used for functions, folders, etc. Yeah, the hook's facing wrong. + : "ƒ" U0192 # LATIN SMALL LETTER F WITH HOOK +# Sigh, might as well do implosives. Which is also sometimes a hook. + : "ɓ" U0253 # LATIN SMALL LETTER B WITH HOOK + : "ɗ" U0257 # LATIN SMALL LETTER D WITH HOOK + : "ɠ" U0260 # LATIN SMALL LETTER G WITH HOOK + : "ɡ" U0261 # LATIN SMALL LETTER SCRIPT G +# The h looks the same... + : "ɦ" U0266 # LATIN SMALL LETTER H WITH HOOK + : "ʛ" U029B # LATIN LETTER SMALL CAPITAL G WITH HOOK + : "№" U2116 # NUMERO SIGN + : "℞" U211E # PRESCRIPTION TAKE +

: "⅌" U214C # PER SIGN + : "℥" U2125 # OUNCE SIGN + : "℈" U2108 # SCRUPLE +# There are all kinds of awesome combining characters in the U+0300 page. +# There are a bunch of other awesome combining characters like U+20E0 + : "๛" U0E5B # THAI CHARACTER KHOMUT (end of chapter) +# +# Music stuff. # is the music mnemonic. + : "♭" U266d # MUSIC FLAT SIGN + : "♮" U266e # MUSIC NATURAL SIGN + : "♮" U266e # MUSIC NATURAL SIGN + : "♯" U266f # MUSIC SHARP SIGN + : "𝄞" U0001d11e # MUSICAL SYMBOL G CLEF + : "𝄢" U0001d122 # MUSICAL SYMBOL F CLEF + : "𝄡" U0001d121 # MUSICAL SYMBOL C CLEF + : "♪" U266a # EIGHTH NOTE + : "♫" U266b # BEAMED EIGHTH NOTES + : "♫" U266b # BEAMED EIGHTH NOTES + + +# Combining accents, for making things you don't have precomposed chars or keystrokes for: + : "̀" U0300 # COMBINING GRAVE ACCENT + : "́" U0301 # COMBINING ACUTE ACCENT + : "̂" U0302 # COMBINING CIRCUMFLEX ACCENT + : "̃" U0303 # COMBINING TILDE + : "̄" U0304 # COMBINING MACRON + : "̅" U0305 # COMBINING OVERLINE -- ??? + : "̆" U0306 # COMBINING BREVE + : "̇" U0307 # COMBINING DOT ABOVE + : "̈" U0308 # COMBINING DIAERESIS + : "̉" U0309 # COMBINING HOOK ABOVE + : "̊" U030a # COMBINING RING ABOVE +# That now conflicts with the new 🙌 in the system xcompose. Alternative: + <0> : "̊" U030a # COMBINING RING ABOVE + : "̋" U030b # COMBINING DOUBLE ACUTE ACCENT -- ?? + : "̌" U030c # COMBINING CARON + : "̍" U030d # COMBINING VERTICAL LINE ABOVE + <2> : "̎" U030e # COMBINING DOUBLE VERTICAL LINE ABOVE + <2> : "̏" U030f # COMBINING DOUBLE GRAVE ACCENT +# For writing PSILI and DASIA in Greek +# Ugh, better key-coding? I may need @ for BELOW. + : "̒" U0312 # COMBINING TURNED COMMA ABOVE + : "̓" U0313 # COMBINING COMMA ABOVE + : "̔" U0314 # COMBINING REVERSED COMMA ABOVE + : "͒" U0352 # COMBINING FERMATA + : "̐" U0310 # COMBINING CHANDRABINDU + : "̑" U0311 # COMBINING INVERTED BREVE -- ?? + : "⃝" U20DD # COMBINING ENCLOSING CIRCLE + : "⃠" U20E0 # COMBINING ENCLOSING CIRCLE BACKSLASH + : "̣" U0323 # COMBINING DOT BELOW +# With only one underscore it conflicts with stuff. + : "̱" U0331 # COMBINING MACRON BELOW + : "̲" U0332 # COMBINING LOW LINE + : "̳" U0333 # COMBINING DOUBLE LOW LINE + +# The @ sign will signify reversal to the bottom of the glyph, 'kay? + + : "̥" U0325 # COMBINING RING BELOW + + : "̬" U032c # COMBINING CARON BELOW + : "̭" U032d # COMBINING CIRCUMFLEX ACCENT BELOW + : "̮" U032e # COMBINING BREVE BELOW + : "̯" U032f # COMBINING INVERTED BREVE BELOW -- ?? + +# How about leading & (or &&?) for double combiners? There aren't many anyway. +# Except that I found myself assuming it was "2" for double. + : "͜" U035C # COMBINING DOUBLE BREVE BELOW + <2> : "͜" U035C # COMBINING DOUBLE BREVE BELOW + : "͝" U035D # COMBINING DOUBLE BREVE + <2> : "͝" U035D # COMBINING DOUBLE BREVE + : "͞" U035E # COMBINING DOUBLE MACRON + <2> : "͞" U035E # COMBINING DOUBLE MACRON + : "͟" U035F # COMBINING DOUBLE MACRON BELOW + <2> : "͟" U035F # COMBINING DOUBLE MACRON BELOW + : "͟" U035F # COMBINING DOUBLE MACRON BELOW + <2> : "͟" U035F # COMBINING DOUBLE MACRON BELOW + : "͠" U0360 # COMBINING DOUBLE TILDE + <2> : "͠" U0360 # COMBINING DOUBLE TILDE + : "͡" U0361 # COMBINING DOUBLE INVERTED BREVE + <2> : "͡" U0361 # COMBINING DOUBLE INVERTED BREVE + : "᷼" U1DFC # COMBINING DOUBLE INVERTED BREVE BELOW + <2> : "᷼" U1DFC # COMBINING DOUBLE INVERTED BREVE BELOW +# Might as well finish up the set. + : "͢" U0362 # COMBINING DOUBLE RIGHTWARDS ARROW BELOW + <2> : "͢" U0362 # COMBINING DOUBLE RIGHTWARDS ARROW BELOW + + : "͒" U0352 # COMBINING FERMATA + + : "҉" U0489 # COMBINING CYRILLIC MILLIONS SIGN -- aka COMBINING SHINY +

: "₽" U20BD # RUBLE SIGN +

: "₽" U20BD # RUBLE SIGN + +# How about for a little extra control: +

: "​" U200B # ZERO WIDTH SPACE + : "‌" U200C # ZERO WIDTH NON-JOINER + : "‍" U200D # ZERO WIDTH JOINER + : "‎" U200E # LEFT-TO-RIGHT MARK + : "‏" U200F # RIGHT-TO-LEFT MARK +# I never understood the whole embedding/pop thing, but we might as well add 'em + : "‪" U202A # LEFT-TO-RIGHT EMBEDDING + : "‫" U202B # RIGHT-TO-LEFT EMBEDDING +

: "‬" U202C # POP DIRECTIONAL FORMATTING + : "⁦" U2066 # LEFT-TO-RIGHT ISOLATE + : "⁧" U2067 # RIGHT-TO-LEFT ISOLATE + : "⁨" U2068 # FIRST STRONG ISOLATE +

: "⁩" U2069 # POP DIRECTIONAL ISOLATE + : "‭" U202D # LEFT-TO-RIGHT OVERRIDE + : "‮" U202E # RIGHT-TO-LEFT OVERRIDE + : "" UFEFF # ZERO WIDTH NO-BREAK SPACE (Byte Order Mark) + : "͏" U034F # COMBINING GRAPHEME JOINER +# These are sufficiently special and well-known that they don't need the +# double prefix I think. The all-caps helps too. + +# How about some small-caps? We normally use a special character as a prefix, +# but why not a suffix? It won't interfere with things that way. +# Several of these are also IPA, which is handy. And so a few have multiple +# entries. Whatever. + + : "ᴀ" U1D00 # LATIN LETTER SMALL CAPITAL A + : "ʙ" U0299 # LATIN LETTER SMALL CAPITAL B + : "ᴄ" U1D04 # LATIN LETTER SMALL CAPITAL C + : "ᴅ" U1D05 # LATIN LETTER SMALL CAPITAL D + : "ᴇ" U1D07 # LATIN LETTER SMALL CAPITAL E + : "ꜰ" UA730 # LATIN LETTER SMALL CAPITAL F + : "ɢ" U0262 # LATIN LETTER SMALL CAPITAL G + : "ʜ" U029C # LATIN LETTER SMALL CAPITAL H + : "ɪ" U026A # LATIN LETTER SMALL CAPITAL I + : "ᴊ" U1D0A # LATIN LETTER SMALL CAPITAL J + : "ᴋ" U1D0B # LATIN LETTER SMALL CAPITAL K + : "ʟ" U029F # LATIN LETTER SMALL CAPITAL L + : "ᴍ" U1D0D # LATIN LETTER SMALL CAPITAL M + : "ɴ" U0274 # LATIN LETTER SMALL CAPITAL N + : "ᴏ" U1D0F # LATIN LETTER SMALL CAPITAL O +

: "ᴘ" U1D18 # LATIN LETTER SMALL CAPITAL P +# There is no SMALL CAPITAL Q (yet)! + : "ʀ" U0280 # LATIN LETTER SMALL CAPITAL R + : "ꜱ" UA731 # LATIN LETTER SMALL CAPITAL S + : "ᴛ" U1D1B # LATIN LETTER SMALL CAPITAL T + : "ᴜ" U1D1C # LATIN LETTER SMALL CAPITAL U + : "ᴠ" U1D20 # LATIN LETTER SMALL CAPITAL V + : "ᴡ" U1D21 # LATIN LETTER SMALL CAPITAL W +# There is no SMALL CAPITAL X (yet) + : "ʏ" U028F # LATIN LETTER SMALL CAPITAL Y + : "ᴢ" U1D22 # LATIN LETTER SMALL CAPITAL Z + + +# See also http://bleah.co.uk/~simon/stuff/XCompose +# and http://dotfiles.org/~inky/.XCompose +# and http://paste.lisp.org/display/73094 + + : "☉" U2609 # SUN (Sunday) + : "☽" U263D # FIRST QUARTER MOON (Monday) + : "☿" U263F # MERCURY (Wednesday) +# We already have Venus (Friday) and Mars (Tuesday) as Male/Female signs; do we need them here too? +# : "♀" U2640 # FEMALE SIGN +# : "♂" U2642 # MALE SIGN +

: "♃" U2643 # JUPITER (Thursday) + : "♄" U2644 # SATURN (Saturday) + : "♅" U2645 # URANUS (or ⛢ U26E2?) +

: "♆" U2646 # NEPTUNE +

: "♇" U2647 # PLUTO (ok, it isn't a planet anymore, but we still love it.) +# Minor planets, whilst we're at it? + : "⚳" U26B3 # CERES +

: "⚴" U26B4 # PALLAS + : "⚵" U26B5 # JUNO + : "⚶" U26B6 # VESTA + : "⚷" U26B7 # CHIRON + : "⚸" U26B8 # BLACK MOON LILITH + +# Unicode 6.0 gave us all kinds of things, perhaps more than we can use... + +# Playing Cards? It's a lot, but so what? I don't think the [] convention +# will conflict with anything. +# The convention is more or less established, except for the Knight. I'm +# using N for that, like in Chess, since K would conflict with King of course. + + : "🂡" U1F0A1 # PLAYING CARD ACE OF SPADES + <2> : "🂢" U1F0A2 # PLAYING CARD TWO OF SPADES + <3> : "🂣" U1F0A3 # PLAYING CARD THREE OF SPADES + <4> : "🂤" U1F0A4 # PLAYING CARD FOUR OF SPADES + <5> : "🂥" U1F0A5 # PLAYING CARD FIVE OF SPADES + <6> : "🂦" U1F0A6 # PLAYING CARD SIX OF SPADES + <7> : "🂧" U1F0A7 # PLAYING CARD SEVEN OF SPADES + <8> : "🂨" U1F0A8 # PLAYING CARD EIGHT OF SPADES + <9> : "🂩" U1F0A9 # PLAYING CARD NINE OF SPADES + : "🂪" U1F0AA # PLAYING CARD TEN OF SPADES + : "🂫" U1F0AB # PLAYING CARD JACK OF SPADES + : "🂬" U1F0AC # PLAYING CARD KNIGHT OF SPADES + : "🂭" U1F0AD # PLAYING CARD QUEEN OF SPADES + : "🂮" U1F0AE # PLAYING CARD KING OF SPADES + + : "🂱" U1F0B1 # PLAYING CARD ACE OF HEARTS + <2> : "🂲" U1F0B2 # PLAYING CARD TWO OF HEARTS + <3> : "🂳" U1F0B3 # PLAYING CARD THREE OF HEARTS + <4> : "🂴" U1F0B4 # PLAYING CARD FOUR OF HEARTS + <5> : "🂵" U1F0B5 # PLAYING CARD FIVE OF HEARTS + <6> : "🂶" U1F0B6 # PLAYING CARD SIX OF HEARTS + <7> : "🂷" U1F0B7 # PLAYING CARD SEVEN OF HEARTS + <8> : "🂸" U1F0B8 # PLAYING CARD EIGHT OF HEARTS + <9> : "🂹" U1F0B9 # PLAYING CARD NINE OF HEARTS + : "🂺" U1F0BA # PLAYING CARD TEN OF HEARTS + : "🂻" U1F0BB # PLAYING CARD JACK OF HEARTS + : "🂼" U1F0BC # PLAYING CARD KNIGHT OF HEARTS + : "🂽" U1F0BD # PLAYING CARD QUEEN OF HEARTS + : "🂾" U1F0BE # PLAYING CARD KING OF HEARTS + + : "🃁" U1F0C1 # PLAYING CARD ACE OF DIAMONDS + <2> : "🃂" U1F0C2 # PLAYING CARD TWO OF DIAMONDS + <3> : "🃃" U1F0C3 # PLAYING CARD THREE OF DIAMONDS + <4> : "🃄" U1F0C4 # PLAYING CARD FOUR OF DIAMONDS + <5> : "🃅" U1F0C5 # PLAYING CARD FIVE OF DIAMONDS + <6> : "🃆" U1F0C6 # PLAYING CARD SIX OF DIAMONDS + <7> : "🃇" U1F0C7 # PLAYING CARD SEVEN OF DIAMONDS + <8> : "🃈" U1F0C8 # PLAYING CARD EIGHT OF DIAMONDS + <9> : "🃉" U1F0C9 # PLAYING CARD NINE OF DIAMONDS + : "🃊" U1F0CA # PLAYING CARD TEN OF DIAMONDS + : "🃋" U1F0CB # PLAYING CARD JACK OF DIAMONDS + : "🃌" U1F0CC # PLAYING CARD KNIGHT OF DIAMONDS + : "🃍" U1F0CD # PLAYING CARD QUEEN OF DIAMONDS + : "🃎" U1F0CE # PLAYING CARD KING OF DIAMONDS + + : "🃑" U1F0D1 # PLAYING CARD ACE OF CLUBS + <2> : "🃒" U1F0D2 # PLAYING CARD TWO OF CLUBS + <3> : "🃓" U1F0D3 # PLAYING CARD THREE OF CLUBS + <4> : "🃔" U1F0D4 # PLAYING CARD FOUR OF CLUBS + <5> : "🃕" U1F0D5 # PLAYING CARD FIVE OF CLUBS + <6> : "🃖" U1F0D6 # PLAYING CARD SIX OF CLUBS + <7> : "🃗" U1F0D7 # PLAYING CARD SEVEN OF CLUBS + <8> : "🃘" U1F0D8 # PLAYING CARD EIGHT OF CLUBS + <9> : "🃙" U1F0D9 # PLAYING CARD NINE OF CLUBS + : "🃚" U1F0DA # PLAYING CARD TEN OF CLUBS + : "🃛" U1F0DB # PLAYING CARD JACK OF CLUBS + : "🃜" U1F0DC # PLAYING CARD KNIGHT OF CLUBS + : "🃝" U1F0DD # PLAYING CARD QUEEN OF CLUBS + : "🃞" U1F0DE # PLAYING CARD KING OF CLUBS + + : "🂠" U1F0A0 # PLAYING CARD BACK + : "🃏" U1F0CF # PLAYING CARD BLACK JOKER + : "🃟" U1F0DF # PLAYING CARD WHITE JOKER + +# Do we want domino bones also? I'm thinking [ 1 1 ], etc, maybe use +# ] 1 1 [ for vertical (or vice-versa) + +# And chess/checkers pieces! We need a convention for those. # looks like a +# checkerboard but we're already using that for music. Half of it? +# will be an issue when we want double-struck W or B... we'll have +# to consider it. Maybe replace with + : "♔" U2654 # WHITE CHESS KING + : "♕" U2655 # WHITE CHESS QUEEN + : "♖" U2656 # WHITE CHESS ROOK + : "♗" U2657 # WHITE CHESS BISHOP + : "♘" U2658 # WHITE CHESS KNIGHT +

: "♙" U2659 # WHITE CHESS PAWN + : "♚" U265A # BLACK CHESS KING + : "♛" U265B # BLACK CHESS QUEEN + : "♜" U265C # BLACK CHESS ROOK + : "♝" U265D # BLACK CHESS BISHOP + : "♞" U265E # BLACK CHESS KNIGHT +

: "♟" U265F # BLACK CHESS PAWN + : "⛀" U26C0 # WHITE DRAUGHTS MAN + : "⛁" U26C1 # WHITE DRAUGHTS KING + : "⛂" U26C2 # BLACK DRAUGHTS MAN + : "⛃" U26C3 # BLACK DRAUGHTS KING +# Since we're doing game pieces, might as well. + : "☖" U2616 # WHITE SHOGI PIECE + : "☗" U2617 # BLACK SHOGI PIECE +# It's turned vertically and not horizontally reflected, but we use the < +# symbol for turning... + : "⛉" U26C9 # TURNED WHITE SHOGI PIECE + : "⛊" U26CA # TURNED BLACK SHOGI PIECE + +# As for the emoji... We can't possibly get all of them, even just all of the +# cool/useful ones. Maybe we can pick and choose some high-fliers. + + : "°" U00B0 # DEGREE SIGN + : "℃" U2103 # DEGREE CELSIUS + : "℃" U2103 # DEGREE CELSIUS + : "℉" U2109 # DEGREE FAHRENHEIT + : "℉" U2109 # DEGREE FAHRENHEIT + +# Zodiacal symbols? + : "♈" U2648 # ARIES + : "♉" U2649 # TAURUS + : "♊" U264A # GEMINI + : "♋" U264B # CANCER + : "♌" U264C # LEO + : "♍" U264D # VIRGO + : "♎" U264E # LIBRA +# Abbreviating some of the longer ones. +

: "♏" U264F # SCORPIUS + : "♐" U2650 # SAGITTARIUS +

: "♑" U2651 # CAPRICORN + : "♒" U2652 # AQUARIUS +

: "♓" U2653 # PISCES +# Really, this should be SERPENTARIUS. All the other signs are in Latin. +

: "⛎" U26CE # OPHIUCHUS + +# Sigh. So many emoji... I think the first ones I'd go for would be +# 💡💢💣💤💥💦💧💨💫 (1F4A1-1F4A8 and 1F4AB). Maybe 1F550-1F567 are useful. + : "💡" U1F4A1 # ELECTRIC LIGHT BULB + : "💢" U1F4A2 # ANGER SYMBOL + : "💣" U1F4A3 # BOMB + : "💤" U1F4A4 # SLEEPING SYMBOL +

: "💥" U1F4A5 # COLLISION SYMBOL + : "💦" U1F4A6 # SPLASHING SWEAT SYMBOL +

: "💧" U1F4A7 # DROPLET +

: "💨" U1F4A8 # DASH SYMBOL +

: "💩" U1F4A9 # PILE OF POO +# Skipping U+1F4AA just now. + : "💫" U1F4AB # DIZZY SYMBOL + : "💰" U1F4B0 # MONEY BAG + : "🍰" U1F370 # SHORTCAKE +# The cake is a lie... OK, too cutesy? + : "🎂" U1F382 # BIRTHDAY CAKE + : "🎂" U1F382 # BIRTHDAY CAKE + : "👌" U1F44C # OK HAND SIGN +

: "👍" U1F44D # THUMBS UP SIGN + : "👎" U1F44E # THUMBS DOWN SIGN +# More useful in chat than U+1F48F KISS + : "💋" U1F48B # KISS MARK +# ⛔ U+26D4 NO ENTRY for "Don't go there"? +# So many hearts... I'm not touching them for now. +# And emoticons? (U+1F600 et seq) + + <1> <0> <0> : "🕐" U1F550 # CLOCK FACE ONE OCLOCK + <2> <0> <0> : "🕑" U1F551 # CLOCK FACE TWO OCLOCK + <3> <0> <0> : "🕒" U1F552 # CLOCK FACE THREE OCLOCK + <4> <0> <0> : "🕓" U1F553 # CLOCK FACE FOUR OCLOCK + <5> <0> <0> : "🕔" U1F554 # CLOCK FACE FIVE OCLOCK + <6> <0> <0> : "🕕" U1F555 # CLOCK FACE SIX OCLOCK + <7> <0> <0> : "🕖" U1F556 # CLOCK FACE SEVEN OCLOCK + <8> <0> <0> : "🕗" U1F557 # CLOCK FACE EIGHT OCLOCK + <9> <0> <0> : "🕘" U1F558 # CLOCK FACE NINE OCLOCK + <1> <0> <0> <0> : "🕙" U1F559 # CLOCK FACE TEN OCLOCK + <1> <1> <0> <0> : "🕚" U1F55A # CLOCK FACE ELEVEN OCLOCK + <1> <2> <0> <0> : "🕛" U1F55B # CLOCK FACE TWELVE OCLOCK + + <1> <3> <0> : "🕜" U1F55C # CLOCK FACE ONE-THIRTY + <2> <3> <0> : "🕝" U1F55D # CLOCK FACE TWO-THIRTY + <3> <3> <0> : "🕞" U1F55E # CLOCK FACE THREE-THIRTY + <4> <3> <0> : "🕟" U1F55F # CLOCK FACE FOUR-THIRTY + <5> <3> <0> : "🕠" U1F560 # CLOCK FACE FIVE-THIRTY + <6> <3> <0> : "🕡" U1F561 # CLOCK FACE SIX-THIRTY + <7> <3> <0> : "🕢" U1F562 # CLOCK FACE SEVEN-THIRTY + <8> <3> <0> : "🕣" U1F563 # CLOCK FACE EIGHT-THIRTY + <9> <3> <0> : "🕤" U1F564 # CLOCK FACE NINE-THIRTY + <1> <0> <3> <0> : "🕥" U1F565 # CLOCK FACE TEN-THIRTY + <1> <1> <3> <0> : "🕦" U1F566 # CLOCK FACE ELEVEN-THIRTY + <1> <2> <3> <0> : "🕧" U1F567 # CLOCK FACE TWELVE-THIRTY + +# Bitcoin signs +# Real bitcoin codepoint coming at U+20BF! + : "฿" U0E3F # BITCOIN CURRENCY SIGN, ORIGINAL THAI CURRENCY SYMBOL BAHT + + : "Ƀ" U0243 # ALTERNATIVE BITCOIN CURRENCY SIGN, LATIN CAPITAL LETTER B WITH STROKE + : "Ƀ" U0243 # ALTERNATIVE BITCOIN CURRENCY SIGN, LATIN CAPITAL LETTER B WITH STROKE + : "ƀ" U0180 # ALTERNATIVE BIT CURRENCY SIGN, LATIN SMALL LETTER B WITH STROKE + : "ƀ" U0180 # ALTERNATIVE BIT CURRENCY SIGN, LATIN SMALL LETTER B WITH STROKE diff --git a/vendor/README.md b/vendor/README.md index dfb3e60f3c..80d8c1176c 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -361,6 +361,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **X10:** [x10-lang/x10-highlighting](https://github.com/x10-lang/x10-highlighting) - **xBase:** [hernad/atom-language-harbour](https://github.com/hernad/atom-language-harbour) - **XC:** [graymalkin/xc.tmbundle](https://github.com/graymalkin/xc.tmbundle) +- **XCompose:** [samcv/language-xcompose](https://github.com/samcv/language-xcompose) - **XML:** [textmate/xml.tmbundle](https://github.com/textmate/xml.tmbundle) - **Xojo:** [angryant0007/VBDotNetSyntax](https://github.com/angryant0007/VBDotNetSyntax) - **XProc:** [textmate/xml.tmbundle](https://github.com/textmate/xml.tmbundle) diff --git a/vendor/grammars/language-xcompose b/vendor/grammars/language-xcompose new file mode 160000 index 0000000000..220ec42caa --- /dev/null +++ b/vendor/grammars/language-xcompose @@ -0,0 +1 @@ +Subproject commit 220ec42caae041405c828463185be1de6b41c53f diff --git a/vendor/licenses/grammar/language-xcompose.txt b/vendor/licenses/grammar/language-xcompose.txt new file mode 100644 index 0000000000..bdd40fa8d3 --- /dev/null +++ b/vendor/licenses/grammar/language-xcompose.txt @@ -0,0 +1,27 @@ +--- +type: grammar +name: language-xcompose +license: mit +--- +The MIT License (MIT) + +Copyright (c) 2016 Samantha McVey + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + From 1c4baf6dc28dee26af5092bc4ce72698880f430d Mon Sep 17 00:00:00 2001 From: yutannihilation Date: Wed, 4 Jan 2017 06:31:04 +0900 Subject: [PATCH 0205/1214] ignore roxygen2-generated files (#3373) --- lib/linguist/generated.rb | 17 ++++++++- samples/R/import.Rd | 72 +++++++++++++++++++++++++++++++++++++++ test/test_generated.rb | 3 ++ 3 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 samples/R/import.Rd diff --git a/lib/linguist/generated.rb b/lib/linguist/generated.rb index de16e68320..41b1101b7c 100644 --- a/lib/linguist/generated.rb +++ b/lib/linguist/generated.rb @@ -77,7 +77,8 @@ def generated? generated_unity3d_meta? || generated_racc? || generated_jflex? || - generated_grammarkit? + generated_grammarkit? || + generated_roxygen2? end # Internal: Is the blob an Xcode file? @@ -433,5 +434,19 @@ def generated_grammarkit? return false unless lines.count > 1 return lines[0].start_with?("// This is a generated file. Not intended for manual editing.") end + + # Internal: Is this a roxygen2-generated file? + # + # A roxygen2-generated file typically contain: + # % Generated by roxygen2: do not edit by hand + # on the first line. + # + # Return true or false + def generated_roxygen2? + return false unless extname == '.Rd' + return false unless lines.count > 1 + + return lines[0].include?("% Generated by roxygen2: do not edit by hand") + end end end diff --git a/samples/R/import.Rd b/samples/R/import.Rd new file mode 100644 index 0000000000..1623d222bc --- /dev/null +++ b/samples/R/import.Rd @@ -0,0 +1,72 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/hello.R +\name{import} +\alias{import} +\title{Import a module into the current scope} +\usage{ +import(module, attach, attach_operators = TRUE) +} +\arguments{ +\item{module}{an identifier specifying the full module path} + +\item{attach}{if \code{TRUE}, attach the newly loaded module to the object +search path (see \code{Details})} + +\item{attach_operators}{if \code{TRUE}, attach operators of module to the +object search path, even if \code{attach} is \code{FALSE}} +} +\value{ +the loaded module environment (invisible) +} +\description{ +\code{module = import('module')} imports a specified module and makes its +code available via the environment-like object it returns. +} +\details{ +Modules are loaded in an isolated environment which is returned, and +optionally attached to the object search path of the current scope (if +argument \code{attach} is \code{TRUE}). +\code{attach} defaults to \code{FALSE}. However, in interactive code it is +often helpful to attach packages by default. Therefore, in interactive code +invoked directly from the terminal only (i.e. not within modules), +\code{attach} defaults to the value of \code{options('import.attach')}, which +can be set to \code{TRUE} or \code{FALSE} depending on the user’s preference. + +\code{attach_operators} causes \emph{operators} to be attached by default, +because operators can only be invoked in R if they re found in the search +path. Not attaching them therefore drastically limits a module’s usefulness. + +Modules are searched in the module search path \code{options('import.path')}. +This is a vector of paths to consider, from the highest to the lowest +priority. The current directory is \emph{always} considered first. That is, +if a file \code{a.r} exists both in the current directory and in a module +search path, the local file \code{./a.r} will be loaded. + +Module names can be fully qualified to refer to nested paths. See +\code{Examples}. +} +\note{ +Unlike for packages, attaching happens \emph{locally}: if +\code{import} is executed in the global environment, the effect is the same. +Otherwise, the imported module is inserted as the parent of the current +\code{environment()}. When used (globally) \emph{inside} a module, the newly +imported module is only available inside the module’s search path, not +outside it (nor in other modules which might be loaded). +} +\examples{ +# `a.r` is a file in the local directory containing a function `f`. +a = import('a') +a$f() + +# b/c.r is a file in path `b`, containing a function `g`. +import('b/c', attach = TRUE) +g() # No module name qualification necessary + +} +\seealso{ +\code{unload} + +\code{reload} + +\code{module_name} +} \ No newline at end of file diff --git a/test/test_generated.rb b/test/test_generated.rb index db32e8f52e..6301d971ab 100644 --- a/test/test_generated.rb +++ b/test/test_generated.rb @@ -87,5 +87,8 @@ def test_check_generated # GrammarKit generated_sample_loading_data("Java/GrammarKit.java") + + # roxygen2 + generated_sample_loading_data("R/import.Rd") end end From 675cee1d7282c14335b3218f3d81854fe255f755 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Tue, 3 Jan 2017 22:54:47 +0100 Subject: [PATCH 0206/1214] Improve the .pl Prolog heuristic rule (#3409) :- can be directly at the start of a line --- lib/linguist/heuristics.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index b98465dd1f..b2d40ee5ab 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -326,7 +326,7 @@ def call(data) end disambiguate ".pl" do |data| - if /^[^#]+:-/.match(data) + if /^[^#]*:-/.match(data) Language["Prolog"] elsif /use strict|use\s+v?5\./.match(data) Language["Perl"] From e1ce88920d8e27998225287e5c5805e5f6abf2d1 Mon Sep 17 00:00:00 2001 From: meganemura Date: Wed, 4 Jan 2017 06:57:46 +0900 Subject: [PATCH 0207/1214] Fix add-grammar and convert-grammars (#3354) * Skip removed grammar submodule * Clean up old grammar from grammars and grammars.yml * Clean up unused grammar license Run `script/licensed`. This was missing change in 12f9295 of #3350. * Clean up license files when we replace grammar Update license files by running `script/licensed`. Since we replace grammar, the old grammar license must be removed and new grammar license must be added. --- script/add-grammar | 7 ++++++- script/convert-grammars | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/script/add-grammar b/script/add-grammar index f5a8bf115a..fb7c73b930 100755 --- a/script/add-grammar +++ b/script/add-grammar @@ -84,6 +84,7 @@ if repo_old log "Deregistering: #{repo_old}" `git submodule deinit #{repo_old}` `git rm -rf #{repo_old}` + `script/convert-grammars` end log "Registering new submodule: #{repo_new}" @@ -92,7 +93,11 @@ exit 1 if $?.exitstatus > 0 `script/convert-grammars --add #{repo_new}` log "Confirming license" -`script/licensed --module "#{repo_new}"` +if repo_old + `script/licensed` +else + `script/licensed --module "#{repo_new}"` +end log "Updating grammar documentation in vendor/REAEDME.md" `bundle exec rake samples` diff --git a/script/convert-grammars b/script/convert-grammars index 64c75d14b2..5967125319 100755 --- a/script/convert-grammars +++ b/script/convert-grammars @@ -174,6 +174,7 @@ end def load_grammars(tmp_dir, source, all_scopes) is_url = source.start_with?("http:", "https:") return [] if is_url && !$options[:remote] + return [] if !is_url && !File.exist?(source) p = if !is_url if File.directory?(source) From 48e4394d87af6f2bce18560b18f51023bfa29013 Mon Sep 17 00:00:00 2001 From: Nate Whetsell Date: Tue, 3 Jan 2017 17:08:29 -0500 Subject: [PATCH 0208/1214] Add Jison-generated JavaScript to generated files (#3393) * Fix typos * Add Jison-generated JavaScript to generated files --- lib/linguist/generated.rb | 29 +- samples/JavaScript/ccalc-lex.js | 923 +++++++++++++ samples/JavaScript/ccalc-parse.js | 2145 +++++++++++++++++++++++++++++ test/test_blob.rb | 3 + 4 files changed, 3095 insertions(+), 5 deletions(-) create mode 100644 samples/JavaScript/ccalc-lex.js create mode 100644 samples/JavaScript/ccalc-parse.js diff --git a/lib/linguist/generated.rb b/lib/linguist/generated.rb index 41b1101b7c..d53f501b78 100644 --- a/lib/linguist/generated.rb +++ b/lib/linguist/generated.rb @@ -3,7 +3,7 @@ class Generated # Public: Is the blob a generated file? # # name - String filename - # data - String blob data. A block also maybe passed in for lazy + # data - String blob data. A block also may be passed in for lazy # loading. This behavior is deprecated and you should always # pass in a String. # @@ -78,7 +78,8 @@ def generated? generated_racc? || generated_jflex? || generated_grammarkit? || - generated_roxygen2? + generated_roxygen2? || + generated_jison? end # Internal: Is the blob an Xcode file? @@ -312,7 +313,7 @@ def go_vendor? !!name.match(/vendor\/((?!-)[-0-9A-Za-z]+(? 1 return lines[0].start_with?("// This is a generated file. Not intended for manual editing.") end - + # Internal: Is this a roxygen2-generated file? # # A roxygen2-generated file typically contain: @@ -448,5 +449,23 @@ def generated_roxygen2? return lines[0].include?("% Generated by roxygen2: do not edit by hand") end + + # Internal: Is this a Jison-generated file? + # + # Jison-generated parsers typically contain: + # /* parser generated by jison + # on the first line. + # + # Jison-generated lexers typically contain: + # /* generated by jison-lex + # on the first line. + # + # Return true or false + def generated_jison? + return false unless extname == '.js' + return false unless lines.count > 1 + return lines[0].start_with?("/* parser generated by jison ") || + lines[0].start_with?("/* generated by jison-lex ") + end end end diff --git a/samples/JavaScript/ccalc-lex.js b/samples/JavaScript/ccalc-lex.js new file mode 100644 index 0000000000..79bb3d9612 --- /dev/null +++ b/samples/JavaScript/ccalc-lex.js @@ -0,0 +1,923 @@ +/* generated by jison-lex 0.3.4-159 */ +var ccalcLex = (function () { +// See also: +// http://stackoverflow.com/questions/1382107/whats-a-good-way-to-extend-error-in-javascript/#35881508 +// but we keep the prototype.constructor and prototype.name assignment lines too for compatibility +// with userland code which might access the derived class in a 'classic' way. +function JisonLexerError(msg, hash) { + Object.defineProperty(this, 'name', { + enumerable: false, + writable: false, + value: 'JisonLexerError' + }); + + if (msg == null) msg = '???'; + + Object.defineProperty(this, 'message', { + enumerable: false, + writable: true, + value: msg + }); + + this.hash = hash; + + var stacktrace; + if (hash && hash.exception instanceof Error) { + var ex2 = hash.exception; + this.message = ex2.message || msg; + stacktrace = ex2.stack; + } + if (!stacktrace) { + if (Error.hasOwnProperty('captureStackTrace')) { // V8 + Error.captureStackTrace(this, this.constructor); + } else { + stacktrace = (new Error(msg)).stack; + } + } + if (stacktrace) { + Object.defineProperty(this, 'stack', { + enumerable: false, + writable: false, + value: stacktrace + }); + } +} + +if (typeof Object.setPrototypeOf === 'function') { + Object.setPrototypeOf(JisonLexerError.prototype, Error.prototype); +} else { + JisonLexerError.prototype = Object.create(Error.prototype); +} +JisonLexerError.prototype.constructor = JisonLexerError; +JisonLexerError.prototype.name = 'JisonLexerError'; + + +var lexer = { + EOF: 1, + ERROR: 2, + + // JisonLexerError: JisonLexerError, // <-- injected by the code generator + + // options: {}, // <-- injected by the code generator + + // yy: ..., // <-- injected by setInput() + + __currentRuleSet__: null, // <-- internal rule set cache for the current lexer state + + __error_infos: [], // INTERNAL USE ONLY: the set of lexErrorInfo objects created since the last cleanup + + __decompressed: false, // INTERNAL USE ONLY: mark whether the lexer instance has been 'unfolded' completely and is now ready for use + + done: false, // INTERNAL USE ONLY + _backtrack: false, // INTERNAL USE ONLY + _input: '', // INTERNAL USE ONLY + _more: false, // INTERNAL USE ONLY + _signaled_error_token: false, // INTERNAL USE ONLY + + conditionStack: [], // INTERNAL USE ONLY; managed via `pushState()`, `popState()`, `topState()` and `stateStackSize()` + + match: '', // READ-ONLY EXTERNAL ACCESS - ADVANCED USE ONLY: tracks input which has been matched so far for the lexer token under construction. `match` is identical to `yytext` except that this one still contains the matched input string after `lexer.performAction()` has been invoked, where userland code MAY have changed/replaced the `yytext` value entirely! + matched: '', // READ-ONLY EXTERNAL ACCESS - ADVANCED USE ONLY: tracks entire input which has been matched so far + matches: false, // READ-ONLY EXTERNAL ACCESS - ADVANCED USE ONLY: tracks RE match result for last (successful) match attempt + yytext: '', // ADVANCED USE ONLY: tracks input which has been matched so far for the lexer token under construction; this value is transferred to the parser as the 'token value' when the parser consumes the lexer token produced through a call to the `lex()` API. + offset: 0, // READ-ONLY EXTERNAL ACCESS - ADVANCED USE ONLY: tracks the 'cursor position' in the input string, i.e. the number of characters matched so far + yyleng: 0, // READ-ONLY EXTERNAL ACCESS - ADVANCED USE ONLY: length of matched input for the token under construction (`yytext`) + yylineno: 0, // READ-ONLY EXTERNAL ACCESS - ADVANCED USE ONLY: 'line number' at which the token under construction is located + yylloc: null, // READ-ONLY EXTERNAL ACCESS - ADVANCED USE ONLY: tracks location info (lines + columns) for the token under construction + + // INTERNAL USE: construct a suitable error info hash object instance for `parseError`. + constructLexErrorInfo: function lexer_constructLexErrorInfo(msg, recoverable) { + var pei = { + errStr: msg, + recoverable: !!recoverable, + text: this.match, // This one MAY be empty; userland code should use the `upcomingInput` API to obtain more text which follows the 'lexer cursor position'... + token: null, + line: this.yylineno, + loc: this.yylloc, + yy: this.yy, + lexer: this, + + // and make sure the error info doesn't stay due to potential + // ref cycle via userland code manipulations. + // These would otherwise all be memory leak opportunities! + // + // Note that only array and object references are nuked as those + // constitute the set of elements which can produce a cyclic ref. + // The rest of the members is kept intact as they are harmless. + destroy: function destructLexErrorInfo() { + // remove cyclic references added to error info: + // info.yy = null; + // info.lexer = null; + // ... + var rec = !!this.recoverable; + for (var key in this) { + if (this.hasOwnProperty(key) && typeof key === 'object') { + this[key] = undefined; + } + } + this.recoverable = rec; + } + }; + // track this instance so we can `destroy()` it once we deem it superfluous and ready for garbage collection! + this.__error_infos.push(pei); + return pei; + }, + + parseError: function lexer_parseError(str, hash) { + if (this.yy.parser && typeof this.yy.parser.parseError === 'function') { + return this.yy.parser.parseError(str, hash) || this.ERROR; + } else if (typeof this.yy.parseError === 'function') { + return this.yy.parseError.call(this, str, hash) || this.ERROR; + } else { + throw new this.JisonLexerError(str); + } + }, + + // final cleanup function for when we have completed lexing the input; + // make it an API so that external code can use this one once userland + // code has decided it's time to destroy any lingering lexer error + // hash object instances and the like: this function helps to clean + // up these constructs, which *may* carry cyclic references which would + // otherwise prevent the instances from being properly and timely + // garbage-collected, i.e. this function helps prevent memory leaks! + cleanupAfterLex: function lexer_cleanupAfterLex(do_not_nuke_errorinfos) { + var rv; + + // prevent lingering circular references from causing memory leaks: + this.setInput('', {}); + + // nuke the error hash info instances created during this run. + // Userland code must COPY any data/references + // in the error hash instance(s) it is more permanently interested in. + if (!do_not_nuke_errorinfos) { + for (var i = this.__error_infos.length - 1; i >= 0; i--) { + var el = this.__error_infos[i]; + if (el && typeof el.destroy === 'function') { + el.destroy(); + } + } + this.__error_infos.length = 0; + } + + return this; + }, + + // clear the lexer token context; intended for internal use only + clear: function lexer_clear() { + this.yytext = ''; + this.yyleng = 0; + this.match = ''; + this.matches = false; + this._more = false; + this._backtrack = false; + }, + + // resets the lexer, sets new input + setInput: function lexer_setInput(input, yy) { + this.yy = yy || this.yy || {}; + + // also check if we've fully initialized the lexer instance, + // including expansion work to be done to go from a loaded + // lexer to a usable lexer: + if (!this.__decompressed) { + // step 1: decompress the regex list: + var rules = this.rules; + for (var i = 0, len = rules.length; i < len; i++) { + var rule_re = rules[i]; + + // compression: is the RE an xref to another RE slot in the rules[] table? + if (typeof rule_re === 'number') { + rules[i] = rules[rule_re]; + } + } + + // step 2: unfold the conditions[] set to make these ready for use: + var conditions = this.conditions; + for (var k in conditions) { + var spec = conditions[k]; + + var rule_ids = spec.rules; + + var len = rule_ids.length; + var rule_regexes = new Array(len + 1); // slot 0 is unused; we use a 1-based index approach here to keep the hottest code in `lexer_next()` fast and simple! + var rule_new_ids = new Array(len + 1); + + if (this.rules_prefix1) { + var rule_prefixes = new Array(65536); + var first_catch_all_index = 0; + + for (var i = 0; i < len; i++) { + var idx = rule_ids[i]; + var rule_re = rules[idx]; + rule_regexes[i + 1] = rule_re; + rule_new_ids[i + 1] = idx; + + var prefix = this.rules_prefix1[idx]; + // compression: is the PREFIX-STRING an xref to another PREFIX-STRING slot in the rules_prefix1[] table? + if (typeof prefix === 'number') { + prefix = this.rules_prefix1[prefix]; + } + // init the prefix lookup table: first come, first serve... + if (!prefix) { + if (!first_catch_all_index) { + first_catch_all_index = i + 1; + } + } else { + for (var j = 0, pfxlen = prefix.length; j < pfxlen; j++) { + var pfxch = prefix.charCodeAt(j); + // first come, first serve: + if (!rule_prefixes[pfxch]) { + rule_prefixes[pfxch] = i + 1; + } + } + } + } + + // if no catch-all prefix has been encountered yet, it means all + // rules have limited prefix sets and it MAY be that particular + // input characters won't be recognized by any rule in this + // condition state. + // + // To speed up their discovery at run-time while keeping the + // remainder of the lexer kernel code very simple (and fast), + // we point these to an 'illegal' rule set index *beyond* + // the end of the rule set. + if (!first_catch_all_index) { + first_catch_all_index = len + 1; + } + + for (var i = 0; i < 65536; i++) { + if (!rule_prefixes[i]) { + rule_prefixes[i] = first_catch_all_index; + } + } + + spec.__dispatch_lut = rule_prefixes; + } else { + for (var i = 0; i < len; i++) { + var idx = rule_ids[i]; + var rule_re = rules[idx]; + rule_regexes[i + 1] = rule_re; + rule_new_ids[i + 1] = idx; + } + } + + spec.rules = rule_new_ids; + spec.__rule_regexes = rule_regexes; + spec.__rule_count = len; + } + + this.__decompressed = true; + } + + this._input = input || ''; + this.clear(); + this._signaled_error_token = false; + this.done = false; + this.yylineno = 0; + this.matched = ''; + this.conditionStack = ['INITIAL']; + this.__currentRuleSet__ = null; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + + // consumes and returns one char from the input + input: function lexer_input() { + if (!this._input) { + this.done = true; + return null; + } + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + // Count the linenumber up when we hit the LF (or a stand-alone CR). + // On CRLF, the linenumber is incremented when you fetch the CR or the CRLF combo + // and we advance immediately past the LF as well, returning both together as if + // it was all a single 'character' only. + var slice_len = 1; + var lines = false; + if (ch === '\n') { + lines = true; + } else if (ch === '\r') { + lines = true; + var ch2 = this._input[1]; + if (ch2 === '\n') { + slice_len++; + ch += ch2; + this.yytext += ch2; + this.yyleng++; + this.offset++; + this.match += ch2; + this.matched += ch2; + if (this.options.ranges) { + this.yylloc.range[1]++; + } + } + } + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + + this._input = this._input.slice(slice_len); + return ch; + }, + + // unshifts one char (or a string) into the input + unput: function lexer_unput(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - len); + this.matched = this.matched.substr(0, this.matched.length - len); + + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + + this.yylloc.last_line = this.yylineno + 1; + this.yylloc.last_column = (lines ? + (lines.length === oldLines.length ? this.yylloc.first_column : 0) + + oldLines[oldLines.length - lines.length].length - lines[0].length : + this.yylloc.first_column - len); + + if (this.options.ranges) { + this.yylloc.range[1] = this.yylloc.range[0] + this.yyleng - len; + } + this.yyleng = this.yytext.length; + this.done = false; + return this; + }, + + // When called from action, caches matched text and appends it on next action + more: function lexer_more() { + this._more = true; + return this; + }, + + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function lexer_reject() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + // when the parseError() call returns, we MUST ensure that the error is registered. + // We accomplish this by signaling an 'error' token to be produced for the current + // .lex() run. + var p = this.constructLexErrorInfo('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), false); + this._signaled_error_token = (this.parseError(p.errStr, p) || this.ERROR); + } + return this; + }, + + // retain first n characters of the match + less: function lexer_less(n) { + return this.unput(this.match.slice(n)); + }, + + // return (part of the) already matched input, i.e. for error messages. + // Limit the returned string length to `maxSize` (default: 20). + // Limit the returned string to the `maxLines` number of lines of input (default: 1). + // Negative limit values equal *unlimited*. + pastInput: function lexer_pastInput(maxSize, maxLines) { + var past = this.matched.substring(0, this.matched.length - this.match.length); + if (maxSize < 0) + maxSize = past.length; + else if (!maxSize) + maxSize = 20; + if (maxLines < 0) + maxLines = past.length; // can't ever have more input lines than this! + else if (!maxLines) + maxLines = 1; + // `substr` anticipation: treat \r\n as a single character and take a little + // more than necessary so that we can still properly check against maxSize + // after we've transformed and limited the newLines in here: + past = past.substr(-maxSize * 2 - 2); + // now that we have a significantly reduced string to process, transform the newlines + // and chop them, then limit them: + var a = past.replace(/\r\n|\r/g, '\n').split('\n'); + a = a.slice(-maxLines); + past = a.join('\n'); + // When, after limiting to maxLines, we still have too much to return, + // do add an ellipsis prefix... + if (past.length > maxSize) { + past = '...' + past.substr(-maxSize); + } + return past; + }, + + // return (part of the) upcoming input, i.e. for error messages. + // Limit the returned string length to `maxSize` (default: 20). + // Limit the returned string to the `maxLines` number of lines of input (default: 1). + // Negative limit values equal *unlimited*. + upcomingInput: function lexer_upcomingInput(maxSize, maxLines) { + var next = this.match; + if (maxSize < 0) + maxSize = next.length + this._input.length; + else if (!maxSize) + maxSize = 20; + if (maxLines < 0) + maxLines = maxSize; // can't ever have more input lines than this! + else if (!maxLines) + maxLines = 1; + // `substring` anticipation: treat \r\n as a single character and take a little + // more than necessary so that we can still properly check against maxSize + // after we've transformed and limited the newLines in here: + if (next.length < maxSize * 2 + 2) { + next += this._input.substring(0, maxSize * 2 + 2); // substring is faster on Chrome/V8 + } + // now that we have a significantly reduced string to process, transform the newlines + // and chop them, then limit them: + var a = next.replace(/\r\n|\r/g, '\n').split('\n'); + a = a.slice(0, maxLines); + next = a.join('\n'); + // When, after limiting to maxLines, we still have too much to return, + // do add an ellipsis postfix... + if (next.length > maxSize) { + next = next.substring(0, maxSize) + '...'; + } + return next; + }, + + // return a string which displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function lexer_showPosition(maxPrefix, maxPostfix) { + var pre = this.pastInput(maxPrefix).replace(/\s/g, ' '); + var c = new Array(pre.length + 1).join('-'); + return pre + this.upcomingInput(maxPostfix).replace(/\s/g, ' ') + '\n' + c + '^'; + }, + + // helper function, used to produce a human readable description as a string, given + // the input `yylloc` location object. + // Set `display_range_too` to TRUE to include the string character index position(s) + // in the description if the `yylloc.range` is available. + describeYYLLOC: function lexer_describe_yylloc(yylloc, display_range_too) { + var l1 = yylloc.first_line; + var l2 = yylloc.last_line; + var o1 = yylloc.first_column; + var o2 = yylloc.last_column - 1; + var dl = l2 - l1; + var d_o = (dl === 0 ? o2 - o1 : 1000); + var rv; + if (dl === 0) { + rv = 'line ' + l1 + ', '; + if (d_o === 0) { + rv += 'column ' + o1; + } else { + rv += 'columns ' + o1 + ' .. ' + o2; + } + } else { + rv = 'lines ' + l1 + '(column ' + o1 + ') .. ' + l2 + '(column ' + o2 + ')'; + } + if (yylloc.range && display_range_too) { + var r1 = yylloc.range[0]; + var r2 = yylloc.range[1] - 1; + if (r2 === r1) { + rv += ' {String Offset: ' + r1 + '}'; + } else { + rv += ' {String Offset range: ' + r1 + ' .. ' + r2 + '}'; + } + } + return rv; + // return JSON.stringify(yylloc); + }, + + // test the lexed token: return FALSE when not a match, otherwise return token. + // + // `match` is supposed to be an array coming out of a regex match, i.e. `match[0]` + // contains the actually matched text string. + // + // Also move the input cursor forward and update the match collectors: + // - yytext + // - yyleng + // - match + // - matches + // - yylloc + // - offset + test_match: function lexer_test_match(match, indexed_rule) { + var token, + lines, + backup, + match_str; + + if (this.options.backtrack_lexer) { + // save context + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + + match_str = match[0]; + lines = match_str.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? + lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : + this.yylloc.last_column + match_str.length + }; + this.yytext += match_str; + this.match += match_str; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset + this.yyleng]; + } + // previous lex rules MAY have invoked the `more()` API rather than producing a token: + // those rules will already have moved this `offset` forward matching their match lengths, + // hence we must only add our own match length now: + this.offset += match_str.length; + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match_str.length); + this.matched += match_str; + + // calling this method: + // + // function lexer__performAction(yy, yy_, $avoiding_name_collisions, YY_START) {...} + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1] /* = YY_START */); + // otherwise, when the action codes are all simple return token statements: + //token = this.simpleCaseActionClusters[indexed_rule]; + + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + // recover context + for (var k in backup) { + this[k] = backup[k]; + } + this.__currentRuleSet__ = null; + return false; // rule action called reject() implying the next rule should be tested instead. + } else if (this._signaled_error_token) { + // produce one 'error' token as .parseError() in reject() did not guarantee a failure signal by throwing an exception! + token = this._signaled_error_token; + this._signaled_error_token = false; + return token; + } + return false; + }, + + // return next match in input + next: function lexer_next() { + if (this.done) { + this.clear(); + return this.EOF; + } + if (!this._input) { + this.done = true; + } + + var token, + match, + tempMatch, + index; + if (!this._more) { + this.clear(); + } + var spec = this.__currentRuleSet__; + if (!spec) { + // Update the ruleset cache as we apparently encountered a state change or just started lexing. + // The cache is set up for fast lookup -- we assume a lexer will switch states much less often than it will + // invoke the `lex()` token-producing API and related APIs, hence caching the set for direct access helps + // speed up those activities a tiny bit. + spec = this.__currentRuleSet__ = this._currentRules(); + } + + var rule_ids = spec.rules; +// var dispatch = spec.__dispatch_lut; + var regexes = spec.__rule_regexes; + var len = spec.__rule_count; + +// var c0 = this._input[0]; + + // Note: the arrays are 1-based, while `len` itself is a valid index, + // hence the non-standard less-or-equal check in the next loop condition! + // + // `dispatch` is a lookup table which lists the *first* rule which matches the 1-char *prefix* of the rule-to-match. + // By using that array as a jumpstart, we can cut down on the otherwise O(n*m) behaviour of this lexer, down to + // O(n) ideally, where: + // + // - N is the number of input particles -- which is not precisely characters + // as we progress on a per-regex-match basis rather than on a per-character basis + // + // - M is the number of rules (regexes) to test in the active condition state. + // + for (var i = 1 /* (dispatch[c0] || 1) */ ; i <= len; i++) { + tempMatch = this._input.match(regexes[i]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rule_ids[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = undefined; + continue; // rule action called reject() implying a rule MISmatch. + } else { + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rule_ids[index]); + if (token !== false) { + return token; + } + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; + } + if (this._input === '') { + this.done = true; + return this.EOF; + } else { + var p = this.constructLexErrorInfo('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), this.options.lexer_errors_are_recoverable); + token = (this.parseError(p.errStr, p) || this.ERROR); + if (token === this.ERROR) { + // we can try to recover from a lexer error that parseError() did not 'recover' for us, by moving forward at least one character at a time: + if (!this.match.length) { + this.input(); + } + } + return token; + } + }, + + // return next match that has a token + lex: function lexer_lex() { + var r; + // allow the PRE/POST handlers set/modify the return token for maximum flexibility of the generated lexer: + if (typeof this.options.pre_lex === 'function') { + r = this.options.pre_lex.call(this); + } + while (!r) { + r = this.next(); + } + if (typeof this.options.post_lex === 'function') { + // (also account for a userdef function which does not return any value: keep the token as is) + r = this.options.post_lex.call(this, r) || r; + } + return r; + }, + + // backwards compatible alias for `pushState()`; + // the latter is symmetrical with `popState()` and we advise to use + // those APIs in any modern lexer code, rather than `begin()`. + begin: function lexer_begin(condition) { + return this.pushState(condition); + }, + + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + pushState: function lexer_pushState(condition) { + this.conditionStack.push(condition); + this.__currentRuleSet__ = null; + return this; + }, + + // pop the previously active lexer condition state off the condition stack + popState: function lexer_popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + this.__currentRuleSet__ = null; + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function lexer_topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return 'INITIAL'; + } + }, + + // (internal) determine the lexer rule set which is active for the currently active lexer condition state + _currentRules: function lexer__currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]]; + } else { + return this.conditions['INITIAL']; + } + }, + + // return the number of states currently on the stack + stateStackSize: function lexer_stateStackSize() { + return this.conditionStack.length; + }, +options: {}, +JisonLexerError: JisonLexerError, +performAction: function lexer__performAction(yy, yy_, $avoiding_name_collisions, YY_START) { + +var YYSTATE = YY_START; +switch($avoiding_name_collisions) { +case 0 : +/*! Conditions:: INITIAL */ +/*! Rule:: [ \t\r\n]+ */ + + /* eat up whitespace */ + BeginToken(yy_.yytext); + +break; +case 1 : +/*! Conditions:: INITIAL */ +/*! Rule:: {DIGIT}+ */ + + BeginToken(yy_.yytext); + yylval.value = atof(yy_.yytext); + return VALUE; + +break; +case 2 : +/*! Conditions:: INITIAL */ +/*! Rule:: {DIGIT}+\.{DIGIT}* */ + + BeginToken(yy_.yytext); + yylval.value = atof(yy_.yytext); + return VALUE; + +break; +case 3 : +/*! Conditions:: INITIAL */ +/*! Rule:: {DIGIT}+[eE]["+""-"]?{DIGIT}* */ + + BeginToken(yy_.yytext); + yylval.value = atof(yy_.yytext); + return VALUE; + +break; +case 4 : +/*! Conditions:: INITIAL */ +/*! Rule:: {DIGIT}+\.{DIGIT}*[eE]["+""-"]?{DIGIT}* */ + + BeginToken(yy_.yytext); + yylval.value = atof(yy_.yytext); + return VALUE; + +break; +case 5 : +/*! Conditions:: INITIAL */ +/*! Rule:: {ID} */ + + BeginToken(yy_.yytext); + yylval.string = malloc(strlen(yy_.yytext)+1); + strcpy(yylval.string, yy_.yytext); + return IDENTIFIER; + +break; +case 6 : +/*! Conditions:: INITIAL */ +/*! Rule:: \+ */ + BeginToken(yy_.yytext); return ADD; +break; +case 7 : +/*! Conditions:: INITIAL */ +/*! Rule:: - */ + BeginToken(yy_.yytext); return SUB; +break; +case 8 : +/*! Conditions:: INITIAL */ +/*! Rule:: \* */ + BeginToken(yy_.yytext); return MULT; +break; +case 9 : +/*! Conditions:: INITIAL */ +/*! Rule:: \/ */ + BeginToken(yy_.yytext); return DIV; +break; +case 10 : +/*! Conditions:: INITIAL */ +/*! Rule:: \( */ + BeginToken(yy_.yytext); return LBRACE; +break; +case 11 : +/*! Conditions:: INITIAL */ +/*! Rule:: \) */ + BeginToken(yy_.yytext); return RBRACE; +break; +case 12 : +/*! Conditions:: INITIAL */ +/*! Rule:: ; */ + BeginToken(yy_.yytext); return SEMICOLON; +break; +case 13 : +/*! Conditions:: INITIAL */ +/*! Rule:: = */ + BeginToken(yy_.yytext); return ASSIGN; +break; +case 14 : +/*! Conditions:: INITIAL */ +/*! Rule:: . */ + + BeginToken(yy_.yytext); + return yy_.yytext[0]; + +break; +default: + return this.simpleCaseActionClusters[$avoiding_name_collisions]; +} +}, +simpleCaseActionClusters: { + +}, +rules: [ +/^(?:[ \t\r\n]+)/, +/^(?:(\d)+)/, +/^(?:(\d)+\.(\d)*)/, +/^(?:(\d)+[Ee]["+]?(\d)*)/, +/^(?:(\d)+\.(\d)*[Ee]["+]?(\d)*)/, +/^(?:([^\W\d]\w*))/, +/^(?:\+)/, +/^(?:-)/, +/^(?:\*)/, +/^(?:\/)/, +/^(?:\()/, +/^(?:\))/, +/^(?:;)/, +/^(?:=)/, +/^(?:.)/ +], +conditions: { + "INITIAL": { + rules: [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14 + ], + inclusive: true + } +} +}; + +/*-------------------------------------------------------------------- + * lex.l + *------------------------------------------------------------------*/; +return lexer; +})(); \ No newline at end of file diff --git a/samples/JavaScript/ccalc-parse.js b/samples/JavaScript/ccalc-parse.js new file mode 100644 index 0000000000..cde2974799 --- /dev/null +++ b/samples/JavaScript/ccalc-parse.js @@ -0,0 +1,2145 @@ +/* parser generated by jison 0.4.17-144 */ +/* + * Returns a Parser object of the following structure: + * + * Parser: { + * yy: {} The so-called "shared state" or rather the *source* of it; + * the real "shared state" `yy` passed around to + * the rule actions, etc. is a derivative/copy of this one, + * not a direct reference! + * } + * + * Parser.prototype: { + * yy: {}, + * EOF: 1, + * TERROR: 2, + * + * trace: function(errorMessage, ...), + * + * JisonParserError: function(msg, hash), + * + * quoteName: function(name), + * Helper function which can be overridden by user code later on: put suitable + * quotes around literal IDs in a description string. + * + * originalQuoteName: function(name), + * The basic quoteName handler provided by JISON. + * `cleanupAfterParse()` will clean up and reset `quoteName()` to reference this function + * at the end of the `parse()`. + * + * describeSymbol: function(symbol), + * Return a more-or-less human-readable description of the given symbol, when + * available, or the symbol itself, serving as its own 'description' for lack + * of something better to serve up. + * + * Return NULL when the symbol is unknown to the parser. + * + * symbols_: {associative list: name ==> number}, + * terminals_: {associative list: number ==> name}, + * nonterminals: {associative list: rule-name ==> {associative list: number ==> rule-alt}}, + * terminal_descriptions_: (if there are any) {associative list: number ==> description}, + * productions_: [...], + * + * performAction: function parser__performAction(yytext, yyleng, yylineno, yyloc, yy, yystate, $0, $$, _$, yystack, yysstack, ...), + * where `...` denotes the (optional) additional arguments the user passed to + * `parser.parse(str, ...)` + * + * table: [...], + * State transition table + * ---------------------- + * + * index levels are: + * - `state` --> hash table + * - `symbol` --> action (number or array) + * + * If the `action` is an array, these are the elements' meaning: + * - index [0]: 1 = shift, 2 = reduce, 3 = accept + * - index [1]: GOTO `state` + * + * If the `action` is a number, it is the GOTO `state` + * + * defaultActions: {...}, + * + * parseError: function(str, hash), + * yyErrOk: function(), + * yyClearIn: function(), + * + * constructParseErrorInfo: function(error_message, exception_object, expected_token_set, is_recoverable), + * Helper function **which will be set up during the first invocation of the `parse()` method**. + * Produces a new errorInfo 'hash object' which can be passed into `parseError()`. + * See it's use in this parser kernel in many places; example usage: + * + * var infoObj = parser.constructParseErrorInfo('fail!', null, + * parser.collect_expected_token_set(state), true); + * var retVal = parser.parseError(infoObj.errStr, infoObj); + * + * originalParseError: function(str, hash), + * The basic parseError handler provided by JISON. + * `cleanupAfterParse()` will clean up and reset `parseError()` to reference this function + * at the end of the `parse()`. + * + * options: { ... parser %options ... }, + * + * parse: function(input[, args...]), + * Parse the given `input` and return the parsed value (or `true` when none was provided by + * the root action, in which case the parser is acting as a *matcher*). + * You MAY use the additional `args...` parameters as per `%parse-param` spec of this grammar: + * these extra `args...` are passed verbatim to the grammar rules' action code. + * + * cleanupAfterParse: function(resultValue, invoke_post_methods), + * Helper function **which will be set up during the first invocation of the `parse()` method**. + * This helper API is invoked at the end of the `parse()` call, unless an exception was thrown + * and `%options no-try-catch` has been defined for this grammar: in that case this helper MAY + * be invoked by calling user code to ensure the `post_parse` callbacks are invoked and + * the internal parser gets properly garbage collected under these particular circumstances. + * + * lexer: { + * yy: {...}, A reference to the so-called "shared state" `yy` once + * received via a call to the `.setInput(input, yy)` lexer API. + * EOF: 1, + * ERROR: 2, + * JisonLexerError: function(msg, hash), + * parseError: function(str, hash), + * setInput: function(input, [yy]), + * input: function(), + * unput: function(str), + * more: function(), + * reject: function(), + * less: function(n), + * pastInput: function(n), + * upcomingInput: function(n), + * showPosition: function(), + * test_match: function(regex_match_array, rule_index), + * next: function(), + * lex: function(), + * begin: function(condition), + * pushState: function(condition), + * popState: function(), + * topState: function(), + * _currentRules: function(), + * stateStackSize: function(), + * + * options: { ... lexer %options ... }, + * + * performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), + * rules: [...], + * conditions: {associative list: name ==> set}, + * } + * } + * + * + * token location info (@$, _$, etc.): { + * first_line: n, + * last_line: n, + * first_column: n, + * last_column: n, + * range: [start_number, end_number] + * (where the numbers are indexes into the input string, zero-based) + * } + * + * --- + * + * The parseError function receives a 'hash' object with these members for lexer and + * parser errors: + * + * { + * text: (matched text) + * token: (the produced terminal token, if any) + * token_id: (the produced terminal token numeric ID, if any) + * line: (yylineno) + * loc: (yylloc) + * } + * + * parser (grammar) errors will also provide these additional members: + * + * { + * expected: (array describing the set of expected tokens; + * may be UNDEFINED when we cannot easily produce such a set) + * state: (integer (or array when the table includes grammar collisions); + * represents the current internal state of the parser kernel. + * can, for example, be used to pass to the `collect_expected_token_set()` + * API to obtain the expected token set) + * action: (integer; represents the current internal action which will be executed) + * new_state: (integer; represents the next/planned internal state, once the current + * action has executed) + * recoverable: (boolean: TRUE when the parser MAY have an error recovery rule + * available for this particular error) + * state_stack: (array: the current parser LALR/LR internal state stack; this can be used, + * for instance, for advanced error analysis and reporting) + * value_stack: (array: the current parser LALR/LR internal `$$` value stack; this can be used, + * for instance, for advanced error analysis and reporting) + * location_stack: (array: the current parser LALR/LR internal location stack; this can be used, + * for instance, for advanced error analysis and reporting) + * yy: (object: the current parser internal "shared state" `yy` + * as is also available in the rule actions; this can be used, + * for instance, for advanced error analysis and reporting) + * lexer: (reference to the current lexer instance used by the parser) + * } + * + * while `this` will reference the current parser instance. + * + * When `parseError` is invoked by the lexer, `this` will still reference the related *parser* + * instance, while these additional `hash` fields will also be provided: + * + * { + * lexer: (reference to the current lexer instance which reported the error) + * } + * + * When `parseError` is invoked by the parser due to a **JavaScript exception** being fired + * from either the parser or lexer, `this` will still reference the related *parser* + * instance, while these additional `hash` fields will also be provided: + * + * { + * exception: (reference to the exception thrown) + * } + * + * Please do note that in the latter situation, the `expected` field will be omitted as + * type of failure is assumed not to be due to *parse errors* but rather due to user + * action code in either parser or lexer failing unexpectedly. + * + * --- + * + * You can specify parser options by setting / modifying the `.yy` object of your Parser instance. + * These options are available: + * + * ### options which are global for all parser instances + * + * Parser.pre_parse: function(yy [, optional parse() args]) + * optional: you can specify a pre_parse() function in the chunk following + * the grammar, i.e. after the last `%%`. + * Parser.post_parse: function(yy, retval [, optional parse() args]) { return retval; } + * optional: you can specify a post_parse() function in the chunk following + * the grammar, i.e. after the last `%%`. When it does not return any value, + * the parser will return the original `retval`. + * + * ### options which can be set up per parser instance + * + * yy: { + * pre_parse: function(yy [, optional parse() args]) + * optional: is invoked before the parse cycle starts (and before the first + * invocation of `lex()`) but immediately after the invocation of + * `parser.pre_parse()`). + * post_parse: function(yy, retval [, optional parse() args]) { return retval; } + * optional: is invoked when the parse terminates due to success ('accept') + * or failure (even when exceptions are thrown). + * `retval` contains the return value to be produced by `Parser.parse()`; + * this function can override the return value by returning another. + * When it does not return any value, the parser will return the original + * `retval`. + * This function is invoked immediately before `Parser.post_parse()`. + * + * parseError: function(str, hash) + * optional: overrides the default `parseError` function. + * quoteName: function(name), + * optional: overrides the default `quoteName` function. + * } + * + * parser.lexer.options: { + * pre_lex: function() + * optional: is invoked before the lexer is invoked to produce another token. + * `this` refers to the Lexer object. + * post_lex: function(token) { return token; } + * optional: is invoked when the lexer has produced a token `token`; + * this function can override the returned token value by returning another. + * When it does not return any (truthy) value, the lexer will return + * the original `token`. + * `this` refers to the Lexer object. + * + * ranges: boolean + * optional: `true` ==> token location info will include a .range[] member. + * flex: boolean + * optional: `true` ==> flex-like lexing behaviour where the rules are tested + * exhaustively to find the longest match. + * backtrack_lexer: boolean + * optional: `true` ==> lexer regexes are tested in order and for invoked; + * the lexer terminates the scan when a token is returned by the action code. + * xregexp: boolean + * optional: `true` ==> lexer rule regexes are "extended regex format" requiring the + * `XRegExp` library. When this %option has not been specified at compile time, all lexer + * rule regexes have been written as standard JavaScript RegExp expressions. + * } + */ +var ccalcParse = (function () { + +// See also: +// http://stackoverflow.com/questions/1382107/whats-a-good-way-to-extend-error-in-javascript/#35881508 +// but we keep the prototype.constructor and prototype.name assignment lines too for compatibility +// with userland code which might access the derived class in a 'classic' way. +function JisonParserError(msg, hash) { + Object.defineProperty(this, 'name', { + enumerable: false, + writable: false, + value: 'JisonParserError' + }); + + if (msg == null) msg = '???'; + + Object.defineProperty(this, 'message', { + enumerable: false, + writable: true, + value: msg + }); + + this.hash = hash; + + var stacktrace; + if (hash && hash.exception instanceof Error) { + var ex2 = hash.exception; + this.message = ex2.message || msg; + stacktrace = ex2.stack; + } + if (!stacktrace) { + if (Error.hasOwnProperty('captureStackTrace')) { // V8 + Error.captureStackTrace(this, this.constructor); + } else { + stacktrace = (new Error(msg)).stack; + } + } + if (stacktrace) { + Object.defineProperty(this, 'stack', { + enumerable: false, + writable: false, + value: stacktrace + }); + } +} + +if (typeof Object.setPrototypeOf === 'function') { + Object.setPrototypeOf(JisonParserError.prototype, Error.prototype); +} else { + JisonParserError.prototype = Object.create(Error.prototype); +} +JisonParserError.prototype.constructor = JisonParserError; +JisonParserError.prototype.name = 'JisonParserError'; + + + +// helper: reconstruct the productions[] table +function bp(s) { + var rv = []; + var p = s.pop; + var r = s.rule; + for (var i = 0, l = p.length; i < l; i++) { + rv.push([ + p[i], + r[i] + ]); + } + return rv; +} + + + +// helper: reconstruct the 'goto' table +function bt(s) { + var rv = []; + var d = s.len; + var y = s.symbol; + var t = s.type; + var a = s.state; + var m = s.mode; + var g = s.goto; + for (var i = 0, l = d.length; i < l; i++) { + var n = d[i]; + var q = {}; + for (var j = 0; j < n; j++) { + var z = y.shift(); + switch (t.shift()) { + case 2: + q[z] = [ + m.shift(), + g.shift() + ]; + break; + + case 0: + q[z] = a.shift(); + break; + + default: + // type === 1: accept + q[z] = [ + 3 + ]; + } + } + rv.push(q); + } + return rv; +} + +// helper: runlength encoding with increment step: code, length: step (default step = 0) +// `this` references an array +function s(c, l, a) { + a = a || 0; + for (var i = 0; i < l; i++) { + this.push(c); + c += a; + } +} + +// helper: duplicate sequence from *relative* offset and length. +// `this` references an array +function c(i, l) { + i = this.length - i; + for (l += i; i < l; i++) { + this.push(this[i]); + } +} + +// helper: unpack an array using helpers and data, all passed in an array argument 'a'. +function u(a) { + var rv = []; + for (var i = 0, l = a.length; i < l; i++) { + var e = a[i]; + // Is this entry a helper function? + if (typeof e === 'function') { + i++; + e.apply(rv, a[i]); + } else { + rv.push(e); + } + } + return rv; +} + +var parser = { +trace: function no_op_trace() { }, +JisonParserError: JisonParserError, +yy: {}, +options: { + type: "lalr", + errorRecoveryTokenDiscardCount: 3 +}, +symbols_: { + "$accept": 0, + "$end": 1, + "ADD": 12, + "ASSIGN": 7, + "DIV": 14, + "EOF": 1, + "IDENTIFIER": 6, + "LBRACE": 9, + "MULT": 13, + "RBRACE": 10, + "SEMICOLON": 5, + "SUB": 11, + "VALUE": 15, + "error": 2, + "expression": 8, + "program": 3, + "statement": 4 +}, +terminals_: { + 1: "EOF", + 2: "error", + 5: "SEMICOLON", + 6: "IDENTIFIER", + 7: "ASSIGN", + 9: "LBRACE", + 10: "RBRACE", + 11: "SUB", + 12: "ADD", + 13: "MULT", + 14: "DIV", + 15: "VALUE" +}, +TERROR: 2, +EOF: 1, + +// internals: defined here so the object *structure* doesn't get modified by parse() et al, +// thus helping JIT compilers like Chrome V8. +originalQuoteName: null, +originalParseError: null, +cleanupAfterParse: null, +constructParseErrorInfo: null, + +__reentrant_call_depth: 0, // INTERNAL USE ONLY + +// APIs which will be set up depending on user action code analysis: +//yyErrOk: 0, +//yyClearIn: 0, + +// Helper APIs +// ----------- + +// Helper function which can be overridden by user code later on: put suitable quotes around +// literal IDs in a description string. +quoteName: function parser_quoteName(id_str) { + return '"' + id_str + '"'; +}, + +// Return a more-or-less human-readable description of the given symbol, when available, +// or the symbol itself, serving as its own 'description' for lack of something better to serve up. +// +// Return NULL when the symbol is unknown to the parser. +describeSymbol: function parser_describeSymbol(symbol) { + if (symbol !== this.EOF && this.terminal_descriptions_ && this.terminal_descriptions_[symbol]) { + return this.terminal_descriptions_[symbol]; + } + else if (symbol === this.EOF) { + return 'end of input'; + } + else if (this.terminals_[symbol]) { + return this.quoteName(this.terminals_[symbol]); + } + // Otherwise... this might refer to a RULE token i.e. a non-terminal: see if we can dig that one up. + // + // An example of this may be where a rule's action code contains a call like this: + // + // parser.describeSymbol(#$) + // + // to obtain a human-readable description or name of the current grammar rule. This comes handy in + // error handling action code blocks, for example. + var s = this.symbols_; + for (var key in s) { + if (s[key] === symbol) { + return key; + } + } + return null; +}, + +// Produce a (more or less) human-readable list of expected tokens at the point of failure. +// +// The produced list may contain token or token set descriptions instead of the tokens +// themselves to help turning this output into something that easier to read by humans +// unless `do_not_describe` parameter is set, in which case a list of the raw, *numeric*, +// expected terminals and nonterminals is produced. +// +// The returned list (array) will not contain any duplicate entries. +collect_expected_token_set: function parser_collect_expected_token_set(state, do_not_describe) { + var TERROR = this.TERROR; + var tokenset = []; + var check = {}; + // Has this (error?) state been outfitted with a custom expectations description text for human consumption? + // If so, use that one instead of the less palatable token set. + if (!do_not_describe && this.state_descriptions_ && this.state_descriptions_[state]) { + return [ + this.state_descriptions_[state] + ]; + } + for (var p in this.table[state]) { + p = +p; + if (p !== TERROR) { + var d = do_not_describe ? p : this.describeSymbol(p); + if (d && !check[d]) { + tokenset.push(d); + check[d] = true; // Mark this token description as already mentioned to prevent outputting duplicate entries. + } + } + } + return tokenset; +}, +productions_: bp({ + pop: u([ + s, + [3, 3], + 4, + 4, + s, + [8, 8] +]), + rule: u([ + 3, + 2, + 4, + 3, + 1, + 3, + 2, + s, + [3, 4], + 1, + 1 +]) +}), +performAction: function parser__PerformAction(yytext, yyloc, yy, yystate /* action[1] */, $0, $$ /* vstack */, _$ /* lstack */) { +/* this == yyval */ + +switch (yystate) { +case 3: + /*! Production:: program : statement error SEMICOLON program */ + yy.parser.yyErrOk(); + break; + +case 4: + /*! Production:: statement : IDENTIFIER ASSIGN expression */ + VarSetValue(var, $$[$0]); + break; + +case 6: + /*! Production:: expression : LBRACE expression RBRACE */ + this.$ = $$[$0 - 1]; + break; + +case 7: + /*! Production:: expression : SUB expression */ + this.$ = - $$[$0]; + break; + +case 8: + /*! Production:: expression : expression ADD expression */ + this.$ = ReduceAdd($$[$0 - 2], $$[$0], &_$[$0]); + if ( debug ) + printf("reduce %lf + %lf => %lf\n", $$[$0 - 2], $$[$0], this.$); + break; + +case 9: + /*! Production:: expression : expression SUB expression */ + this.$ = ReduceSub($$[$0 - 2], $$[$0], &_$[$0]); + if ( debug ) + printf("reduce %lf - %lf => %lf\n", $$[$0 - 2], $$[$0], this.$); + break; + +case 10: + /*! Production:: expression : expression MULT expression */ + this.$ = ReduceMult($$[$0 - 2], $$[$0], &_$[$0]); + if ( debug ) + printf("reduce %lf * %lf => %lf\n", $$[$0 - 2], $$[$0], this.$); + break; + +case 11: + /*! Production:: expression : expression DIV expression */ + this.$ = ReduceDiv($$[$0 - 2], $$[$0], &_$[$0]); + if ( debug ) + printf("reduce %lf / %lf => %lf\n", $$[$0 - 2], $$[$0], this.$); + break; + +case 12: + /*! Production:: expression : VALUE */ + this.$ = $$[$0]; + break; + +case 13: + /*! Production:: expression : IDENTIFIER */ + this.$ = VarGetValue($$[$0], &_$[$0]); + if ( debug ) + printf("identifier %s => %lf\n", $$[$0], this.$); + break; + +} +}, +table: bt({ + len: u([ + 7, + 1, + 2, + 7, + 6, + 5, + 5, + 7, + 8, + 1, + s, + [5, 6], + 7, + 7, + 1, + 7, + 6, + s, + [7, 5], + 1 +]), + symbol: u([ + 3, + 4, + 6, + 8, + 9, + 11, + 15, + 1, + 2, + 5, + 2, + 5, + 7, + s, + [11, 4, 1], + 2, + 5, + c, + [6, 4], + c, + [21, 5], + c, + [5, 5], + 2, + 5, + s, + [10, 5, 1], + 1, + c, + [41, 7], + 5, + c, + [26, 10], + c, + [5, 15], + c, + [39, 5], + c, + [46, 7], + c, + [53, 15], + c, + [84, 6], + c, + [28, 14], + c, + [7, 21], + 1 +]), + type: u([ + 0, + 0, + 2, + 0, + s, + [2, 3], + 1, + s, + [2, 16], + c, + [21, 4], + c, + [5, 6], + c, + [17, 8], + c, + [41, 6], + c, + [26, 12], + c, + [5, 15], + s, + [2, 19], + c, + [53, 9], + s, + [2, 40] +]), + state: u([ + 1, + 2, + 4, + 15, + 17, + 18, + 2, + 4, + s, + [20, 5, 1], + 26, + 2, + 4 +]), + mode: u([ + s, + [1, 6], + 2, + 2, + c, + [3, 3], + s, + [2, 4], + s, + [1, 12], + s, + [2, 8], + s, + [1, 30], + s, + [2, 15], + c, + [78, 7], + c, + [25, 8], + c, + [7, 14], + s, + [2, 17] +]), + goto: u([ + 3, + 5, + 6, + 7, + 9, + 8, + 13, + 13, + 10, + s, + [13, 4], + 5, + 5, + 12, + 11, + 13, + 14, + 16, + c, + [19, 3], + c, + [4, 4], + s, + [12, 7], + 2, + c, + [35, 4], + 19, + c, + [21, 8], + c, + [4, 12], + 25, + c, + [46, 4], + s, + [13, 7], + s, + [7, 7], + 1, + c, + [45, 4], + 4, + 4, + c, + [25, 4], + s, + [8, 5], + 13, + 14, + s, + [9, 5], + 13, + 14, + s, + [10, 7], + s, + [11, 7], + s, + [6, 7], + 3 +]) +}), +defaultActions: { + 18: 1, + 26: 3 +}, +parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + hash.destroy(); // destroy... well, *almost*! + // assert('recoverable' in hash); + } else { + throw new this.JisonParserError(str, hash); + } +}, +parse: function parse(input) { + var self = this, + stack = new Array(128), // token stack: stores token which leads to state at the same index (column storage) + sstack = new Array(128), // state stack: stores states + + vstack = new Array(128), // semantic value stack + lstack = new Array(128), // location stack + table = this.table, + sp = 0; // 'stack pointer': index into the stacks + + var recovering = 0; // (only used when the grammar contains error recovery rules) + var TERROR = this.TERROR, + EOF = this.EOF, + ERROR_RECOVERY_TOKEN_DISCARD_COUNT = (this.options.errorRecoveryTokenDiscardCount | 0) || 3; + var NO_ACTION = [0, table.length /* ensures that anyone using this new state will fail dramatically! */]; + + //this.reductionCount = this.shiftCount = 0; + + var lexer; + if (this.__lexer__) { + lexer = this.__lexer__; + } else { + lexer = this.__lexer__ = Object.create(this.lexer); + } + + var sharedState = { + yy: { + parseError: null, + quoteName: null, + lexer: null, + parser: null, + pre_parse: null, + post_parse: null + } + }; + // copy state + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + + sharedState.yy.lexer = lexer; + sharedState.yy.parser = this; + + + + + + + + + + + + + + + + + + + + if (this.yyErrOk === 1) { + this.yyErrOk = function yyErrOk() { + recovering = 0; + }; + } + + + + + + + lexer.setInput(input, sharedState.yy); + + if (typeof lexer.yylloc === 'undefined') { + lexer.yylloc = {}; + } + var yyloc = lexer.yylloc; + lstack[sp] = yyloc; + vstack[sp] = null; + sstack[sp] = 0; + stack[sp] = 0; + ++sp; + + if (typeof lexer.yytext === 'undefined') { + lexer.yytext = ''; + } + var yytext = lexer.yytext; + if (typeof lexer.yylineno === 'undefined') { + lexer.yylineno = 0; + } + + + + + var ranges = lexer.options && lexer.options.ranges; + + // Does the shared state override the default `parseError` that already comes with this instance? + if (typeof sharedState.yy.parseError === 'function') { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = this.originalParseError; + } + + // Does the shared state override the default `quoteName` that already comes with this instance? + if (typeof sharedState.yy.quoteName === 'function') { + this.quoteName = sharedState.yy.quoteName; + } else { + this.quoteName = this.originalQuoteName; + } + + // set up the cleanup function; make it an API so that external code can re-use this one in case of + // calamities or when the `%options no-try-catch` option has been specified for the grammar, in which + // case this parse() API method doesn't come with a `finally { ... }` block any more! + // + // NOTE: as this API uses parse() as a closure, it MUST be set again on every parse() invocation, + // or else your `sharedState`, etc. references will be *wrong*! + // + // The function resets itself to the previous set up one to support reentrant parsers. + this.cleanupAfterParse = function parser_cleanupAfterParse(resultValue, invoke_post_methods) { + var rv; + + if (invoke_post_methods) { + if (sharedState.yy.post_parse) { + rv = sharedState.yy.post_parse.call(this, sharedState.yy, resultValue); + if (typeof rv !== 'undefined') resultValue = rv; + } + if (this.post_parse) { + rv = this.post_parse.call(this, sharedState.yy, resultValue); + if (typeof rv !== 'undefined') resultValue = rv; + } + } + + if (this.__reentrant_call_depth > 1) return resultValue; // do not (yet) kill the sharedState when this is a reentrant run. + + // prevent lingering circular references from causing memory leaks: + if (sharedState.yy) { + sharedState.yy.parseError = undefined; + sharedState.yy.quoteName = undefined; + sharedState.yy.lexer = undefined; + sharedState.yy.parser = undefined; + if (lexer.yy === sharedState.yy) { + lexer.yy = undefined; + } + } + sharedState.yy = undefined; + this.parseError = this.originalParseError; + this.quoteName = this.originalQuoteName; + + // nuke the vstack[] array at least as that one will still reference obsoleted user values. + // To be safe, we nuke the other internal stack columns as well... + stack.length = 0; // fastest way to nuke an array without overly bothering the GC + sstack.length = 0; + lstack.length = 0; + vstack.length = 0; + stack_pointer = 0; + + return resultValue; + }; + + // NOTE: as this API uses parse() as a closure, it MUST be set again on every parse() invocation, + // or else your `lexer`, `sharedState`, etc. references will be *wrong*! + this.constructParseErrorInfo = function parser_constructParseErrorInfo(msg, ex, expected, recoverable) { + return { + errStr: msg, + exception: ex, + text: lexer.match, + value: lexer.yytext, + token: this.describeSymbol(symbol) || symbol, + token_id: symbol, + line: lexer.yylineno, + loc: lexer.yylloc, + expected: expected, + recoverable: recoverable, + state: state, + action: action, + new_state: newState, + symbol_stack: stack, + state_stack: sstack, + value_stack: vstack, + location_stack: lstack, + stack_pointer: sp, + yy: sharedState.yy, + lexer: lexer, + + // and make sure the error info doesn't stay due to potential ref cycle via userland code manipulations (memory leak opportunity!): + destroy: function destructParseErrorInfo() { + // remove cyclic references added to error info: + // info.yy = null; + // info.lexer = null; + // info.value = null; + // info.value_stack = null; + // ... + var rec = !!this.recoverable; + for (var key in this) { + if (this.hasOwnProperty(key) && typeof key !== 'function') { + this[key] = undefined; + } + } + this.recoverable = rec; + } + }; + }; + + + function lex() { + var token = lexer.lex(); + // if token isn't its numeric value, convert + if (typeof token !== 'number') { + token = self.symbols_[token] || token; + } + return token || EOF; + } + + + var symbol = 0; + var preErrorSymbol = 0; + var state, action, r, t; + var yyval = {}; + var p, len, this_production; + var lstack_begin, lstack_end; + var newState; + var retval = false; + + + // Return the rule stack depth where the nearest error rule can be found. + // Return -1 when no error recovery rule was found. + function locateNearestErrorRecoveryRule(state) { + var stack_probe = sp - 1; + var depth = 0; + + // try to recover from error + for (;;) { + // check for error recovery rule in this state + var t = table[state][TERROR] || NO_ACTION; + if (t[0]) { + return depth; + } + if (state === 0 /* $accept rule */ || stack_probe < 1) { + return -1; // No suitable error recovery rule available. + } + --stack_probe; // popStack(1): [symbol, action] + state = sstack[stack_probe]; + ++depth; + } + } + + try { + this.__reentrant_call_depth++; + + if (this.pre_parse) { + this.pre_parse.call(this, sharedState.yy); + } + if (sharedState.yy.pre_parse) { + sharedState.yy.pre_parse.call(this, sharedState.yy); + } + + newState = sstack[sp - 1]; + for (;;) { + // retrieve state number from top of stack + state = newState; // sstack[sp - 1]; + + // use default actions if available + if (this.defaultActions[state]) { + action = 2; + newState = this.defaultActions[state]; + } else { + // The single `==` condition below covers both these `===` comparisons in a single + // operation: + // + // if (symbol === null || typeof symbol === 'undefined') ... + if (!symbol) { + symbol = lex(); + } + // read action for current state and first input + t = (table[state] && table[state][symbol]) || NO_ACTION; + newState = t[1]; + action = t[0]; + + + + + // handle parse error + if (!action) { + // first see if there's any chance at hitting an error recovery rule: + var error_rule_depth = locateNearestErrorRecoveryRule(state); + var errStr = null; + var errSymbolDescr = (this.describeSymbol(symbol) || symbol); + var expected = this.collect_expected_token_set(state); + + if (!recovering) { + // Report error + if (lexer.showPosition) { + errStr = 'Parse error on line ' + (lexer.yylineno + 1) + ':\n' + lexer.showPosition(79 - 10, 10) + '\n'; + } else { + errStr = 'Parse error on line ' + (lexer.yylineno + 1) + ': '; + } + if (expected.length) { + errStr += 'Expecting ' + expected.join(', ') + ', got unexpected ' + errSymbolDescr; + } else { + errStr += 'Unexpected ' + errSymbolDescr; + } + p = this.constructParseErrorInfo(errStr, null, expected, (error_rule_depth >= 0)); + r = this.parseError(p.errStr, p); + + + if (!p.recoverable) { + retval = r; + break; + } else { + // TODO: allow parseError callback to edit symbol and or state tat the start of the error recovery process... + } + } + + + + // just recovered from another error + if (recovering === ERROR_RECOVERY_TOKEN_DISCARD_COUNT && error_rule_depth >= 0) { + // only barf a fatal hairball when we're out of look-ahead symbols and none hit a match; + // this DOES discard look-ahead while recovering from an error when said look-ahead doesn't + // suit the error recovery rules... The error HAS been reported already so we're fine with + // throwing away a few items if that is what it takes to match the nearest recovery rule! + if (symbol === EOF || preErrorSymbol === EOF) { + p = this.constructParseErrorInfo((errStr || 'Parsing halted while starting to recover from another error.'), null, expected, false); + retval = this.parseError(p.errStr, p); + break; + } + + // discard current lookahead and grab another + + yytext = lexer.yytext; + + yyloc = lexer.yylloc; + + symbol = lex(); + + + } + + // try to recover from error + if (error_rule_depth < 0) { + p = this.constructParseErrorInfo((errStr || 'Parsing halted. No suitable error recovery rule available.'), null, expected, false); + retval = this.parseError(p.errStr, p); + break; + } + sp -= error_rule_depth; + + preErrorSymbol = (symbol === TERROR ? 0 : symbol); // save the lookahead token + symbol = TERROR; // insert generic error symbol as new lookahead + // allow N (default: 3) real symbols to be shifted before reporting a new error + recovering = ERROR_RECOVERY_TOKEN_DISCARD_COUNT; + + newState = sstack[sp - 1]; + + + + continue; + } + } + + + switch (action) { + // catch misc. parse failures: + default: + // this shouldn't happen, unless resolve defaults are off + if (action instanceof Array) { + p = this.constructParseErrorInfo(('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol), null, null, false); + retval = this.parseError(p.errStr, p); + break; + } + // Another case of better safe than sorry: in case state transitions come out of another error recovery process + // or a buggy LUT (LookUp Table): + p = this.constructParseErrorInfo('Parsing halted. No viable error recovery approach available due to internal system failure.', null, null, false); + retval = this.parseError(p.errStr, p); + break; + + // shift: + case 1: + //this.shiftCount++; + stack[sp] = symbol; + vstack[sp] = lexer.yytext; + lstack[sp] = lexer.yylloc; + sstack[sp] = newState; // push state + ++sp; + symbol = 0; + if (!preErrorSymbol) { // normal execution / no error + // Pick up the lexer details for the current symbol as that one is not 'look-ahead' any more: + + yytext = lexer.yytext; + + yyloc = lexer.yylloc; + + if (recovering > 0) { + recovering--; + + } + } else { + // error just occurred, resume old lookahead f/ before error, *unless* that drops us straight back into error mode: + symbol = preErrorSymbol; + preErrorSymbol = 0; + + // read action for current state and first input + t = (table[newState] && table[newState][symbol]) || NO_ACTION; + if (!t[0]) { + // forget about that symbol and move forward: this wasn't an 'forgot to insert' error type where + // (simple) stuff might have been missing before the token which caused the error we're + // recovering from now... + + symbol = 0; + } + } + + continue; + + // reduce: + case 2: + //this.reductionCount++; + this_production = this.productions_[newState - 1]; // `this.productions_[]` is zero-based indexed while states start from 1 upwards... + len = this_production[1]; + lstack_end = sp; + lstack_begin = lstack_end - (len || 1); + lstack_end--; + + + + // Make sure subsequent `$$ = $1` default action doesn't fail + // for rules where len==0 as then there's no $1 (you're reducing an epsilon rule then!) + // + // Also do this to prevent nasty action block codes to *read* `$0` or `$$` + // and *not* get `undefined` as a result for their efforts! + vstack[sp] = undefined; + + // perform semantic action + yyval.$ = vstack[sp - len]; // default to $$ = $1; result must produce `undefined` when len == 0, as then there's no $1 + + // default location, uses first token for firsts, last for lasts + yyval._$ = { + first_line: lstack[lstack_begin].first_line, + last_line: lstack[lstack_end].last_line, + first_column: lstack[lstack_begin].first_column, + last_column: lstack[lstack_end].last_column + }; + if (ranges) { + yyval._$.range = [lstack[lstack_begin].range[0], lstack[lstack_end].range[1]]; + } + + r = this.performAction.call(yyval, yytext, yyloc, sharedState.yy, newState, sp - 1, vstack, lstack); + + if (typeof r !== 'undefined') { + retval = r; + break; + } + + // pop off stack + sp -= len; + + // don't overwrite the `symbol` variable: use a local var to speed things up: + var ntsymbol = this_production[0]; // push nonterminal (reduce) + stack[sp] = ntsymbol; + vstack[sp] = yyval.$; + lstack[sp] = yyval._$; + // goto new state = table[STATE][NONTERMINAL] + newState = table[sstack[sp - 1]][ntsymbol]; + sstack[sp] = newState; + ++sp; + + continue; + + // accept: + case 3: + retval = true; + // Return the `$accept` rule's `$$` result, if available. + // + // Also note that JISON always adds this top-most `$accept` rule (with implicit, + // default, action): + // + // $accept: $end + // %{ $$ = $1; @$ = @1; %} + // + // which, combined with the parse kernel's `$accept` state behaviour coded below, + // will produce the `$$` value output of the rule as the parse result, + // IFF that result is *not* `undefined`. (See also the parser kernel code.) + // + // In code: + // + // %{ + // @$ = @1; // if location tracking support is included + // if (typeof $1 !== 'undefined') + // return $1; + // else + // return true; // the default parse result if the rule actions don't produce anything + // %} + if (typeof yyval.$ !== 'undefined') { + retval = yyval.$; + } + break; + } + + // break out of loop: we accept or fail with error + break; + } + } catch (ex) { + // report exceptions through the parseError callback too: + p = this.constructParseErrorInfo('Parsing aborted due to exception.', ex, null, false); + retval = this.parseError(p.errStr, p); + } finally { + retval = this.cleanupAfterParse(retval, true); + this.__reentrant_call_depth--; + } + + return retval; +}, +yyErrOk: 1 +}; +parser.originalParseError = parser.parseError; +parser.originalQuoteName = parser.quoteName; +/*! @file lex.l + * @brief Lexical Analysis + ********************************************************************* + * a simple calculator with variables + * + * sample-files for a artikel in developerworks.ibm.com + * Author: Christian Hagen, chagen@de.ibm.com + * + * @par parse.l & parse.c + * grammar for the parser-generator bison + * + ********************************************************************* + */ + +// #define YYERROR_VERBOSE 1 +// #define YYDEBUG 1 +// int yydebug=0; + +/*-------------------------------------------------------------------- + * + * global variables + * + *------------------------------------------------------------------*/ +static Variable *var; + + +/*------------------------------------------------------------------------------ + * + * functions + * + *----------------------------------------------------------------------------*/ +//extern +//void yyerror(char *s) { +// // simple error-message +// // printf("Error '%s'\n", s); +// // a more sophisticated error-function +// PrintError(s); +//} + +/*-------------------------------------------------------------------- + * parse.y + *------------------------------------------------------------------*/ +/* generated by jison-lex 0.3.4-144 */ +var lexer = (function () { +// See also: +// http://stackoverflow.com/questions/1382107/whats-a-good-way-to-extend-error-in-javascript/#35881508 +// but we keep the prototype.constructor and prototype.name assignment lines too for compatibility +// with userland code which might access the derived class in a 'classic' way. +function JisonLexerError(msg, hash) { + Object.defineProperty(this, 'name', { + enumerable: false, + writable: false, + value: 'JisonLexerError' + }); + + if (msg == null) msg = '???'; + + Object.defineProperty(this, 'message', { + enumerable: false, + writable: true, + value: msg + }); + + this.hash = hash; + + var stacktrace; + if (hash && hash.exception instanceof Error) { + var ex2 = hash.exception; + this.message = ex2.message || msg; + stacktrace = ex2.stack; + } + if (!stacktrace) { + if (Error.hasOwnProperty('captureStackTrace')) { // V8 + Error.captureStackTrace(this, this.constructor); + } else { + stacktrace = (new Error(msg)).stack; + } + } + if (stacktrace) { + Object.defineProperty(this, 'stack', { + enumerable: false, + writable: false, + value: stacktrace + }); + } +} + + if (typeof Object.setPrototypeOf === 'function') { + Object.setPrototypeOf(JisonLexerError.prototype, Error.prototype); + } else { + JisonLexerError.prototype = Object.create(Error.prototype); + } + JisonLexerError.prototype.constructor = JisonLexerError; + JisonLexerError.prototype.name = 'JisonLexerError'; + + +var lexer = { + EOF: 1, + ERROR: 2, + + // JisonLexerError: JisonLexerError, // <-- injected by the code generator + + // options: {}, // <-- injected by the code generator + + // yy: ..., // <-- injected by setInput() + + __currentRuleSet__: null, // <-- internal rule set cache for the current lexer state + + parseError: function lexer_parseError(str, hash) { + if (this.yy.parser && typeof this.yy.parser.parseError === 'function') { + return this.yy.parser.parseError(str, hash) || this.ERROR; + } else { + throw new this.JisonLexerError(str); + } + }, + + // clear the lexer token context; intended for internal use only + clear: function lexer_clear() { + this.yytext = ''; + this.yyleng = 0; + this.match = ''; + this.matches = false; + this._more = false; + this._backtrack = false; + }, + + // resets the lexer, sets new input + setInput: function lexer_setInput(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this.clear(); + this._signaled_error_token = this.done = false; + this.yylineno = 0; + this.matched = ''; + this.conditionStack = ['INITIAL']; + this.__currentRuleSet__ = null; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + + // consumes and returns one char from the input + input: function lexer_input() { + if (!this._input) { + this.done = true; + return null; + } + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + // Count the linenumber up when we hit the LF (or a stand-alone CR). + // On CRLF, the linenumber is incremented when you fetch the CR or the CRLF combo + // and we advance immediately past the LF as well, returning both together as if + // it was all a single 'character' only. + var slice_len = 1; + var lines = false; + if (ch === '\n') { + lines = true; + } else if (ch === '\r') { + lines = true; + var ch2 = this._input[1]; + if (ch2 === '\n') { + slice_len++; + ch += ch2; + this.yytext += ch2; + this.yyleng++; + this.offset++; + this.match += ch2; + this.matched += ch2; + if (this.options.ranges) { + this.yylloc.range[1]++; + } + } + } + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + + this._input = this._input.slice(slice_len); + return ch; + }, + + // unshifts one char (or a string) into the input + unput: function lexer_unput(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - len); + this.matched = this.matched.substr(0, this.matched.length - len); + + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + + this.yylloc.last_line = this.yylineno + 1; + this.yylloc.last_column = (lines ? + (lines.length === oldLines.length ? this.yylloc.first_column : 0) + + oldLines[oldLines.length - lines.length].length - lines[0].length : + this.yylloc.first_column - len); + + if (this.options.ranges) { + this.yylloc.range[1] = this.yylloc.range[0] + this.yyleng - len; + } + this.yyleng = this.yytext.length; + this.done = false; + return this; + }, + + // When called from action, caches matched text and appends it on next action + more: function lexer_more() { + this._more = true; + return this; + }, + + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function lexer_reject() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + // when the parseError() call returns, we MUST ensure that the error is registered. + // We accomplish this by signaling an 'error' token to be produced for the current + // .lex() run. + this._signaled_error_token = (this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { + text: this.match, + token: null, + line: this.yylineno, + loc: this.yylloc, + lexer: this + }) || this.ERROR); + } + return this; + }, + + // retain first n characters of the match + less: function lexer_less(n) { + return this.unput(this.match.slice(n)); + }, + + // return (part of the) already matched input, i.e. for error messages. + // Limit the returned string length to `maxSize` (default: 20). + // Limit the returned string to the `maxLines` number of lines of input (default: 1). + // Negative limit values equal *unlimited*. + pastInput: function lexer_pastInput(maxSize, maxLines) { + var past = this.matched.substring(0, this.matched.length - this.match.length); + if (maxSize < 0) + maxSize = past.length; + else if (!maxSize) + maxSize = 20; + if (maxLines < 0) + maxLines = past.length; // can't ever have more input lines than this! + else if (!maxLines) + maxLines = 1; + // `substr` anticipation: treat \r\n as a single character and take a little + // more than necessary so that we can still properly check against maxSize + // after we've transformed and limited the newLines in here: + past = past.substr(-maxSize * 2 - 2); + // now that we have a significantly reduced string to process, transform the newlines + // and chop them, then limit them: + var a = past.replace(/\r\n|\r/g, '\n').split('\n'); + a = a.slice(-maxLines); + past = a.join('\n'); + // When, after limiting to maxLines, we still have to much to return, + // do add an ellipsis prefix... + if (past.length > maxSize) { + past = '...' + past.substr(-maxSize); + } + return past; + }, + + // return (part of the) upcoming input, i.e. for error messages. + // Limit the returned string length to `maxSize` (default: 20). + // Limit the returned string to the `maxLines` number of lines of input (default: 1). + // Negative limit values equal *unlimited*. + upcomingInput: function lexer_upcomingInput(maxSize, maxLines) { + var next = this.match; + if (maxSize < 0) + maxSize = next.length + this._input.length; + else if (!maxSize) + maxSize = 20; + if (maxLines < 0) + maxLines = maxSize; // can't ever have more input lines than this! + else if (!maxLines) + maxLines = 1; + // `substring` anticipation: treat \r\n as a single character and take a little + // more than necessary so that we can still properly check against maxSize + // after we've transformed and limited the newLines in here: + if (next.length < maxSize * 2 + 2) { + next += this._input.substring(0, maxSize * 2 + 2); // substring is faster on Chrome/V8 + } + // now that we have a significantly reduced string to process, transform the newlines + // and chop them, then limit them: + var a = next.replace(/\r\n|\r/g, '\n').split('\n'); + a = a.slice(0, maxLines); + next = a.join('\n'); + // When, after limiting to maxLines, we still have to much to return, + // do add an ellipsis postfix... + if (next.length > maxSize) { + next = next.substring(0, maxSize) + '...'; + } + return next; + }, + + // return a string which displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function lexer_showPosition(maxPrefix, maxPostfix) { + var pre = this.pastInput(maxPrefix).replace(/\s/g, ' '); + var c = new Array(pre.length + 1).join('-'); + return pre + this.upcomingInput(maxPostfix).replace(/\s/g, ' ') + '\n' + c + '^'; + }, + + // helper function, used to produce a human readable description as a string, given + // the input `yylloc` location object. + // Set `display_range_too` to TRUE to include the string character inex position(s) + // in the description if the `yylloc.range` is available. + describeYYLLOC: function lexer_describe_yylloc(yylloc, display_range_too) { + var l1 = yylloc.first_line; + var l2 = yylloc.last_line; + var o1 = yylloc.first_column; + var o2 = yylloc.last_column - 1; + var dl = l2 - l1; + var d_o = (dl === 0 ? o2 - o1 : 1000); + var rv; + if (dl === 0) { + rv = 'line ' + l1 + ', '; + if (d_o === 0) { + rv += 'column ' + o1; + } else { + rv += 'columns ' + o1 + ' .. ' + o2; + } + } else { + rv = 'lines ' + l1 + '(column ' + o1 + ') .. ' + l2 + '(column ' + o2 + ')'; + } + if (yylloc.range && display_range_too) { + var r1 = yylloc.range[0]; + var r2 = yylloc.range[1] - 1; + if (r2 === r1) { + rv += ' {String Offset: ' + r1 + '}'; + } else { + rv += ' {String Offset range: ' + r1 + ' .. ' + r2 + '}'; + } + } + return rv; + // return JSON.stringify(yylloc); + }, + + // test the lexed token: return FALSE when not a match, otherwise return token. + // + // `match` is supposed to be an array coming out of a regex match, i.e. `match[0]` + // contains the actually matched text string. + // + // Also move the input cursor forward and update the match collectors: + // - yytext + // - yyleng + // - match + // - matches + // - yylloc + // - offset + test_match: function lexer_test_match(match, indexed_rule) { + var token, + lines, + backup, + match_str; + + if (this.options.backtrack_lexer) { + // save context + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + + match_str = match[0]; + lines = match_str.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? + lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : + this.yylloc.last_column + match_str.length + }; + this.yytext += match_str; + this.match += match_str; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset + this.yyleng]; + } + // previous lex rules MAY have invoked the `more()` API rather than producing a token: + // those rules will already have moved this `offset` forward matching their match lengths, + // hence we must only add our own match length now: + this.offset += match_str.length; + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match_str.length); + this.matched += match_str; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + // recover context + for (var k in backup) { + this[k] = backup[k]; + } + this.__currentRuleSet__ = null; + return false; // rule action called reject() implying the next rule should be tested instead. + } else if (this._signaled_error_token) { + // produce one 'error' token as .parseError() in reject() did not guarantee a failure signal by throwing an exception! + token = this._signaled_error_token; + this._signaled_error_token = false; + return token; + } + return false; + }, + + // return next match in input + next: function lexer_next() { + if (this.done) { + this.clear(); + return this.EOF; + } + if (!this._input) { + this.done = true; + } + + var token, + match, + tempMatch, + index; + if (!this._more) { + this.clear(); + } + var rules = this.__currentRuleSet__; + if (!rules) { + // Update the ruleset cache as we apparently encountered a state change or just started lexing. + // The cache is set up for fast lookup -- we assume a lexer will switch states much less often than it will + // invoke the `lex()` token-producing API and related APIs, hence caching the set for direct access helps + // speed up those activities a tiny bit. + rules = this.__currentRuleSet__ = this._currentRules(); + } + for (var i = 0, len = rules.length; i < len; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = undefined; + continue; // rule action called reject() implying a rule MISmatch. + } else { + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; + } + if (this._input === '') { + this.clear(); + this.done = true; + return this.EOF; + } else { + token = this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { + text: this.match + this._input, + token: null, + line: this.yylineno, + loc: this.yylloc, + lexer: this + }) || this.ERROR; + if (token === this.ERROR) { + // we can try to recover from a lexer error that parseError() did not 'recover' for us, by moving forward at least one character at a time: + if (!this.match.length) { + this.input(); + } + } + return token; + } + }, + + // return next match that has a token + lex: function lexer_lex() { + var r; + // allow the PRE/POST handlers set/modify the return token for maximum flexibility of the generated lexer: + if (typeof this.options.pre_lex === 'function') { + r = this.options.pre_lex.call(this); + } + while (!r) { + r = this.next(); + } + if (typeof this.options.post_lex === 'function') { + // (also account for a userdef function which does not return any value: keep the token as is) + r = this.options.post_lex.call(this, r) || r; + } + return r; + }, + + // backwards compatible alias for `pushState()`; + // the latter is symmetrical with `popState()` and we advise to use + // those APIs in any modern lexer code, rather than `begin()`. + begin: function lexer_begin(condition) { + return this.pushState(condition); + }, + + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + pushState: function lexer_pushState(condition) { + this.conditionStack.push(condition); + this.__currentRuleSet__ = null; + return this; + }, + + // pop the previously active lexer condition state off the condition stack + popState: function lexer_popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + this.__currentRuleSet__ = null; + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function lexer_topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return 'INITIAL'; + } + }, + + // (internal) determine the lexer rule set which is active for the currently active lexer condition state + _currentRules: function lexer__currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions['INITIAL'].rules; + } + }, + + // return the number of states currently on the stack + stateStackSize: function lexer_stateStackSize() { + return this.conditionStack.length; + }, +options: {}, +JisonLexerError: JisonLexerError, +performAction: function lexer__performAction(yy, yy_, $avoiding_name_collisions, YY_START) { + +var YYSTATE = YY_START; +switch($avoiding_name_collisions) { +case 0 : +/*! Conditions:: INITIAL */ +/*! Rule:: [ \t\r\n]+ */ + + /* eat up whitespace */ + BeginToken(yy_.yytext); + +break; +case 1 : +/*! Conditions:: INITIAL */ +/*! Rule:: {DIGIT}+ */ + + BeginToken(yy_.yytext); + yylval.value = atof(yy_.yytext); + return VALUE; + +break; +case 2 : +/*! Conditions:: INITIAL */ +/*! Rule:: {DIGIT}+\.{DIGIT}* */ + + BeginToken(yy_.yytext); + yylval.value = atof(yy_.yytext); + return VALUE; + +break; +case 3 : +/*! Conditions:: INITIAL */ +/*! Rule:: {DIGIT}+[eE]["+""-"]?{DIGIT}* */ + + BeginToken(yy_.yytext); + yylval.value = atof(yy_.yytext); + return VALUE; + +break; +case 4 : +/*! Conditions:: INITIAL */ +/*! Rule:: {DIGIT}+\.{DIGIT}*[eE]["+""-"]?{DIGIT}* */ + + BeginToken(yy_.yytext); + yylval.value = atof(yy_.yytext); + return VALUE; + +break; +case 5 : +/*! Conditions:: INITIAL */ +/*! Rule:: {ID} */ + + BeginToken(yy_.yytext); + yylval.string = malloc(strlen(yy_.yytext)+1); + strcpy(yylval.string, yy_.yytext); + return IDENTIFIER; + +break; +case 6 : +/*! Conditions:: INITIAL */ +/*! Rule:: \+ */ + BeginToken(yy_.yytext); return ADD; +break; +case 7 : +/*! Conditions:: INITIAL */ +/*! Rule:: - */ + BeginToken(yy_.yytext); return SUB; +break; +case 8 : +/*! Conditions:: INITIAL */ +/*! Rule:: \* */ + BeginToken(yy_.yytext); return MULT; +break; +case 9 : +/*! Conditions:: INITIAL */ +/*! Rule:: \/ */ + BeginToken(yy_.yytext); return DIV; +break; +case 10 : +/*! Conditions:: INITIAL */ +/*! Rule:: \( */ + BeginToken(yy_.yytext); return LBRACE; +break; +case 11 : +/*! Conditions:: INITIAL */ +/*! Rule:: \) */ + BeginToken(yy_.yytext); return RBRACE; +break; +case 12 : +/*! Conditions:: INITIAL */ +/*! Rule:: ; */ + BeginToken(yy_.yytext); return SEMICOLON; +break; +case 13 : +/*! Conditions:: INITIAL */ +/*! Rule:: = */ + BeginToken(yy_.yytext); return ASSIGN; +break; +case 14 : +/*! Conditions:: INITIAL */ +/*! Rule:: . */ + + BeginToken(yy_.yytext); + return yy_.yytext[0]; + +break; +default: + return this.simpleCaseActionClusters[$avoiding_name_collisions]; +} +}, +simpleCaseActionClusters: { + +}, +rules: [ +/^(?:[ \t\r\n]+)/, +/^(?:([0-9])+)/, +/^(?:([0-9])+\.([0-9])*)/, +/^(?:([0-9])+[Ee]["+]?([0-9])*)/, +/^(?:([0-9])+\.([0-9])*[Ee]["+]?([0-9])*)/, +/^(?:([A-Z_a-z][0-9A-Z_a-z]*))/, +/^(?:\+)/, +/^(?:-)/, +/^(?:\*)/, +/^(?:\/)/, +/^(?:\()/, +/^(?:\))/, +/^(?:;)/, +/^(?:=)/, +/^(?:.)/ +], +conditions: { + "INITIAL": { + rules: [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14 + ], + inclusive: true + } +} +}; + +/*-------------------------------------------------------------------- + * lex.l + *------------------------------------------------------------------*/; +return lexer; +})(); +parser.lexer = lexer; + +function Parser() { + this.yy = {}; +} +Parser.prototype = parser; +parser.Parser = Parser; + +return new Parser(); +})(); + + + + +if (typeof require !== 'undefined' && typeof exports !== 'undefined') { + exports.parser = ccalcParse; + exports.Parser = ccalcParse.Parser; + exports.parse = function () { + return ccalcParse.parse.apply(ccalcParse, arguments); + }; + +} diff --git a/test/test_blob.rb b/test/test_blob.rb index 4294594141..b441fe412e 100644 --- a/test/test_blob.rb +++ b/test/test_blob.rb @@ -187,6 +187,9 @@ def test_generated assert sample_blob_memory("JavaScript/intro.js").generated? assert sample_blob_memory("JavaScript/classes.js").generated? + assert sample_blob_memory("JavaScript/ccalc-lex.js").generated? + assert sample_blob_memory("JavaScript/ccalc-parse.js").generated? + # Protocol Buffer generated code assert sample_blob_memory("C++/protocol-buffer.pb.h").generated? assert sample_blob_memory("C++/protocol-buffer.pb.cc").generated? From f473c555ac51011c4b679d52f9b3e72e3bc9f38d Mon Sep 17 00:00:00 2001 From: Mate Lorincz Date: Tue, 3 Jan 2017 23:10:49 +0100 Subject: [PATCH 0209/1214] Update vendor.yml (#3382) Exclude Realm and RealmSwift frameworks from language statistics. --- lib/linguist/vendor.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/linguist/vendor.yml b/lib/linguist/vendor.yml index 16515c983b..5ebcd78321 100644 --- a/lib/linguist/vendor.yml +++ b/lib/linguist/vendor.yml @@ -238,6 +238,12 @@ # BuddyBuild - BuddyBuildSDK.framework/ +# Realm +- Realm.framework + +# RealmSwift +- RealmSwift.framework + # git config files - gitattributes$ - gitignore$ From 210cd19876b2e09951f500bba2e8d83e9d79b0a2 Mon Sep 17 00:00:00 2001 From: Al Thomas Date: Tue, 3 Jan 2017 22:15:17 +0000 Subject: [PATCH 0210/1214] Add Genie programming language (#3396) * Add Genie programming language Genie was introduced in 2008 as part of the GNOME project: https://wiki.gnome.org/Projects/Genie It is a programming language that uses the Vala compiler to produce native binaries. It has good bindings to C libraries especially those that are part of the GObject world such as Gtk+3 and GStreamer * Change color for Genie so tests pass --- lib/linguist/languages.yml | 8 ++++++++ samples/Genie/Class.gs | 12 ++++++++++++ samples/Genie/Hello.gs | 2 ++ 3 files changed, 22 insertions(+) create mode 100644 samples/Genie/Class.gs create mode 100644 samples/Genie/Hello.gs diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 0f2481d7c2..cb69ea8d42 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1385,6 +1385,14 @@ Game Maker Language: codemirror_mode: clike codemirror_mime_type: text/x-c++src language_id: 125 +Genie: + type: programming + ace_mode: text + extensions: + - ".gs" + color: "#fb855d" + tm_scope: none + language_id: 792408528 Genshi: type: programming extensions: diff --git a/samples/Genie/Class.gs b/samples/Genie/Class.gs new file mode 100644 index 0000000000..61eb1b7e9e --- /dev/null +++ b/samples/Genie/Class.gs @@ -0,0 +1,12 @@ +init + new Demo( "Demonstration class" ).run() + +class Demo + _message:string = "" + + construct ( message:string = "Optional argument - no message passed in constructor" ) + _message = message + + def run() + print( _message ) + diff --git a/samples/Genie/Hello.gs b/samples/Genie/Hello.gs new file mode 100644 index 0000000000..72fa120865 --- /dev/null +++ b/samples/Genie/Hello.gs @@ -0,0 +1,2 @@ +init + print( "Hello, World!" ) From e9ac71590f215c9a661be36d639cb9fd90fba1d8 Mon Sep 17 00:00:00 2001 From: Vadim Markovtsev Date: Wed, 15 Jun 2016 18:47:39 +0200 Subject: [PATCH 0211/1214] Add --json option to bin/linguist --- bin/linguist | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/bin/linguist b/bin/linguist index d1d9c306ec..ee1b2124bd 100755 --- a/bin/linguist +++ b/bin/linguist @@ -5,6 +5,7 @@ # require 'linguist' require 'rugged' +require 'json' path = ARGV[0] || Dir.pwd @@ -16,14 +17,17 @@ end ARGV.shift breakdown = true if ARGV[0] == "--breakdown" +json_breakdown = true if ARGV[0] == "--json" if File.directory?(path) rugged = Rugged::Repository.new(path) repo = Linguist::Repository.new(rugged, rugged.head.target_id) - repo.languages.sort_by { |_, size| size }.reverse.each do |language, size| - percentage = ((size / repo.size.to_f) * 100) - percentage = sprintf '%.2f' % percentage - puts "%-7s %s" % ["#{percentage}%", language] + if !json_breakdown + repo.languages.sort_by { |_, size| size }.reverse.each do |language, size| + percentage = ((size / repo.size.to_f) * 100) + percentage = sprintf '%.2f' % percentage + puts "%-7s %s" % ["#{percentage}%", language] + end end if breakdown puts @@ -35,6 +39,8 @@ if File.directory?(path) end puts end + elsif json_breakdown + puts JSON.dump(repo.breakdown_by_file) end elsif File.file?(path) blob = Linguist::FileBlob.new(path, Dir.pwd) From f951ec07deaff72d07318bce512e0d63ecd393e2 Mon Sep 17 00:00:00 2001 From: Brandon Black Date: Tue, 3 Jan 2017 15:52:22 -0800 Subject: [PATCH 0212/1214] bin help cleanup --- bin/git-linguist | 12 ++++++++++-- bin/linguist | 21 ++++++++++++++++----- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/bin/git-linguist b/bin/git-linguist index d390530e84..510354f4d4 100755 --- a/bin/git-linguist +++ b/bin/git-linguist @@ -1,5 +1,7 @@ #!/usr/bin/env ruby +$LOAD_PATH[0, 0] = File.join(File.dirname(__FILE__), '..', 'lib') + require 'linguist' require 'rugged' require 'optparse' @@ -102,10 +104,16 @@ def git_linguist(args) commit = nil parser = OptionParser.new do |opts| - opts.banner = "Usage: git-linguist [OPTIONS] stats|breakdown|dump-cache|clear|disable" + opts.banner = <<-HELP + Linguist v#{Linguist::VERSION} + Detect language type and determine language breakdown for a given Git repository. + + Usage: + git-linguist [OPTIONS] stats|breakdown|dump-cache|clear|disable" + HELP opts.on("-f", "--force", "Force a full rescan") { incremental = false } - opts.on("--commit=COMMIT", "Commit to index") { |v| commit = v} + opts.on("-c", "--commit=COMMIT", "Commit to index") { |v| commit = v} end parser.parse!(args) diff --git a/bin/linguist b/bin/linguist index ee1b2124bd..d20c9d6f66 100755 --- a/bin/linguist +++ b/bin/linguist @@ -1,18 +1,22 @@ #!/usr/bin/env ruby -# linguist — detect language type for a file, or, given a directory, determine language breakdown -# usage: linguist [<--breakdown>] -# +$LOAD_PATH[0, 0] = File.join(File.dirname(__FILE__), '..', 'lib') + require 'linguist' require 'rugged' require 'json' +require 'optparse' path = ARGV[0] || Dir.pwd -# special case if not given a directory but still given the --breakdown option +# special case if not given a directory +# but still given the --breakdown or --json options/ if path == "--breakdown" path = Dir.pwd breakdown = true +elsif path == "--json" + path = Dir.pwd + json_breakdown = true end ARGV.shift @@ -69,5 +73,12 @@ elsif File.file?(path) puts " appears to be a vendored file" end else - abort "usage: linguist " + abort <<-HELP + Linguist v#{Linguist::VERSION} + Detect language type for a file, or, given a directory, determine language breakdown. + + Usage: linguist + linguist [--breakdown] [--json] + linguist [--breakdown] [--json] + HELP end From f98ab593fbe34ec81a46dd9193758f6dbc5d3d71 Mon Sep 17 00:00:00 2001 From: Zach Brock Date: Fri, 17 Jun 2016 11:52:24 -0700 Subject: [PATCH 0213/1214] Detect Javascript files generated by Protocol Buffers. --- lib/linguist/generated.rb | 18 +++++++++++++++--- samples/JavaScript/proto.js | 31 +++++++++++++++++++++++++++++++ test/test_blob.rb | 1 + 3 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 samples/JavaScript/proto.js diff --git a/lib/linguist/generated.rb b/lib/linguist/generated.rb index d53f501b78..edd3b37a98 100644 --- a/lib/linguist/generated.rb +++ b/lib/linguist/generated.rb @@ -70,6 +70,7 @@ def generated? compiled_cython_file? || generated_go? || generated_protocol_buffer? || + generated_javascript_protocol_buffer? || generated_apache_thrift? || generated_jni_header? || vcr_cassette? || @@ -277,6 +278,17 @@ def generated_protocol_buffer? return lines[0].include?("Generated by the protocol buffer compiler. DO NOT EDIT!") end + # Internal: Is the blob a Javascript source file generated by the + # Protocol Buffer compiler? + # + # Returns true of false. + def generated_javascript_protocol_buffer? + return false unless extname == ".js" + return false unless lines.count > 6 + + return lines[5].include?("GENERATED CODE -- DO NOT EDIT!") + end + APACHE_THRIFT_EXTENSIONS = ['.rb', '.py', '.go', '.js', '.m', '.java', '.h', '.cc', '.cpp', '.php'] # Internal: Is the blob generated by Apache Thrift compiler? @@ -435,7 +447,7 @@ def generated_grammarkit? return false unless lines.count > 1 return lines[0].start_with?("// This is a generated file. Not intended for manual editing.") end - + # Internal: Is this a roxygen2-generated file? # # A roxygen2-generated file typically contain: @@ -449,7 +461,7 @@ def generated_roxygen2? return lines[0].include?("% Generated by roxygen2: do not edit by hand") end - + # Internal: Is this a Jison-generated file? # # Jison-generated parsers typically contain: @@ -465,7 +477,7 @@ def generated_jison? return false unless extname == '.js' return false unless lines.count > 1 return lines[0].start_with?("/* parser generated by jison ") || - lines[0].start_with?("/* generated by jison-lex ") + lines[0].start_with?("/* generated by jison-lex ") end end end diff --git a/samples/JavaScript/proto.js b/samples/JavaScript/proto.js new file mode 100644 index 0000000000..ff7c0669a9 --- /dev/null +++ b/samples/JavaScript/proto.js @@ -0,0 +1,31 @@ +/** + * @fileoverview + * @enhanceable + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +goog.provide('proto.google.protobuf.Timestamp'); + +goog.require('jspb.Message'); + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.Timestamp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.Timestamp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.google.protobuf.Timestamp.displayName = 'proto.google.protobuf.Timestamp'; +} + + +// Remainder elided \ No newline at end of file diff --git a/test/test_blob.rb b/test/test_blob.rb index b441fe412e..1f6409168b 100644 --- a/test/test_blob.rb +++ b/test/test_blob.rb @@ -197,6 +197,7 @@ def test_generated assert sample_blob_memory("Python/protocol_buffer_pb2.py").generated? assert sample_blob_memory("Go/api.pb.go").generated? assert sample_blob_memory("Go/embedded.go").generated? + assert sample_blob_memory("JavaScript/proto.js").generated? # Apache Thrift generated code assert sample_blob_memory("Python/gen-py-linguist-thrift.py").generated? From 2b08c66f0b056b33b9d8de0b6b35c39fd1b5de96 Mon Sep 17 00:00:00 2001 From: Christopher Gilbert Date: Tue, 23 Aug 2016 18:13:00 +0100 Subject: [PATCH 0214/1214] Added grammar for Solidity programming language --- .gitmodules | 3 +++ grammars.yml | 4 +++- vendor/grammars/SublimeEthereum | 1 + vendor/licenses/grammar/language-solidity.txt | 19 +++++++++++++++++++ 4 files changed, 26 insertions(+), 1 deletion(-) create mode 160000 vendor/grammars/SublimeEthereum create mode 100644 vendor/licenses/grammar/language-solidity.txt diff --git a/.gitmodules b/.gitmodules index dd1d932247..190b2bcee0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -812,3 +812,6 @@ [submodule "vendor/grammars/language-xcompose"] path = vendor/grammars/language-xcompose url = https://github.com/samcv/language-xcompose +[submodule "vendor/grammars/SublimeEthereum"] + path = vendor/grammars/SublimeEthereum + url = https://github.com/davidhq/SublimeEthereum.git diff --git a/grammars.yml b/grammars.yml index ac1c772488..c2244c8a44 100755 --- a/grammars.yml +++ b/grammars.yml @@ -113,7 +113,9 @@ vendor/grammars/SublimeBrainfuck: - source.bf vendor/grammars/SublimeClarion: - source.clarion -vendor/grammars/SublimeGDB: +vendor/grammars/SublimeEthereum: +- source.solidity +vendor/grammars/SublimeGDB/: - source.disasm - source.gdb - source.gdb.session diff --git a/vendor/grammars/SublimeEthereum b/vendor/grammars/SublimeEthereum new file mode 160000 index 0000000000..51dec7b1e4 --- /dev/null +++ b/vendor/grammars/SublimeEthereum @@ -0,0 +1 @@ +Subproject commit 51dec7b1e4f9381dfdcce54976473b27ee11b4d8 diff --git a/vendor/licenses/grammar/language-solidity.txt b/vendor/licenses/grammar/language-solidity.txt new file mode 100644 index 0000000000..7443b261ab --- /dev/null +++ b/vendor/licenses/grammar/language-solidity.txt @@ -0,0 +1,19 @@ +Copyright (c) 2015+ uniqpath + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE.. From 42af436c20ad3fe06b00dd1464254c34e4085c10 Mon Sep 17 00:00:00 2001 From: Christopher Gilbert Date: Tue, 23 Aug 2016 18:13:00 +0100 Subject: [PATCH 0215/1214] Added grammar for Solidity programming language --- vendor/licenses/grammar/SublimeEthereum.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 vendor/licenses/grammar/SublimeEthereum.txt diff --git a/vendor/licenses/grammar/SublimeEthereum.txt b/vendor/licenses/grammar/SublimeEthereum.txt new file mode 100644 index 0000000000..7443b261ab --- /dev/null +++ b/vendor/licenses/grammar/SublimeEthereum.txt @@ -0,0 +1,19 @@ +Copyright (c) 2015+ uniqpath + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE.. From 15b04f86c3e9346437391beddf5467b0bfef616c Mon Sep 17 00:00:00 2001 From: Christopher Gilbert Date: Tue, 23 Aug 2016 21:19:41 +0100 Subject: [PATCH 0216/1214] Amended license file for SublimeEthereum language grammar --- vendor/licenses/grammar/SublimeEthereum.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vendor/licenses/grammar/SublimeEthereum.txt b/vendor/licenses/grammar/SublimeEthereum.txt index 7443b261ab..da684d5517 100644 --- a/vendor/licenses/grammar/SublimeEthereum.txt +++ b/vendor/licenses/grammar/SublimeEthereum.txt @@ -1,3 +1,8 @@ +--- +type: grammar +name: SublimeEthereum +license: mit +--- Copyright (c) 2015+ uniqpath Permission is hereby granted, free of charge, to any person obtaining a copy From 3e224e0039ed452e37acaac47e617ee10b00992f Mon Sep 17 00:00:00 2001 From: Brandon Black Date: Tue, 3 Jan 2017 16:33:46 -0800 Subject: [PATCH 0217/1214] updating grammars --- grammars.yml | 1 - test/test_grammars.rb | 6 +++--- vendor/CodeMirror | 2 +- vendor/grammars/MagicPython | 2 +- vendor/grammars/SublimePapyrus | 2 +- vendor/grammars/atom-language-1c-bsl | 2 +- vendor/grammars/atom-language-perl6 | 2 +- vendor/grammars/language-clojure | 2 +- vendor/grammars/language-coffee-script | 2 +- vendor/grammars/language-csharp | 2 +- vendor/grammars/language-csound | 2 +- vendor/grammars/language-gfm | 2 +- vendor/grammars/language-gn | 2 +- vendor/grammars/language-graphql | 2 +- vendor/grammars/language-haskell | 2 +- vendor/grammars/language-javascript | 2 +- vendor/grammars/language-less | 2 +- vendor/grammars/language-python | 2 +- vendor/grammars/language-shellscript | 2 +- vendor/grammars/language-viml | 2 +- vendor/grammars/language-yaml | 2 +- vendor/grammars/reason | 2 +- vendor/grammars/sublime-mask | 2 +- vendor/grammars/sublime-rust | 2 +- vendor/grammars/sublime-typescript | 2 +- vendor/grammars/vue-syntax-highlight | 2 +- 26 files changed, 27 insertions(+), 28 deletions(-) diff --git a/grammars.yml b/grammars.yml index c2244c8a44..da58965c3a 100755 --- a/grammars.yml +++ b/grammars.yml @@ -546,7 +546,6 @@ vendor/grammars/rascal-syntax-highlighting: - source.rascal vendor/grammars/reason: - source.reason -- source.reason.hover.type vendor/grammars/ruby-slim.tmbundle: - text.slim vendor/grammars/ruby.tmbundle: diff --git a/test/test_grammars.rb b/test/test_grammars.rb index 7344be30e8..90b8f53e75 100644 --- a/test/test_grammars.rb +++ b/test/test_grammars.rb @@ -21,7 +21,7 @@ class TestGrammars < Minitest::Test "b5432a1e1055de7eeede2dddf91e009480651fd6", # jasmin-sublime "74143c4d2a5649eb179105afcb37f466558c22ce", # language-clojure "760471435f5ab0b9dc99a628203cd8f9156d28ce", # language-coffee-script - "330e6d465e26bdd232aafcd3f5dba6a1d098a20e", # language-csharp + "94fbd554ec1837fb7c508fd7425326639c3f4103", # language-csharp "70fb557a431891c2d634c33fa7367feab5066fd6", # language-javascript "e0528c23cd967f999e058f1408ccb5b7237daaba", # language-python "8653305b358375d0fced85dc24793b99919b11ef", # language-shellscript @@ -36,11 +36,11 @@ class TestGrammars < Minitest::Test "c78ec142ac3126cf639cfd67bd646ed8226d8b74", # atom-language-purescript "341d7f66806fc41d081133d6e51ade856352e056", # FreeMarker.tmbundle "15a394f6bc43400946570b299aee8ae264a1e3ff", # language-renpy - "c9118c370411f2f049c746c0fd096554e877aea2", # perl6fe "8ccf886749c32fb7e65d4d1316a7ed0479c93dc9", # language-less "2f03492b52d7dd83b4e7472f01b87c6121e5b1a4", # monkey "241e5ddbb4423d792216783e9f668bd670b026e4", # ant.tmbundle - "bdab9fdc21e6790b479ccb5945b78bc0f6ce2493" # language-blade + "bdab9fdc21e6790b479ccb5945b78bc0f6ce2493", # language-blade + "81711c69aa40135de7266c88b2f6ab28dbc1d81e" # atom-language-perl6 ].freeze # List of allowed SPDX license names diff --git a/vendor/CodeMirror b/vendor/CodeMirror index 900659feeb..d4e2e7ac0b 160000 --- a/vendor/CodeMirror +++ b/vendor/CodeMirror @@ -1 +1 @@ -Subproject commit 900659feeb6d4ce95abb68c7d68767c1bb586111 +Subproject commit d4e2e7ac0b745b04a82cd2f2847c44951b98822a diff --git a/vendor/grammars/MagicPython b/vendor/grammars/MagicPython index a605599caf..b7d7f9d007 160000 --- a/vendor/grammars/MagicPython +++ b/vendor/grammars/MagicPython @@ -1 +1 @@ -Subproject commit a605599caf04f031ba3ca08af307d927b1295635 +Subproject commit b7d7f9d00765e1aaa6a1c9c6f28846245ee2f9ae diff --git a/vendor/grammars/SublimePapyrus b/vendor/grammars/SublimePapyrus index aaef57c245..374ebd6444 160000 --- a/vendor/grammars/SublimePapyrus +++ b/vendor/grammars/SublimePapyrus @@ -1 +1 @@ -Subproject commit aaef57c245ee648b4f638fcb07f5d9c40191713f +Subproject commit 374ebd64448d4078fc384ea1600b747dcccebf70 diff --git a/vendor/grammars/atom-language-1c-bsl b/vendor/grammars/atom-language-1c-bsl index 12edd3a54c..0203c765f9 160000 --- a/vendor/grammars/atom-language-1c-bsl +++ b/vendor/grammars/atom-language-1c-bsl @@ -1 +1 @@ -Subproject commit 12edd3a54c9132b190d2c817d3d8ec1846b2a65b +Subproject commit 0203c765f9fc0beda6d3ff78a5d5eaf82fc4fa8d diff --git a/vendor/grammars/atom-language-perl6 b/vendor/grammars/atom-language-perl6 index 12c6094831..909982d0f6 160000 --- a/vendor/grammars/atom-language-perl6 +++ b/vendor/grammars/atom-language-perl6 @@ -1 +1 @@ -Subproject commit 12c60948317ea32558b5e334bf46f50d99166867 +Subproject commit 909982d0f635865a5f2f927c42340c090b0a1268 diff --git a/vendor/grammars/language-clojure b/vendor/grammars/language-clojure index 105fd2a3a4..5747bb28c2 160000 --- a/vendor/grammars/language-clojure +++ b/vendor/grammars/language-clojure @@ -1 +1 @@ -Subproject commit 105fd2a3a4e0119665578e8a677b8ec61c9dfc70 +Subproject commit 5747bb28c2d12a246180824d8f851f2aec719d32 diff --git a/vendor/grammars/language-coffee-script b/vendor/grammars/language-coffee-script index f480a6b985..dade09261c 160000 --- a/vendor/grammars/language-coffee-script +++ b/vendor/grammars/language-coffee-script @@ -1 +1 @@ -Subproject commit f480a6b98584ead689a6a1a0143c5ec6d05e7122 +Subproject commit dade09261c20c35a2f6c8880658bc1bf58a2b42b diff --git a/vendor/grammars/language-csharp b/vendor/grammars/language-csharp index 8ae27bcae8..71b8930b31 160000 --- a/vendor/grammars/language-csharp +++ b/vendor/grammars/language-csharp @@ -1 +1 @@ -Subproject commit 8ae27bcae845933c438678c0825fc4bbfca7ea7e +Subproject commit 71b8930b315b0793c4fb63314161dee5d2962dde diff --git a/vendor/grammars/language-csound b/vendor/grammars/language-csound index 2f112c9f60..4a738e9c84 160000 --- a/vendor/grammars/language-csound +++ b/vendor/grammars/language-csound @@ -1 +1 @@ -Subproject commit 2f112c9f60f03b1f2fc24454c127891b46eac5b3 +Subproject commit 4a738e9c84d1184e71736acc33cafe2639736e8a diff --git a/vendor/grammars/language-gfm b/vendor/grammars/language-gfm index 17b24ee54e..727bcc84ac 160000 --- a/vendor/grammars/language-gfm +++ b/vendor/grammars/language-gfm @@ -1 +1 @@ -Subproject commit 17b24ee54e4a7818c2d656541acc26ece305ef95 +Subproject commit 727bcc84ac077d9f5e633a7d31807e5116a2a65b diff --git a/vendor/grammars/language-gn b/vendor/grammars/language-gn index e1a3008505..4540d7a9c4 160000 --- a/vendor/grammars/language-gn +++ b/vendor/grammars/language-gn @@ -1 +1 @@ -Subproject commit e1a30085056cb66a201f31aa45d52d02c89d98b9 +Subproject commit 4540d7a9c4684224a17e65a4622d412218be1017 diff --git a/vendor/grammars/language-graphql b/vendor/grammars/language-graphql index d3d9dc67b7..42f7f6422e 160000 --- a/vendor/grammars/language-graphql +++ b/vendor/grammars/language-graphql @@ -1 +1 @@ -Subproject commit d3d9dc67b7561e0988320a84c88ce91e889d43b2 +Subproject commit 42f7f6422e79b547ae2a1d27abb99c1c6c949499 diff --git a/vendor/grammars/language-haskell b/vendor/grammars/language-haskell index 78189f5b71..f9a937ad28 160000 --- a/vendor/grammars/language-haskell +++ b/vendor/grammars/language-haskell @@ -1 +1 @@ -Subproject commit 78189f5b7183d2190a15ccc7872811ceb0932918 +Subproject commit f9a937ad28411485e763f90e0d89e1cd3cc73c76 diff --git a/vendor/grammars/language-javascript b/vendor/grammars/language-javascript index ea15b19139..31ec605571 160000 --- a/vendor/grammars/language-javascript +++ b/vendor/grammars/language-javascript @@ -1 +1 @@ -Subproject commit ea15b19139b531f4cf55e8e3ad63949d20bce200 +Subproject commit 31ec605571246ec78825fae937b5b51559e79452 diff --git a/vendor/grammars/language-less b/vendor/grammars/language-less index c671f35467..ce6a54dd17 160000 --- a/vendor/grammars/language-less +++ b/vendor/grammars/language-less @@ -1 +1 @@ -Subproject commit c671f35467ac1fb2dbc4f3e5c9c20d982a9bf5bf +Subproject commit ce6a54dd17dc936baee09cd0d547968e9af3a853 diff --git a/vendor/grammars/language-python b/vendor/grammars/language-python index 14acf8da68..ceb204c654 160000 --- a/vendor/grammars/language-python +++ b/vendor/grammars/language-python @@ -1 +1 @@ -Subproject commit 14acf8da68517d6b226d1b6e5da4ecc88bff569b +Subproject commit ceb204c65436254c7aeea518645b12916d9cfb4a diff --git a/vendor/grammars/language-shellscript b/vendor/grammars/language-shellscript index 77fd446cc1..3cd0b6bb5e 160000 --- a/vendor/grammars/language-shellscript +++ b/vendor/grammars/language-shellscript @@ -1 +1 @@ -Subproject commit 77fd446cc1122b6a2b358a48913b2b80f6299be7 +Subproject commit 3cd0b6bb5ede1dbff8d4b185f0a3ea5f93292d65 diff --git a/vendor/grammars/language-viml b/vendor/grammars/language-viml index c4bd6d26af..d4a408cdb1 160000 --- a/vendor/grammars/language-viml +++ b/vendor/grammars/language-viml @@ -1 +1 @@ -Subproject commit c4bd6d26afcd539e6499a2076a1c617647187644 +Subproject commit d4a408cdb19e8477fc80c18ed8a6d7be33685859 diff --git a/vendor/grammars/language-yaml b/vendor/grammars/language-yaml index d63dffb62b..6be651ae57 160000 --- a/vendor/grammars/language-yaml +++ b/vendor/grammars/language-yaml @@ -1 +1 @@ -Subproject commit d63dffb62bc5eeb0681e8c886ec639cd80722563 +Subproject commit 6be651ae57004bdba3f12bda86aeca106f8e5ab5 diff --git a/vendor/grammars/reason b/vendor/grammars/reason index 97d91c61d1..203cc01d32 160000 --- a/vendor/grammars/reason +++ b/vendor/grammars/reason @@ -1 +1 @@ -Subproject commit 97d91c61d1947631b89024830bc43dad2931fabe +Subproject commit 203cc01d32326cd8f4b1432007c52d322d8ddc5a diff --git a/vendor/grammars/sublime-mask b/vendor/grammars/sublime-mask index 647cf75a8f..45153117b1 160000 --- a/vendor/grammars/sublime-mask +++ b/vendor/grammars/sublime-mask @@ -1 +1 @@ -Subproject commit 647cf75a8f4041e99a0f24b030babb9d926eb7a1 +Subproject commit 45153117b16f30c18f90ef01f50c633ae2fef8e9 diff --git a/vendor/grammars/sublime-rust b/vendor/grammars/sublime-rust index 3bc8200ec7..2ab00b44ef 160000 --- a/vendor/grammars/sublime-rust +++ b/vendor/grammars/sublime-rust @@ -1 +1 @@ -Subproject commit 3bc8200ec709ce9ceaa9f73117f6c2efa3265a0b +Subproject commit 2ab00b44ef7b486d155274844f9b734050453bc1 diff --git a/vendor/grammars/sublime-typescript b/vendor/grammars/sublime-typescript index ac15373c6c..918289c9a3 160000 --- a/vendor/grammars/sublime-typescript +++ b/vendor/grammars/sublime-typescript @@ -1 +1 @@ -Subproject commit ac15373c6cdb62decb2c296db9916e7a420bb39e +Subproject commit 918289c9a3235ba34e4f5d4e1b6653ff31529593 diff --git a/vendor/grammars/vue-syntax-highlight b/vendor/grammars/vue-syntax-highlight index ef872e4f1c..f88ff50332 160000 --- a/vendor/grammars/vue-syntax-highlight +++ b/vendor/grammars/vue-syntax-highlight @@ -1 +1 @@ -Subproject commit ef872e4f1c54724970dba4d9f7d2dcb3b522a084 +Subproject commit f88ff50332bf5f844c75e894834c60944c34bc75 From a604de98464583821335e2470136c0fd0fd029cb Mon Sep 17 00:00:00 2001 From: Brandon Black Date: Tue, 3 Jan 2017 16:46:02 -0800 Subject: [PATCH 0218/1214] replacing atom grammar due to ST2 compatibility change --- .gitmodules | 6 ++--- grammars.yml | 4 +-- test/test_grammars.rb | 3 ++- vendor/README.md | 19 +++++++------- vendor/grammars/atom-language-rust | 1 + vendor/grammars/sublime-rust | 1 - .../licenses/grammar/atom-language-rust.txt | 26 +++++++++++++++++++ vendor/licenses/grammar/language-hy.txt | 25 ------------------ vendor/licenses/grammar/language-solidity.txt | 19 -------------- vendor/licenses/grammar/ninja.tmbundle.txt | 5 ---- vendor/licenses/grammar/sublime-rust.txt | 22 ---------------- 11 files changed, 44 insertions(+), 87 deletions(-) create mode 160000 vendor/grammars/atom-language-rust delete mode 160000 vendor/grammars/sublime-rust create mode 100644 vendor/licenses/grammar/atom-language-rust.txt delete mode 100644 vendor/licenses/grammar/language-hy.txt delete mode 100644 vendor/licenses/grammar/language-solidity.txt delete mode 100644 vendor/licenses/grammar/ninja.tmbundle.txt delete mode 100644 vendor/licenses/grammar/sublime-rust.txt diff --git a/.gitmodules b/.gitmodules index 190b2bcee0..0db86125af 100644 --- a/.gitmodules +++ b/.gitmodules @@ -130,9 +130,6 @@ [submodule "vendor/grammars/Sublime-Text-2-OpenEdge-ABL"] path = vendor/grammars/Sublime-Text-2-OpenEdge-ABL url = https://github.com/jfairbank/Sublime-Text-2-OpenEdge-ABL -[submodule "vendor/grammars/sublime-rust"] - path = vendor/grammars/sublime-rust - url = https://github.com/jhasse/sublime-rust [submodule "vendor/grammars/sublime-befunge"] path = vendor/grammars/sublime-befunge url = https://github.com/johanasplund/sublime-befunge @@ -815,3 +812,6 @@ [submodule "vendor/grammars/SublimeEthereum"] path = vendor/grammars/SublimeEthereum url = https://github.com/davidhq/SublimeEthereum.git +[submodule "vendor/grammars/atom-language-rust"] + path = vendor/grammars/atom-language-rust + url = https://github.com/zargony/atom-language-rust diff --git a/grammars.yml b/grammars.yml index da58965c3a..bc0c63973b 100755 --- a/grammars.yml +++ b/grammars.yml @@ -187,6 +187,8 @@ vendor/grammars/atom-language-perl6: - source.regexp.perl6fe vendor/grammars/atom-language-purescript: - source.purescript +vendor/grammars/atom-language-rust: +- source.rust vendor/grammars/atom-language-srt: - text.srt vendor/grammars/atom-language-stan: @@ -613,8 +615,6 @@ vendor/grammars/sublime-rexx: - source.rexx vendor/grammars/sublime-robot-plugin: - text.robot -vendor/grammars/sublime-rust: -- source.rust vendor/grammars/sublime-spintools: - source.regexp.spin - source.spin diff --git a/test/test_grammars.rb b/test/test_grammars.rb index 90b8f53e75..b5fb06aa4c 100644 --- a/test/test_grammars.rb +++ b/test/test_grammars.rb @@ -40,7 +40,8 @@ class TestGrammars < Minitest::Test "2f03492b52d7dd83b4e7472f01b87c6121e5b1a4", # monkey "241e5ddbb4423d792216783e9f668bd670b026e4", # ant.tmbundle "bdab9fdc21e6790b479ccb5945b78bc0f6ce2493", # language-blade - "81711c69aa40135de7266c88b2f6ab28dbc1d81e" # atom-language-perl6 + "81711c69aa40135de7266c88b2f6ab28dbc1d81e", # atom-language-perl6 + "808e27f5e44167113198d277f47926c5d482eac8" # atom-language-rust ].freeze # List of allowed SPDX license names diff --git a/vendor/README.md b/vendor/README.md index 80d8c1176c..125480acc7 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -77,7 +77,6 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **Csound Document:** [nwhetsell/language-csound](https://github.com/nwhetsell/language-csound) - **Csound Score:** [nwhetsell/language-csound](https://github.com/nwhetsell/language-csound) - **CSS:** [textmate/css.tmbundle](https://github.com/textmate/css.tmbundle) -- **Cucumber:** [cucumber/cucumber-tmbundle](https://github.com/cucumber/cucumber-tmbundle) - **Cuda:** [harrism/sublimetext-cuda-cpp](https://github.com/harrism/sublimetext-cuda-cpp) - **Cycript:** [atom/language-javascript](https://github.com/atom/language-javascript) - **Cython:** [textmate/cython.tmbundle](https://github.com/textmate/cython.tmbundle) @@ -109,13 +108,12 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **Fancy:** [fancy-lang/fancy-tmbundle](https://github.com/fancy-lang/fancy-tmbundle) - **fish:** [l15n/fish-tmbundle](https://github.com/l15n/fish-tmbundle) - **Forth:** [textmate/forth.tmbundle](https://github.com/textmate/forth.tmbundle) -- **FORTRAN:** [textmate/fortran.tmbundle](https://github.com/textmate/fortran.tmbundle) +- **Fortran:** [textmate/fortran.tmbundle](https://github.com/textmate/fortran.tmbundle) - **FreeMarker:** [freemarker/FreeMarker.tmbundle](https://github.com/freemarker/FreeMarker.tmbundle) - **Frege:** [atom-haskell/language-haskell](https://github.com/atom-haskell/language-haskell) - **G-code:** [robotmaster/sublime-text-syntax-highlighting](https://github.com/robotmaster/sublime-text-syntax-highlighting) - **Game Maker Language:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) - **GAP:** [dhowden/gap-tmbundle](https://github.com/dhowden/gap-tmbundle) -- **GAS:** [Nessphoro/sublimeassembly](https://github.com/Nessphoro/sublimeassembly) - **GCC Machine Description:** [textmate/lisp.tmbundle](https://github.com/textmate/lisp.tmbundle) - **GDB:** [quarnster/SublimeGDB](https://github.com/quarnster/SublimeGDB) - **GDScript:** [beefsack/GDScript-sublime](https://github.com/beefsack/GDScript-sublime) @@ -123,6 +121,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **Gentoo Ebuild:** [atom/language-shellscript](https://github.com/atom/language-shellscript) - **Gentoo Eclass:** [atom/language-shellscript](https://github.com/atom/language-shellscript) - **Gettext Catalog:** [textmate/gettext.tmbundle](https://github.com/textmate/gettext.tmbundle) +- **Gherkin:** [cucumber/cucumber-tmbundle](https://github.com/cucumber/cucumber-tmbundle) - **GLSL:** [euler0/sublime-glsl](https://github.com/euler0/sublime-glsl) - **Glyph:** [textmate/tcl.tmbundle](https://github.com/textmate/tcl.tmbundle) - **GN:** [devoncarew/language-gn](https://github.com/devoncarew/language-gn) @@ -135,7 +134,6 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **Grammatical Framework:** [atom-haskell/language-haskell](https://github.com/atom-haskell/language-haskell) - **GraphQL:** [rmosolgo/language-graphql](https://github.com/rmosolgo/language-graphql) - **Graphviz (DOT):** [textmate/graphviz.tmbundle](https://github.com/textmate/graphviz.tmbundle) -- **Groff:** [Alhadis/language-roff](https://github.com/Alhadis/language-roff) - **Groovy:** [textmate/groovy.tmbundle](https://github.com/textmate/groovy.tmbundle) - **Groovy Server Pages:** [textmate/java.tmbundle](https://github.com/textmate/java.tmbundle) - **Hack:** [textmate/php.tmbundle](https://github.com/textmate/php.tmbundle) @@ -152,7 +150,6 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **HTML+ERB:** [aroben/ruby.tmbundle](https://github.com/aroben/ruby.tmbundle) - **HTML+PHP:** [textmate/php.tmbundle](https://github.com/textmate/php.tmbundle) - **HTTP:** [httpspec/sublime-highlighting](https://github.com/httpspec/sublime-highlighting) -- **Hy:** [rwtolbert/language-hy](https://github.com/rwtolbert/language-hy) - **IDL:** [mgalloy/idl.tmbundle](https://github.com/mgalloy/idl.tmbundle) - **Idris:** [idris-hackers/idris-sublime](https://github.com/idris-hackers/idris-sublime) - **Inform 7:** [erkyrath/language-inform7](https://github.com/erkyrath/language-inform7) @@ -162,7 +159,6 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **Isabelle:** [lsf37/Isabelle.tmbundle](https://github.com/lsf37/Isabelle.tmbundle) - **Isabelle ROOT:** [lsf37/Isabelle.tmbundle](https://github.com/lsf37/Isabelle.tmbundle) - **J:** [bcj/JSyntax](https://github.com/bcj/JSyntax) -- **Jade:** [davidrios/jade-tmbundle](https://github.com/davidrios/jade-tmbundle) - **Jasmin:** [atmarksharp/jasmin-sublime](https://github.com/atmarksharp/jasmin-sublime) - **Java:** [textmate/java.tmbundle](https://github.com/textmate/java.tmbundle) - **Java Server Pages:** [textmate/java.tmbundle](https://github.com/textmate/java.tmbundle) @@ -224,7 +220,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **NetLogo:** [textmate/lisp.tmbundle](https://github.com/textmate/lisp.tmbundle) - **NewLisp:** [textmate/lisp.tmbundle](https://github.com/textmate/lisp.tmbundle) - **Nginx:** [brandonwamboldt/sublime-nginx](https://github.com/brandonwamboldt/sublime-nginx) -- **Nimrod:** [Varriount/NimLime](https://github.com/Varriount/NimLime) +- **Nim:** [Varriount/NimLime](https://github.com/Varriount/NimLime) - **Ninja:** [khyo/language-ninja](https://github.com/khyo/language-ninja) - **Nit:** [R4PaSs/Sublime-Nit](https://github.com/R4PaSs/Sublime-Nit) - **Nix:** [wmertens/sublime-nix](https://github.com/wmertens/sublime-nix) @@ -265,6 +261,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **Prolog:** [alnkpa/sublimeprolog](https://github.com/alnkpa/sublimeprolog) - **Propeller Spin:** [bitbased/sublime-spintools](https://github.com/bitbased/sublime-spintools) - **Protocol Buffer:** [michaeledgar/protobuf-tmbundle](https://github.com/michaeledgar/protobuf-tmbundle) +- **Pug:** [davidrios/jade-tmbundle](https://github.com/davidrios/jade-tmbundle) - **Puppet:** [russCloak/SublimePuppet](https://github.com/russCloak/SublimePuppet) - **PureScript:** [purescript-contrib/atom-language-purescript](https://github.com/purescript-contrib/atom-language-purescript) - **Python:** [MagicStack/MagicPython](https://github.com/MagicStack/MagicPython) @@ -275,8 +272,10 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **R:** [textmate/r.tmbundle](https://github.com/textmate/r.tmbundle) - **Racket:** [soegaard/racket-highlight-for-github](https://github.com/soegaard/racket-highlight-for-github) - **RAML:** [atom/language-yaml](https://github.com/atom/language-yaml) +- **Rascal:** [usethesource/rascal-syntax-highlighting](https://github.com/usethesource/rascal-syntax-highlighting) - **RDoc:** [joshaven/RDoc.tmbundle](https://github.com/joshaven/RDoc.tmbundle) - **REALbasic:** [angryant0007/VBDotNetSyntax](https://github.com/angryant0007/VBDotNetSyntax) +- **Reason:** [facebook/reason](https://github.com/facebook/reason) - **Rebol:** [Oldes/Sublime-REBOL](https://github.com/Oldes/Sublime-REBOL) - **Red:** [Oldes/Sublime-Red](https://github.com/Oldes/Sublime-Red) - **Ren'Py:** [williamd1k0/language-renpy](https://github.com/williamd1k0/language-renpy) @@ -285,11 +284,12 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **RHTML:** [aroben/ruby.tmbundle](https://github.com/aroben/ruby.tmbundle) - **RMarkdown:** [atom/language-gfm](https://github.com/atom/language-gfm) - **RobotFramework:** [shellderp/sublime-robot-plugin](https://github.com/shellderp/sublime-robot-plugin) +- **Roff:** [Alhadis/language-roff](https://github.com/Alhadis/language-roff) - **Rouge:** [atom/language-clojure](https://github.com/atom/language-clojure) - **RPM Spec:** [waveclaw/language-rpm-spec](https://github.com/waveclaw/language-rpm-spec) - **Ruby:** [aroben/ruby.tmbundle](https://github.com/aroben/ruby.tmbundle) - **RUNOFF:** [Alhadis/language-roff](https://github.com/Alhadis/language-roff) -- **Rust:** [jhasse/sublime-rust](https://github.com/jhasse/sublime-rust) +- **Rust:** [zargony/atom-language-rust](https://github.com/zargony/atom-language-rust) - **Sage:** [MagicStack/MagicPython](https://github.com/MagicStack/MagicPython) - **SaltStack:** [saltstack/atom-salt](https://github.com/saltstack/atom-salt) - **SAS:** [rpardee/sas.tmbundle](https://github.com/rpardee/sas.tmbundle) @@ -341,6 +341,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **TypeScript:** [Microsoft/TypeScript-Sublime-Plugin](https://github.com/Microsoft/TypeScript-Sublime-Plugin) - **Unified Parallel C:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) - **Unity3D Asset:** [atom/language-yaml](https://github.com/atom/language-yaml) +- **Unix Assembly:** [Nessphoro/sublimeassembly](https://github.com/Nessphoro/sublimeassembly) - **Uno:** [atom/language-csharp](https://github.com/atom/language-csharp) - **UnrealScript:** [textmate/java.tmbundle](https://github.com/textmate/java.tmbundle) - **UrWeb:** [gwalborn/UrWeb-Language-Definition](https://github.com/gwalborn/UrWeb-Language-Definition) @@ -348,7 +349,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **VCL:** [brandonwamboldt/sublime-varnish](https://github.com/brandonwamboldt/sublime-varnish) - **Verilog:** [textmate/verilog.tmbundle](https://github.com/textmate/verilog.tmbundle) - **VHDL:** [textmate/vhdl.tmbundle](https://github.com/textmate/vhdl.tmbundle) -- **VimL:** [Alhadis/language-viml](https://github.com/Alhadis/language-viml) +- **Vim script:** [Alhadis/language-viml](https://github.com/Alhadis/language-viml) - **Visual Basic:** [angryant0007/VBDotNetSyntax](https://github.com/angryant0007/VBDotNetSyntax) - **Volt:** [textmate/d.tmbundle](https://github.com/textmate/d.tmbundle) - **Vue:** [vuejs/vue-syntax-highlight](https://github.com/vuejs/vue-syntax-highlight) diff --git a/vendor/grammars/atom-language-rust b/vendor/grammars/atom-language-rust new file mode 160000 index 0000000000..2f514baad7 --- /dev/null +++ b/vendor/grammars/atom-language-rust @@ -0,0 +1 @@ +Subproject commit 2f514baad7eca4a1d587d85ea5aa6fb353281617 diff --git a/vendor/grammars/sublime-rust b/vendor/grammars/sublime-rust deleted file mode 160000 index 2ab00b44ef..0000000000 --- a/vendor/grammars/sublime-rust +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2ab00b44ef7b486d155274844f9b734050453bc1 diff --git a/vendor/licenses/grammar/atom-language-rust.txt b/vendor/licenses/grammar/atom-language-rust.txt new file mode 100644 index 0000000000..2f67cabc56 --- /dev/null +++ b/vendor/licenses/grammar/atom-language-rust.txt @@ -0,0 +1,26 @@ +--- +type: grammar +name: atom-language-rust +license: other +--- +The MIT License (MIT) +===================== + +Copyright © `2013` `Andreas Neuhaus` `http://zargony.com/` + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the “Software”), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/licenses/grammar/language-hy.txt b/vendor/licenses/grammar/language-hy.txt deleted file mode 100644 index 49a8ad8797..0000000000 --- a/vendor/licenses/grammar/language-hy.txt +++ /dev/null @@ -1,25 +0,0 @@ ---- -type: grammar -name: language-hy -license: mit ---- -Copyright (c) 2014 Bob Tolbert (bob@tolbert.org) - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/licenses/grammar/language-solidity.txt b/vendor/licenses/grammar/language-solidity.txt deleted file mode 100644 index 7443b261ab..0000000000 --- a/vendor/licenses/grammar/language-solidity.txt +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015+ uniqpath - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE.. diff --git a/vendor/licenses/grammar/ninja.tmbundle.txt b/vendor/licenses/grammar/ninja.tmbundle.txt deleted file mode 100644 index 238a07eac0..0000000000 --- a/vendor/licenses/grammar/ninja.tmbundle.txt +++ /dev/null @@ -1,5 +0,0 @@ ---- -type: grammar -name: ninja.tmbundle -license: other ---- diff --git a/vendor/licenses/grammar/sublime-rust.txt b/vendor/licenses/grammar/sublime-rust.txt deleted file mode 100644 index 423d7ce3b3..0000000000 --- a/vendor/licenses/grammar/sublime-rust.txt +++ /dev/null @@ -1,22 +0,0 @@ ---- -type: grammar -name: sublime-rust -license: mit ---- -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. From f43633bf10587b5addd90a4fbea2bd97b4997ec1 Mon Sep 17 00:00:00 2001 From: Brandon Black Date: Tue, 3 Jan 2017 17:02:25 -0800 Subject: [PATCH 0219/1214] fixing license for atom-language-rust --- vendor/licenses/grammar/atom-language-rust.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/licenses/grammar/atom-language-rust.txt b/vendor/licenses/grammar/atom-language-rust.txt index 2f67cabc56..f53a8205c0 100644 --- a/vendor/licenses/grammar/atom-language-rust.txt +++ b/vendor/licenses/grammar/atom-language-rust.txt @@ -1,7 +1,7 @@ --- type: grammar name: atom-language-rust -license: other +license: mit --- The MIT License (MIT) ===================== From ae8ffcad227ff9c26338baa391efeb3e5d6fde94 Mon Sep 17 00:00:00 2001 From: Arie Kurniawan Date: Fri, 2 Dec 2016 02:37:00 +0700 Subject: [PATCH 0220/1214] change http to https fix the little flaws found on http protocol that is used, one of the web using the http protocol which is already supporting more secure protocol, which is https --- grammars.yml | 2 +- script/list-grammars | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/grammars.yml b/grammars.yml index bc0c63973b..764387ad2e 100755 --- a/grammars.yml +++ b/grammars.yml @@ -1,5 +1,5 @@ --- -http://svn.edgewall.org/repos/genshi/contrib/textmate/Genshi.tmbundle/Syntaxes/Markup%20Template%20%28XML%29.tmLanguage: +https://svn.edgewall.org/repos/genshi/contrib/textmate/Genshi.tmbundle/Syntaxes/Markup%20Template%20%28XML%29.tmLanguage: - text.xml.genshi https://bitbucket.org/Clams/sublimesystemverilog/get/default.tar.gz: - source.systemverilog diff --git a/script/list-grammars b/script/list-grammars index 09aaa09cbb..b573c7ed46 100755 --- a/script/list-grammars +++ b/script/list-grammars @@ -71,7 +71,7 @@ class GrammarList when "https://bitbucket.org/Clams/sublimesystemverilog/get/default.tar.gz" short_url = "bitbucket:Clams/sublimesystemverilog" long_url = "https://bitbucket.org/Clams/sublimesystemverilog" - when "http://svn.edgewall.org/repos/genshi/contrib/textmate/Genshi.tmbundle/Syntaxes/Markup%20Template%20%28XML%29.tmLanguage" + when "https://svn.edgewall.org/repos/genshi/contrib/textmate/Genshi.tmbundle/Syntaxes/Markup%20Template%20%28XML%29.tmLanguage" short_url = "genshi.edgewall.org/query" long_url = "https://genshi.edgewall.org/query" when "vendor/grammars/oz-tmbundle/Syntaxes/Oz.tmLanguage" From 1415f4b52d2d82d2c127045291381e9275a88fae Mon Sep 17 00:00:00 2001 From: Brandon Black Date: Tue, 3 Jan 2017 17:23:56 -0800 Subject: [PATCH 0221/1214] fixing grammar file pedantry --- grammars.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grammars.yml b/grammars.yml index 764387ad2e..98a9dd421c 100755 --- a/grammars.yml +++ b/grammars.yml @@ -1,9 +1,9 @@ --- -https://svn.edgewall.org/repos/genshi/contrib/textmate/Genshi.tmbundle/Syntaxes/Markup%20Template%20%28XML%29.tmLanguage: -- text.xml.genshi https://bitbucket.org/Clams/sublimesystemverilog/get/default.tar.gz: - source.systemverilog - source.ucfconstraints +https://svn.edgewall.org/repos/genshi/contrib/textmate/Genshi.tmbundle/Syntaxes/Markup%20Template%20%28XML%29.tmLanguage: +- text.xml.genshi vendor/grammars/ABNF.tmbundle: - source.abnf vendor/grammars/Agda.tmbundle: From 27bb41aa4d97b6f809bfe16db95258361154e547 Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Thu, 5 Jan 2017 04:26:20 +0900 Subject: [PATCH 0222/1214] Add Cask file as Emacs Lisp (#3416) * Add Cask file as Emacs Lisp * Replace Cask file (original is zonuexe/composer.el) --- lib/linguist/languages.yml | 1 + samples/Emacs Lisp/filenames/Cask | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 samples/Emacs Lisp/filenames/Cask diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index cb69ea8d42..a0c86f2c40 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1121,6 +1121,7 @@ Emacs Lisp: - ".gnus" - ".spacemacs" - ".viper" + - Cask - Project.ede - _emacs - abbrev_defs diff --git a/samples/Emacs Lisp/filenames/Cask b/samples/Emacs Lisp/filenames/Cask new file mode 100644 index 0000000000..410a2d600e --- /dev/null +++ b/samples/Emacs Lisp/filenames/Cask @@ -0,0 +1,9 @@ +(package "composer" "0.0.7" "Interface to PHP Composer") +(source "melpa" "https://melpa.org/packages/") + +(package-file "composer.el") + +(depends-on "f") +(depends-on "s") +(depends-on "request") +(depends-on "seq") From 34928baee6c3934ecf24261c4e9c05fa92459a5a Mon Sep 17 00:00:00 2001 From: Yuki Izumi Date: Mon, 9 Jan 2017 16:53:14 +1100 Subject: [PATCH 0223/1214] Use https://github.com/textmate/diff.tmbundle/pull/6 (#3420) --- .gitmodules | 2 +- vendor/grammars/diff.tmbundle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 0db86125af..141ad26c2c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -252,7 +252,7 @@ url = https://github.com/textmate/d.tmbundle [submodule "vendor/grammars/diff.tmbundle"] path = vendor/grammars/diff.tmbundle - url = https://github.com/textmate/diff.tmbundle + url = https://github.com/kivikakk/diff.tmbundle [submodule "vendor/grammars/dylan.tmbundle"] path = vendor/grammars/dylan.tmbundle url = https://github.com/textmate/dylan.tmbundle diff --git a/vendor/grammars/diff.tmbundle b/vendor/grammars/diff.tmbundle index 372abaaeb1..0593bb775e 160000 --- a/vendor/grammars/diff.tmbundle +++ b/vendor/grammars/diff.tmbundle @@ -1 +1 @@ -Subproject commit 372abaaeb12620db3f9d5d984c4ee8c3c6224117 +Subproject commit 0593bb775eab1824af97ef2172fd38822abd97d7 From 50c08bf29e6e4de3623d5e7177c5e05ed1200348 Mon Sep 17 00:00:00 2001 From: Brandon Black Date: Sun, 8 Jan 2017 22:29:01 -0800 Subject: [PATCH 0224/1214] updating grammars --- vendor/CodeMirror | 2 +- vendor/grammars/ColdFusion | 2 +- vendor/grammars/atom-language-perl6 | 2 +- vendor/grammars/d.tmbundle | 2 +- vendor/grammars/diff.tmbundle | 2 +- vendor/grammars/language-csound | 2 +- vendor/grammars/language-gn | 2 +- vendor/grammars/reason | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/vendor/CodeMirror b/vendor/CodeMirror index d4e2e7ac0b..0fb17df669 160000 --- a/vendor/CodeMirror +++ b/vendor/CodeMirror @@ -1 +1 @@ -Subproject commit d4e2e7ac0b745b04a82cd2f2847c44951b98822a +Subproject commit 0fb17df6694b0ba63ec0568d84709e9a07e19a9b diff --git a/vendor/grammars/ColdFusion b/vendor/grammars/ColdFusion index c54a4c5f5e..dbe2f76038 160000 --- a/vendor/grammars/ColdFusion +++ b/vendor/grammars/ColdFusion @@ -1 +1 @@ -Subproject commit c54a4c5f5e9b7d5992a28d9d45b9adb023520428 +Subproject commit dbe2f76038fe77fe90b4cc4a0651aa817f14f1a3 diff --git a/vendor/grammars/atom-language-perl6 b/vendor/grammars/atom-language-perl6 index 909982d0f6..6896ff2a72 160000 --- a/vendor/grammars/atom-language-perl6 +++ b/vendor/grammars/atom-language-perl6 @@ -1 +1 @@ -Subproject commit 909982d0f635865a5f2f927c42340c090b0a1268 +Subproject commit 6896ff2a7257a332145d43343ebca6eb32aea5b2 diff --git a/vendor/grammars/d.tmbundle b/vendor/grammars/d.tmbundle index 039c92d9f2..d44b42bdb7 160000 --- a/vendor/grammars/d.tmbundle +++ b/vendor/grammars/d.tmbundle @@ -1 +1 @@ -Subproject commit 039c92d9f2f583f8c51bbeb39094c9e208614001 +Subproject commit d44b42bdb7b807f8b8cd6152e982d2dbafd2bd0b diff --git a/vendor/grammars/diff.tmbundle b/vendor/grammars/diff.tmbundle index 0593bb775e..372abaaeb1 160000 --- a/vendor/grammars/diff.tmbundle +++ b/vendor/grammars/diff.tmbundle @@ -1 +1 @@ -Subproject commit 0593bb775eab1824af97ef2172fd38822abd97d7 +Subproject commit 372abaaeb12620db3f9d5d984c4ee8c3c6224117 diff --git a/vendor/grammars/language-csound b/vendor/grammars/language-csound index 4a738e9c84..8f8668a38e 160000 --- a/vendor/grammars/language-csound +++ b/vendor/grammars/language-csound @@ -1 +1 @@ -Subproject commit 4a738e9c84d1184e71736acc33cafe2639736e8a +Subproject commit 8f8668a38e95daa45d017282c18c064db5ab415d diff --git a/vendor/grammars/language-gn b/vendor/grammars/language-gn index 4540d7a9c4..e77a06e0ab 160000 --- a/vendor/grammars/language-gn +++ b/vendor/grammars/language-gn @@ -1 +1 @@ -Subproject commit 4540d7a9c4684224a17e65a4622d412218be1017 +Subproject commit e77a06e0ab8fedc7681c3c52fd54f66a3eae4097 diff --git a/vendor/grammars/reason b/vendor/grammars/reason index 203cc01d32..77ede65142 160000 --- a/vendor/grammars/reason +++ b/vendor/grammars/reason @@ -1 +1 @@ -Subproject commit 203cc01d32326cd8f4b1432007c52d322d8ddc5a +Subproject commit 77ede651424fa6d238d98a13142a888765537978 From d7814c4899ffb8fdf8b5ad64eb9127a5e9d08f39 Mon Sep 17 00:00:00 2001 From: Brandon Black Date: Sun, 8 Jan 2017 22:59:00 -0800 Subject: [PATCH 0225/1214] fixing incompatibility with latest rugged --- github-linguist.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-linguist.gemspec b/github-linguist.gemspec index 69152aa409..7a1d1ac67e 100644 --- a/github-linguist.gemspec +++ b/github-linguist.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |s| s.add_dependency 'charlock_holmes', '~> 0.7.3' s.add_dependency 'escape_utils', '~> 1.1.0' s.add_dependency 'mime-types', '>= 1.19' - s.add_dependency 'rugged', '>= 0.23.0b' + s.add_dependency 'rugged', '0.25.0b10' s.add_development_dependency 'minitest', '>= 5.0' s.add_development_dependency 'mocha' From 5ce2c254f9956c430f3275b20cad4c40666c17c7 Mon Sep 17 00:00:00 2001 From: Brandon Black Date: Sun, 8 Jan 2017 23:08:16 -0800 Subject: [PATCH 0226/1214] purging vestigial search term references --- lib/linguist/language.rb | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index 6874a511e5..b48c4a1dfd 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -265,7 +265,7 @@ def initialize(attributes = {}) @color = attributes[:color] # Set aliases - @aliases = [default_alias_name] + (attributes[:aliases] || []) + @aliases = [default_alias] + (attributes[:aliases] || []) # Load the TextMate scope name or try to guess one @tm_scope = attributes[:tm_scope] || begin @@ -283,9 +283,6 @@ def initialize(attributes = {}) @codemirror_mime_type = attributes[:codemirror_mime_type] @wrap = attributes[:wrap] || false - # Set legacy search term - @search_term = attributes[:search_term] || default_alias_name - # Set the language_id @language_id = attributes[:language_id] @@ -437,12 +434,13 @@ def escaped_name EscapeUtils.escape_url(name).gsub('+', '%20') end - # Internal: Get default alias name + # Public: Get default alias name # # Returns the alias name String - def default_alias_name + def default_alias name.downcase.gsub(/\s/, '-') end + alias_method :default_alias_name, :default_alias # Public: Get Language group # @@ -557,7 +555,6 @@ def inspect :wrap => options['wrap'], :group_name => options['group'], :searchable => options.fetch('searchable', true), - :search_term => options['search_term'], :language_id => options['language_id'], :extensions => Array(options['extensions']), :interpreters => options['interpreters'].sort, From 3a03594685c56b33af574172e0e2a8730ee9a39f Mon Sep 17 00:00:00 2001 From: Brandon Black Date: Sun, 8 Jan 2017 23:30:56 -0800 Subject: [PATCH 0227/1214] bumping to v5.0.1 (#3421) --- lib/linguist/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/version.rb b/lib/linguist/version.rb index 42e8834350..9959cb1aa7 100644 --- a/lib/linguist/version.rb +++ b/lib/linguist/version.rb @@ -1,3 +1,3 @@ module Linguist - VERSION = "5.0.0" + VERSION = "5.0.1" end From 93dcb61742b83b2cddd6eccfff2f554b222eb729 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 9 Jan 2017 14:54:55 -0500 Subject: [PATCH 0228/1214] Removing references to @arfon (#3423) --- CONTRIBUTING.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e38125eb01..c86b37c983 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,7 +17,7 @@ To add support for a new extension: In addition, if this extension is already listed in [`languages.yml`][languages] then sometimes a few more steps will need to be taken: 0. Make sure that example `.yourextension` files are present in the [samples directory][samples] for each language that uses `.yourextension`. -0. Test the performance of the Bayesian classifier with a relatively large number (1000s) of sample `.yourextension` files. (ping **@arfon** or **@bkeepers** to help with this) to ensure we're not misclassifying files. +0. Test the performance of the Bayesian classifier with a relatively large number (1000s) of sample `.yourextension` files. (ping **@bkeepers** to help with this) to ensure we're not misclassifying files. 0. If the Bayesian classifier does a bad job with the sample `.yourextension` files then a [heuristic](https://github.com/github/linguist/blob/master/lib/linguist/heuristics.rb) may need to be written to help. @@ -36,7 +36,7 @@ To add support for a new language: In addition, if your new language defines an extension that's already listed in [`languages.yml`][languages] (such as `.foo`) then sometimes a few more steps will need to be taken: 0. Make sure that example `.foo` files are present in the [samples directory][samples] for each language that uses `.foo`. -0. Test the performance of the Bayesian classifier with a relatively large number (1000s) of sample `.foo` files. (ping **@arfon** or **@bkeepers** to help with this) to ensure we're not misclassifying files. +0. Test the performance of the Bayesian classifier with a relatively large number (1000s) of sample `.foo` files. (ping **@bkeepers** to help with this) to ensure we're not misclassifying files. 0. If the Bayesian classifier does a bad job with the sample `.foo` files then a [heuristic](https://github.com/github/linguist/blob/master/lib/linguist/heuristics.rb) may need to be written to help. Remember, the goal here is to try and avoid false positives! @@ -80,7 +80,6 @@ Here's our current build status: [![Build Status](https://api.travis-ci.org/gith Linguist is maintained with :heart: by: - **@Alhadis** -- **@arfon** - **@brandonblack** (GitHub staff) - **@larsbrinkhoff** - **@lildude** (GitHub staff) From 5d09fb67ddc644db954870fc9d157e8d78f223a5 Mon Sep 17 00:00:00 2001 From: Yuki Izumi Date: Tue, 10 Jan 2017 11:44:24 +1100 Subject: [PATCH 0229/1214] Allow for split(",") returning nil (#3424) --- lib/linguist/language.rb | 9 ++++++++- test/test_language.rb | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/linguist/language.rb b/lib/linguist/language.rb index b48c4a1dfd..ae7120cdc9 100644 --- a/lib/linguist/language.rb +++ b/lib/linguist/language.rb @@ -215,7 +215,14 @@ def self.find_by_id(language_id) # Returns the Language or nil if none was found. def self.[](name) return nil if name.to_s.empty? - name && (@index[name.downcase] || @index[name.split(',').first.downcase]) + + lang = @index[name.downcase] + return lang if lang + + name = name.split(',').first + return nil if name.to_s.empty? + + @index[name.downcase] end # Public: A List of popular languages diff --git a/test/test_language.rb b/test/test_language.rb index ea6230f9a6..b8ad306c71 100644 --- a/test/test_language.rb +++ b/test/test_language.rb @@ -460,4 +460,8 @@ def test_no_unused_colours assert !language.color, "Unused colour assigned to #{language.name}" end end + + def test_non_crash_on_comma + assert_nil Language[','] + end end From 93ec1922cb4894127f1f800a50a0faea34b46c79 Mon Sep 17 00:00:00 2001 From: John Gardner Date: Wed, 11 Jan 2017 16:16:25 +1100 Subject: [PATCH 0230/1214] Swap grammar used for CSS highlighting (#3426) * Swap grammar used for CSS highlighting * Whitelist license of Atom's CSS grammar * Explicitly declare grammar as MIT-licensed Source: https://github.com/atom/language-css/blob/5d4af/package.json#L14 --- .gitmodules | 6 ++-- grammars.yml | 4 +-- test/test_grammars.rb | 3 +- vendor/README.md | 4 +-- vendor/grammars/css.tmbundle | 1 - vendor/grammars/language-css | 1 + vendor/licenses/grammar/css.tmbundle.txt | 15 ---------- vendor/licenses/grammar/language-css.txt | 36 ++++++++++++++++++++++++ 8 files changed, 46 insertions(+), 24 deletions(-) delete mode 160000 vendor/grammars/css.tmbundle create mode 160000 vendor/grammars/language-css delete mode 100644 vendor/licenses/grammar/css.tmbundle.txt create mode 100644 vendor/licenses/grammar/language-css.txt diff --git a/.gitmodules b/.gitmodules index 141ad26c2c..ff98aeef38 100644 --- a/.gitmodules +++ b/.gitmodules @@ -244,9 +244,6 @@ [submodule "vendor/grammars/cpp-qt.tmbundle"] path = vendor/grammars/cpp-qt.tmbundle url = https://github.com/textmate/cpp-qt.tmbundle -[submodule "vendor/grammars/css.tmbundle"] - path = vendor/grammars/css.tmbundle - url = https://github.com/textmate/css.tmbundle [submodule "vendor/grammars/d.tmbundle"] path = vendor/grammars/d.tmbundle url = https://github.com/textmate/d.tmbundle @@ -815,3 +812,6 @@ [submodule "vendor/grammars/atom-language-rust"] path = vendor/grammars/atom-language-rust url = https://github.com/zargony/atom-language-rust +[submodule "vendor/grammars/language-css"] + path = vendor/grammars/language-css + url = https://github.com/atom/language-css diff --git a/grammars.yml b/grammars.yml index 98a9dd421c..88060df59f 100755 --- a/grammars.yml +++ b/grammars.yml @@ -234,8 +234,6 @@ vendor/grammars/cpp-qt.tmbundle: - source.qmake vendor/grammars/creole: - text.html.creole -vendor/grammars/css.tmbundle: -- source.css vendor/grammars/cucumber-tmbundle: - source.ruby.rspec.cucumber.steps - text.gherkin.feature @@ -369,6 +367,8 @@ vendor/grammars/language-csound: - source.csound - source.csound-document - source.csound-score +vendor/grammars/language-css: +- source.css vendor/grammars/language-emacs-lisp: - source.emacs.lisp vendor/grammars/language-fontforge: diff --git a/test/test_grammars.rb b/test/test_grammars.rb index b5fb06aa4c..3578778805 100644 --- a/test/test_grammars.rb +++ b/test/test_grammars.rb @@ -41,7 +41,8 @@ class TestGrammars < Minitest::Test "241e5ddbb4423d792216783e9f668bd670b026e4", # ant.tmbundle "bdab9fdc21e6790b479ccb5945b78bc0f6ce2493", # language-blade "81711c69aa40135de7266c88b2f6ab28dbc1d81e", # atom-language-perl6 - "808e27f5e44167113198d277f47926c5d482eac8" # atom-language-rust + "808e27f5e44167113198d277f47926c5d482eac8", # atom-language-rust + "304be6184f7f344d44a1d13bddf511019624fd22", # language-css ].freeze # List of allowed SPDX license names diff --git a/vendor/README.md b/vendor/README.md index 125480acc7..15654c344b 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -76,7 +76,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **Csound:** [nwhetsell/language-csound](https://github.com/nwhetsell/language-csound) - **Csound Document:** [nwhetsell/language-csound](https://github.com/nwhetsell/language-csound) - **Csound Score:** [nwhetsell/language-csound](https://github.com/nwhetsell/language-csound) -- **CSS:** [textmate/css.tmbundle](https://github.com/textmate/css.tmbundle) +- **CSS:** [atom/language-css](https://github.com/atom/language-css) - **Cuda:** [harrism/sublimetext-cuda-cpp](https://github.com/harrism/sublimetext-cuda-cpp) - **Cycript:** [atom/language-javascript](https://github.com/atom/language-javascript) - **Cython:** [textmate/cython.tmbundle](https://github.com/textmate/cython.tmbundle) @@ -84,7 +84,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **D-ObjDump:** [nanoant/assembly.tmbundle](https://github.com/nanoant/assembly.tmbundle) - **Dart:** [guillermooo/dart-sublime-bundle](https://github.com/guillermooo/dart-sublime-bundle) - **desktop:** [Mailaender/desktop.tmbundle](https://github.com/Mailaender/desktop.tmbundle) -- **Diff:** [textmate/diff.tmbundle](https://github.com/textmate/diff.tmbundle) +- **Diff:** [kivikakk/diff.tmbundle](https://github.com/kivikakk/diff.tmbundle) - **DM:** [PJB3005/atomic-dreams](https://github.com/PJB3005/atomic-dreams) - **DNS Zone:** [sixty4k/st2-zonefile](https://github.com/sixty4k/st2-zonefile) - **Dockerfile:** [asbjornenge/Docker.tmbundle](https://github.com/asbjornenge/Docker.tmbundle) diff --git a/vendor/grammars/css.tmbundle b/vendor/grammars/css.tmbundle deleted file mode 160000 index d79e9c0137..0000000000 --- a/vendor/grammars/css.tmbundle +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d79e9c013769386a765198f7fb0f9dce39da829b diff --git a/vendor/grammars/language-css b/vendor/grammars/language-css new file mode 160000 index 0000000000..5d4af2db39 --- /dev/null +++ b/vendor/grammars/language-css @@ -0,0 +1 @@ +Subproject commit 5d4af2db39dc5e4236e1a954610a0fb6ba7b5cdf diff --git a/vendor/licenses/grammar/css.tmbundle.txt b/vendor/licenses/grammar/css.tmbundle.txt deleted file mode 100644 index 8a2a765f1b..0000000000 --- a/vendor/licenses/grammar/css.tmbundle.txt +++ /dev/null @@ -1,15 +0,0 @@ ---- -type: grammar -name: css.tmbundle -license: permissive -curated: true ---- - -If not otherwise specified (see below), files in this repository fall under the following license: - - Permission to copy, use, modify, sell and distribute this - software is granted. This software is provided "as is" without - express or implied warranty, and with no claim as to its - suitability for any purpose. - -An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”. diff --git a/vendor/licenses/grammar/language-css.txt b/vendor/licenses/grammar/language-css.txt new file mode 100644 index 0000000000..42e30cd4ed --- /dev/null +++ b/vendor/licenses/grammar/language-css.txt @@ -0,0 +1,36 @@ +--- +type: grammar +name: language-css +license: mit +--- +Copyright (c) 2014 GitHub Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-------------------------------------------------------------------- + +This package was derived from a TextMate bundle located at +https://github.com/textmate/css.tmbundle and distributed under the following +license, located in `README.mdown`: + +Permission to copy, use, modify, sell and distribute this +software is granted. This software is provided "as is" without +express or implied warranty, and with no claim as to its +suitability for any purpose. From 28bce533b228f7c051f4fcc24a4243cb795e416a Mon Sep 17 00:00:00 2001 From: Brandon Black Date: Wed, 11 Jan 2017 16:08:31 -0800 Subject: [PATCH 0231/1214] Release v5.0.2 (#3427) * updated grammars * bumping version * adding .gem files to gitignore --- .gitignore | 1 + lib/linguist/version.rb | 2 +- vendor/grammars/atom-language-perl6 | 2 +- vendor/grammars/language-blade | 2 +- vendor/grammars/language-csound | 2 +- vendor/grammars/language-less | 2 +- vendor/grammars/language-shellscript | 2 +- vendor/grammars/language-yaml | 2 +- vendor/grammars/latex.tmbundle | 2 +- vendor/grammars/reason | 2 +- 10 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 4b360dbaf9..69a2307a42 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +*.gem /Gemfile.lock .bundle/ .idea diff --git a/lib/linguist/version.rb b/lib/linguist/version.rb index 9959cb1aa7..732e61d561 100644 --- a/lib/linguist/version.rb +++ b/lib/linguist/version.rb @@ -1,3 +1,3 @@ module Linguist - VERSION = "5.0.1" + VERSION = "5.0.2" end diff --git a/vendor/grammars/atom-language-perl6 b/vendor/grammars/atom-language-perl6 index 6896ff2a72..e15ec1f4e0 160000 --- a/vendor/grammars/atom-language-perl6 +++ b/vendor/grammars/atom-language-perl6 @@ -1 +1 @@ -Subproject commit 6896ff2a7257a332145d43343ebca6eb32aea5b2 +Subproject commit e15ec1f4e047503e18d8c3f9fe0f6bc841e62772 diff --git a/vendor/grammars/language-blade b/vendor/grammars/language-blade index 14104c18a9..7e4e5f2e53 160000 --- a/vendor/grammars/language-blade +++ b/vendor/grammars/language-blade @@ -1 +1 @@ -Subproject commit 14104c18a9e1ebc9228c551b34f30d71a4da3e4d +Subproject commit 7e4e5f2e539a65cfcc8813107c12038973ce7fa3 diff --git a/vendor/grammars/language-csound b/vendor/grammars/language-csound index 8f8668a38e..1b7b52ba81 160000 --- a/vendor/grammars/language-csound +++ b/vendor/grammars/language-csound @@ -1 +1 @@ -Subproject commit 8f8668a38e95daa45d017282c18c064db5ab415d +Subproject commit 1b7b52ba8116e5b8b40f28b2cb275c6c0c299296 diff --git a/vendor/grammars/language-less b/vendor/grammars/language-less index ce6a54dd17..c9abeea663 160000 --- a/vendor/grammars/language-less +++ b/vendor/grammars/language-less @@ -1 +1 @@ -Subproject commit ce6a54dd17dc936baee09cd0d547968e9af3a853 +Subproject commit c9abeea6639da0d040855275f6b9220a5f4ea5ff diff --git a/vendor/grammars/language-shellscript b/vendor/grammars/language-shellscript index 3cd0b6bb5e..29eecbc416 160000 --- a/vendor/grammars/language-shellscript +++ b/vendor/grammars/language-shellscript @@ -1 +1 @@ -Subproject commit 3cd0b6bb5ede1dbff8d4b185f0a3ea5f93292d65 +Subproject commit 29eecbc416d4ac73ee34857362a6a8db58acbaa2 diff --git a/vendor/grammars/language-yaml b/vendor/grammars/language-yaml index 6be651ae57..9e57ab9555 160000 --- a/vendor/grammars/language-yaml +++ b/vendor/grammars/language-yaml @@ -1 +1 @@ -Subproject commit 6be651ae57004bdba3f12bda86aeca106f8e5ab5 +Subproject commit 9e57ab955535ab59e48ecea1b102a0bb4e5d4518 diff --git a/vendor/grammars/latex.tmbundle b/vendor/grammars/latex.tmbundle index acbc3453c4..4f20bf6e8c 160000 --- a/vendor/grammars/latex.tmbundle +++ b/vendor/grammars/latex.tmbundle @@ -1 +1 @@ -Subproject commit acbc3453c4aa044ee3bfb940d791d445bae40b6f +Subproject commit 4f20bf6e8c02799a66ce18945570077e0f7abcde diff --git a/vendor/grammars/reason b/vendor/grammars/reason index 77ede65142..954d698417 160000 --- a/vendor/grammars/reason +++ b/vendor/grammars/reason @@ -1 +1 @@ -Subproject commit 77ede651424fa6d238d98a13142a888765537978 +Subproject commit 954d698417ed59aa216cfbb7a5779471e26019ec From 625b06c30d04c8e3ad6c060d9cceead05b30d3c8 Mon Sep 17 00:00:00 2001 From: Yuki Izumi Date: Tue, 17 Jan 2017 17:02:10 +1100 Subject: [PATCH 0232/1214] Use textmate/diff.tmbundle again (#3429) Upstream textmate/diff.tmbundle#6 was merged. --- .gitmodules | 2 +- vendor/grammars/diff.tmbundle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index ff98aeef38..7e082ef08a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -249,7 +249,7 @@ url = https://github.com/textmate/d.tmbundle [submodule "vendor/grammars/diff.tmbundle"] path = vendor/grammars/diff.tmbundle - url = https://github.com/kivikakk/diff.tmbundle + url = https://github.com/textmate/diff.tmbundle [submodule "vendor/grammars/dylan.tmbundle"] path = vendor/grammars/dylan.tmbundle url = https://github.com/textmate/dylan.tmbundle diff --git a/vendor/grammars/diff.tmbundle b/vendor/grammars/diff.tmbundle index 372abaaeb1..0593bb775e 160000 --- a/vendor/grammars/diff.tmbundle +++ b/vendor/grammars/diff.tmbundle @@ -1 +1 @@ -Subproject commit 372abaaeb12620db3f9d5d984c4ee8c3c6224117 +Subproject commit 0593bb775eab1824af97ef2172fd38822abd97d7 From b36ea7ac9d07e4af166a052ec97fdcadbcea4b3d Mon Sep 17 00:00:00 2001 From: sunderls Date: Tue, 24 Jan 2017 03:58:53 +0900 Subject: [PATCH 0233/1214] Add yarn (#3432) * add yarn.lock * fix comment * remove yarn test * add test * fix test * try fix again * try 3rd time * check filename and firstline for yarn lockfile --- lib/linguist/generated.rb | 11 ++++++++++- test/fixtures/Data/yarn.lock | 9 +++++++++ test/test_generated.rb | 3 +++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 test/fixtures/Data/yarn.lock diff --git a/lib/linguist/generated.rb b/lib/linguist/generated.rb index edd3b37a98..fce3ab4bdd 100644 --- a/lib/linguist/generated.rb +++ b/lib/linguist/generated.rb @@ -80,7 +80,8 @@ def generated? generated_jflex? || generated_grammarkit? || generated_roxygen2? || - generated_jison? + generated_jison? || + generated_yarn_lock? end # Internal: Is the blob an Xcode file? @@ -479,5 +480,13 @@ def generated_jison? return lines[0].start_with?("/* parser generated by jison ") || lines[0].start_with?("/* generated by jison-lex ") end + + # Internal: Is the blob a generated yarn lockfile? + # + # Returns true or false. + def generated_yarn_lock? + return false unless name.match(/yarn\.lock/) + return lines[0].include?("# THIS IS AN AUTOGENERATED FILE") + end end end diff --git a/test/fixtures/Data/yarn.lock b/test/fixtures/Data/yarn.lock new file mode 100644 index 0000000000..014e8983fc --- /dev/null +++ b/test/fixtures/Data/yarn.lock @@ -0,0 +1,9 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 +abab@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" + +abbrev@1, abbrev@1.0.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" diff --git a/test/test_generated.rb b/test/test_generated.rb index 6301d971ab..d12108d761 100644 --- a/test/test_generated.rb +++ b/test/test_generated.rb @@ -79,6 +79,9 @@ def test_check_generated generated_fixture_loading_data("Data/sourcemap.v3.map") generated_fixture_loading_data("Data/sourcemap.v1.map") + # Yarn locfile + generated_fixture_loading_data("Data/yarn.lock") + # Specflow generated_fixture_without_loading_data("Features/BindingCulture.feature.cs") From 9fe5fe0de23ccb1a2d3999b570a2425e524e1cc8 Mon Sep 17 00:00:00 2001 From: Brandon Black Date: Mon, 23 Jan 2017 20:09:26 -0800 Subject: [PATCH 0234/1214] v5.0.3 Release (#3436) * bumping to v5.0.3 * updating grammars --- lib/linguist/version.rb | 2 +- vendor/CodeMirror | 2 +- vendor/grammars/Elm | 2 +- vendor/grammars/SublimePapyrus | 2 +- vendor/grammars/applescript.tmbundle | 2 +- vendor/grammars/atom-language-perl6 | 2 +- vendor/grammars/atom-language-rust | 2 +- vendor/grammars/elixir-tmbundle | 2 +- vendor/grammars/language-blade | 2 +- vendor/grammars/language-csharp | 2 +- vendor/grammars/language-csound | 2 +- vendor/grammars/language-javascript | 2 +- vendor/grammars/language-rpm-spec | 2 +- vendor/grammars/language-yaml | 2 +- vendor/grammars/perl.tmbundle | 2 +- vendor/grammars/php.tmbundle | 2 +- vendor/grammars/reason | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/linguist/version.rb b/lib/linguist/version.rb index 732e61d561..6b63615349 100644 --- a/lib/linguist/version.rb +++ b/lib/linguist/version.rb @@ -1,3 +1,3 @@ module Linguist - VERSION = "5.0.2" + VERSION = "5.0.3" end diff --git a/vendor/CodeMirror b/vendor/CodeMirror index 0fb17df669..268cf99055 160000 --- a/vendor/CodeMirror +++ b/vendor/CodeMirror @@ -1 +1 @@ -Subproject commit 0fb17df6694b0ba63ec0568d84709e9a07e19a9b +Subproject commit 268cf9905509b87de33a00342ee1cce9a1bdc5cd diff --git a/vendor/grammars/Elm b/vendor/grammars/Elm index 8e8af4a712..64315b1f86 160000 --- a/vendor/grammars/Elm +++ b/vendor/grammars/Elm @@ -1 +1 @@ -Subproject commit 8e8af4a7121bdbcff43c6cf9dca17421943af929 +Subproject commit 64315b1f86c1cc299c95466d8feca68b1eeb74ff diff --git a/vendor/grammars/SublimePapyrus b/vendor/grammars/SublimePapyrus index 374ebd6444..b87e7c5238 160000 --- a/vendor/grammars/SublimePapyrus +++ b/vendor/grammars/SublimePapyrus @@ -1 +1 @@ -Subproject commit 374ebd64448d4078fc384ea1600b747dcccebf70 +Subproject commit b87e7c5238c2c93c6815bd39cf7689916c5a6536 diff --git a/vendor/grammars/applescript.tmbundle b/vendor/grammars/applescript.tmbundle index 5067ef67a5..df46dd96d8 160000 --- a/vendor/grammars/applescript.tmbundle +++ b/vendor/grammars/applescript.tmbundle @@ -1 +1 @@ -Subproject commit 5067ef67a58f6f56a54460be1390d921bb400d45 +Subproject commit df46dd96d877c5d2aadef4267c950e92a35425fa diff --git a/vendor/grammars/atom-language-perl6 b/vendor/grammars/atom-language-perl6 index e15ec1f4e0..519adffd86 160000 --- a/vendor/grammars/atom-language-perl6 +++ b/vendor/grammars/atom-language-perl6 @@ -1 +1 @@ -Subproject commit e15ec1f4e047503e18d8c3f9fe0f6bc841e62772 +Subproject commit 519adffd86e70d3bf1fa42953c6c5aa46c9a49d8 diff --git a/vendor/grammars/atom-language-rust b/vendor/grammars/atom-language-rust index 2f514baad7..092cc6a8a0 160000 --- a/vendor/grammars/atom-language-rust +++ b/vendor/grammars/atom-language-rust @@ -1 +1 @@ -Subproject commit 2f514baad7eca4a1d587d85ea5aa6fb353281617 +Subproject commit 092cc6a8a085ef1b28141d7aa7c0c242f3024c3a diff --git a/vendor/grammars/elixir-tmbundle b/vendor/grammars/elixir-tmbundle index 319bbe2022..50846fe555 160000 --- a/vendor/grammars/elixir-tmbundle +++ b/vendor/grammars/elixir-tmbundle @@ -1 +1 @@ -Subproject commit 319bbe20225f5eb57b26289c4c3a66969969386b +Subproject commit 50846fe55547054c960c62fa2d63c0a1b85e7e57 diff --git a/vendor/grammars/language-blade b/vendor/grammars/language-blade index 7e4e5f2e53..0282a2c5aa 160000 --- a/vendor/grammars/language-blade +++ b/vendor/grammars/language-blade @@ -1 +1 @@ -Subproject commit 7e4e5f2e539a65cfcc8813107c12038973ce7fa3 +Subproject commit 0282a2c5aa27d7288b0aa679c5accc52fc977794 diff --git a/vendor/grammars/language-csharp b/vendor/grammars/language-csharp index 71b8930b31..f1462897f9 160000 --- a/vendor/grammars/language-csharp +++ b/vendor/grammars/language-csharp @@ -1 +1 @@ -Subproject commit 71b8930b315b0793c4fb63314161dee5d2962dde +Subproject commit f1462897f9805520733f6dd2060360bd002b3e02 diff --git a/vendor/grammars/language-csound b/vendor/grammars/language-csound index 1b7b52ba81..c1c5b4db72 160000 --- a/vendor/grammars/language-csound +++ b/vendor/grammars/language-csound @@ -1 +1 @@ -Subproject commit 1b7b52ba8116e5b8b40f28b2cb275c6c0c299296 +Subproject commit c1c5b4db72e808cb6b1f77a1e6bd09c203140086 diff --git a/vendor/grammars/language-javascript b/vendor/grammars/language-javascript index 31ec605571..245162fea4 160000 --- a/vendor/grammars/language-javascript +++ b/vendor/grammars/language-javascript @@ -1 +1 @@ -Subproject commit 31ec605571246ec78825fae937b5b51559e79452 +Subproject commit 245162fea4db7c75bb9142a09fa95f4d52910cf7 diff --git a/vendor/grammars/language-rpm-spec b/vendor/grammars/language-rpm-spec index 549b424107..b639f16683 160000 --- a/vendor/grammars/language-rpm-spec +++ b/vendor/grammars/language-rpm-spec @@ -1 +1 @@ -Subproject commit 549b4241074bfb81557173377efb6681673648ac +Subproject commit b639f16683e6cc3a212a02ecab1a2ab721a75abe diff --git a/vendor/grammars/language-yaml b/vendor/grammars/language-yaml index 9e57ab9555..252a0c19c6 160000 --- a/vendor/grammars/language-yaml +++ b/vendor/grammars/language-yaml @@ -1 +1 @@ -Subproject commit 9e57ab955535ab59e48ecea1b102a0bb4e5d4518 +Subproject commit 252a0c19c6098b5270af61b402fa0aa184b32d8d diff --git a/vendor/grammars/perl.tmbundle b/vendor/grammars/perl.tmbundle index 7a786e331d..c0b7a4bd65 160000 --- a/vendor/grammars/perl.tmbundle +++ b/vendor/grammars/perl.tmbundle @@ -1 +1 @@ -Subproject commit 7a786e331dec2012f2f4321e26cdf8b946a5ae75 +Subproject commit c0b7a4bd65882380522d82a60b536479a62b07c3 diff --git a/vendor/grammars/php.tmbundle b/vendor/grammars/php.tmbundle index 010cc1c22c..3ed4837b43 160000 --- a/vendor/grammars/php.tmbundle +++ b/vendor/grammars/php.tmbundle @@ -1 +1 @@ -Subproject commit 010cc1c22c89c117ad4c985997668c3903dc37f0 +Subproject commit 3ed4837b43d3f650ebb525b068636281942883a0 diff --git a/vendor/grammars/reason b/vendor/grammars/reason index 954d698417..f18549ccd3 160000 --- a/vendor/grammars/reason +++ b/vendor/grammars/reason @@ -1 +1 @@ -Subproject commit 954d698417ed59aa216cfbb7a5779471e26019ec +Subproject commit f18549ccd31053f71c40f0e0c9b605cadfc3c9c9 From 1ec4db97c2b71e7c712d3b8dc7f19f473633650e Mon Sep 17 00:00:00 2001 From: Javier Honduvilla Coto Date: Tue, 24 Jan 2017 18:55:31 +0100 Subject: [PATCH 0235/1214] Be able to configure the number of threads for git submodules update (#3438) * make the number of submodule update threads configurable * change thread number to be a script argument --- script/fast-submodule-update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/fast-submodule-update b/script/fast-submodule-update index dff1be7dad..bf10301b67 100755 --- a/script/fast-submodule-update +++ b/script/fast-submodule-update @@ -51,7 +51,7 @@ SUBMODULES.partition { |submodule| SLOW_SUBMODULES.include?(submodule) }.flatten submodules.push(submodule) end -8.times do +(ARGV.first || 8).to_i.times do Thread.new { run_thread(submodules, results) } end From 47b109be3657fe3d5933fba6840a6ceea0f94498 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Wed, 25 Jan 2017 00:10:46 +0100 Subject: [PATCH 0236/1214] Improve heuristic for Modula-2 (#3434) Module names can contain dots --- lib/linguist/heuristics.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index b2d40ee5ab..7aefad985d 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -278,7 +278,7 @@ def call(data) disambiguate ".mod" do |data| if data.include?(' Date: Tue, 31 Jan 2017 14:45:22 -0800 Subject: [PATCH 0237/1214] fixing null reference in yarn.lock check (#3444) --- lib/linguist/generated.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/linguist/generated.rb b/lib/linguist/generated.rb index fce3ab4bdd..9699bff9c9 100644 --- a/lib/linguist/generated.rb +++ b/lib/linguist/generated.rb @@ -486,6 +486,7 @@ def generated_jison? # Returns true or false. def generated_yarn_lock? return false unless name.match(/yarn\.lock/) + return false unless lines.count > 0 return lines[0].include?("# THIS IS AN AUTOGENERATED FILE") end end From d761658f8b63e997f2cb68d866597e79506dd2ae Mon Sep 17 00:00:00 2001 From: Brandon Black Date: Tue, 31 Jan 2017 15:08:52 -0800 Subject: [PATCH 0238/1214] Release v5.0.4 (#3445) * bumping to v5.0.3 * updating rugged --- github-linguist.gemspec | 2 +- lib/linguist/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/github-linguist.gemspec b/github-linguist.gemspec index 7a1d1ac67e..183d0fb884 100644 --- a/github-linguist.gemspec +++ b/github-linguist.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |s| s.add_dependency 'charlock_holmes', '~> 0.7.3' s.add_dependency 'escape_utils', '~> 1.1.0' s.add_dependency 'mime-types', '>= 1.19' - s.add_dependency 'rugged', '0.25.0b10' + s.add_dependency 'rugged', '0.25.1.1' s.add_development_dependency 'minitest', '>= 5.0' s.add_development_dependency 'mocha' diff --git a/lib/linguist/version.rb b/lib/linguist/version.rb index 6b63615349..d0ebf10085 100644 --- a/lib/linguist/version.rb +++ b/lib/linguist/version.rb @@ -1,3 +1,3 @@ module Linguist - VERSION = "5.0.3" + VERSION = "5.0.4" end From e7b5e25bf88cabf577ae68c474a68e0fea40d4bc Mon Sep 17 00:00:00 2001 From: John Gardner Date: Fri, 3 Feb 2017 06:08:20 +1100 Subject: [PATCH 0239/1214] Add support for regular expression data (#3441) --- .gitmodules | 3 ++ grammars.yml | 4 ++ lib/linguist/languages.yml | 18 +++++-- .../Regular Expression/modeline-emacs.regexp | 19 +++++++ .../Regular Expression/modeline-vim.regexp | 27 ++++++++++ samples/Regular Expression/ordinal.regex | 1 + samples/Regular Expression/url.regex | 1 + samples/Text/filenames/COPYING.regex | 54 +++++++++++++++++++ vendor/README.md | 3 +- vendor/grammars/language-regexp | 1 + vendor/licenses/grammar/language-regexp.txt | 18 +++++++ 11 files changed, 145 insertions(+), 4 deletions(-) create mode 100644 samples/Regular Expression/modeline-emacs.regexp create mode 100644 samples/Regular Expression/modeline-vim.regexp create mode 100644 samples/Regular Expression/ordinal.regex create mode 100644 samples/Regular Expression/url.regex create mode 100644 samples/Text/filenames/COPYING.regex create mode 160000 vendor/grammars/language-regexp create mode 100644 vendor/licenses/grammar/language-regexp.txt diff --git a/.gitmodules b/.gitmodules index 7e082ef08a..14461012b1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -815,3 +815,6 @@ [submodule "vendor/grammars/language-css"] path = vendor/grammars/language-css url = https://github.com/atom/language-css +[submodule "vendor/grammars/language-regexp"] + path = vendor/grammars/language-regexp + url = https://github.com/Alhadis/language-regexp diff --git a/grammars.yml b/grammars.yml index 88060df59f..217eefad57 100755 --- a/grammars.yml +++ b/grammars.yml @@ -415,6 +415,10 @@ vendor/grammars/language-povray: vendor/grammars/language-python: - text.python.console - text.python.traceback +vendor/grammars/language-regexp: +- source.regexp +- source.regexp.comment +- source.regexp.extended vendor/grammars/language-renpy: - source.renpy vendor/grammars/language-restructuredtext: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index a0c86f2c40..e2794ea781 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3601,6 +3601,17 @@ Redcode: tm_scope: none ace_mode: text language_id: 321 +Regular Expression: + type: data + extensions: + - ".regexp" + - ".regex" + aliases: + - regexp + - regex + ace_mode: text + tm_scope: source.regexp + language_id: 363378884 Ren'Py: type: programming aliases: @@ -4298,6 +4309,7 @@ Text: - ".no" filenames: - COPYING + - COPYRIGHT.regex - FONTLOG - INSTALL - INSTALL.mysql @@ -4597,9 +4609,9 @@ XCompose: type: data filenames: - ".XCompose" - - "XCompose" - - "xcompose" - tm_scope: 'config.xcompose' + - XCompose + - xcompose + tm_scope: config.xcompose ace_mode: text language_id: 225167241 XML: diff --git a/samples/Regular Expression/modeline-emacs.regexp b/samples/Regular Expression/modeline-emacs.regexp new file mode 100644 index 0000000000..b9c33b82d5 --- /dev/null +++ b/samples/Regular Expression/modeline-emacs.regexp @@ -0,0 +1,19 @@ +-\*- +(?: + \s* + (?= [^:;\s]+ \s* -\*-) + | + (?: + .*?[;\s] + | + (?<=-\*-) + ) + mode\s*:\s* +) +([^:;\s]+) + +(?= + [\s;] | (?]?\d+|m)? + | + [\t\x20] + ex +) +(?= + : (?=\s* set? \s [^\n:]+ :) | + : (?!\s* set? \s) +) + +(?: + (?:\s|\s*:\s*) + \w* + (?: + \s*= + (?:[^\n\\\s]|\\.)* + )? +)* + +[\s:] +(?:filetype|ft|syntax) +\s*= +(MODE_NAME_HERE) +(?=\s|:|$) diff --git a/samples/Regular Expression/ordinal.regex b/samples/Regular Expression/ordinal.regex new file mode 100644 index 0000000000..9017a8e082 --- /dev/null +++ b/samples/Regular Expression/ordinal.regex @@ -0,0 +1 @@ +\b(\d*1[1-3]th|\d*0th|(?:(?!11st)\d)*1st|\d*2nd|(?:(?!13rd)\d*)3rd|\d*[4-9]th)\b diff --git a/samples/Regular Expression/url.regex b/samples/Regular Expression/url.regex new file mode 100644 index 0000000000..298419d78c --- /dev/null +++ b/samples/Regular Expression/url.regex @@ -0,0 +1 @@ +/^([^\/#\?]*:?\/\/)?(\/?(?:[^\/#\?]+\/)*)?([^\/#\?]+)?(?:\/(?=$))?(\?[^#]*)?(#.*)?$/ diff --git a/samples/Text/filenames/COPYING.regex b/samples/Text/filenames/COPYING.regex new file mode 100644 index 0000000000..a6392fd37c --- /dev/null +++ b/samples/Text/filenames/COPYING.regex @@ -0,0 +1,54 @@ +$OpenBSD: COPYRIGHT,v 1.3 2003/06/02 20:18:36 millert Exp $ + +Copyright 1992, 1993, 1994 Henry Spencer. All rights reserved. +This software is not subject to any license of the American Telephone +and Telegraph Company or of the Regents of the University of California. + +Permission is granted to anyone to use this software for any purpose on +any computer system, and to alter it and redistribute it, subject +to the following restrictions: + +1. The author is not responsible for the consequences of use of this + software, no matter how awful, even if they arise from flaws in it. + +2. The origin of this software must not be misrepresented, either by + explicit claim or by omission. Since few users ever read sources, + credits must appear in the documentation. + +3. Altered versions must be plainly marked as such, and must not be + misrepresented as being the original software. Since few users + ever read sources, credits must appear in the documentation. + +4. This notice may not be removed or altered. + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +/*- + * Copyright (c) 1994 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)COPYRIGHT 8.1 (Berkeley) 3/16/94 + */ diff --git a/vendor/README.md b/vendor/README.md index 15654c344b..359a9b148a 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -84,7 +84,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **D-ObjDump:** [nanoant/assembly.tmbundle](https://github.com/nanoant/assembly.tmbundle) - **Dart:** [guillermooo/dart-sublime-bundle](https://github.com/guillermooo/dart-sublime-bundle) - **desktop:** [Mailaender/desktop.tmbundle](https://github.com/Mailaender/desktop.tmbundle) -- **Diff:** [kivikakk/diff.tmbundle](https://github.com/kivikakk/diff.tmbundle) +- **Diff:** [textmate/diff.tmbundle](https://github.com/textmate/diff.tmbundle) - **DM:** [PJB3005/atomic-dreams](https://github.com/PJB3005/atomic-dreams) - **DNS Zone:** [sixty4k/st2-zonefile](https://github.com/sixty4k/st2-zonefile) - **Dockerfile:** [asbjornenge/Docker.tmbundle](https://github.com/asbjornenge/Docker.tmbundle) @@ -278,6 +278,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **Reason:** [facebook/reason](https://github.com/facebook/reason) - **Rebol:** [Oldes/Sublime-REBOL](https://github.com/Oldes/Sublime-REBOL) - **Red:** [Oldes/Sublime-Red](https://github.com/Oldes/Sublime-Red) +- **Regular Expression:** [Alhadis/language-regexp](https://github.com/Alhadis/language-regexp) - **Ren'Py:** [williamd1k0/language-renpy](https://github.com/williamd1k0/language-renpy) - **reStructuredText:** [Lukasa/language-restructuredtext](https://github.com/Lukasa/language-restructuredtext) - **REXX:** [mblocker/rexx-sublime](https://github.com/mblocker/rexx-sublime) diff --git a/vendor/grammars/language-regexp b/vendor/grammars/language-regexp new file mode 160000 index 0000000000..9dc99a60ae --- /dev/null +++ b/vendor/grammars/language-regexp @@ -0,0 +1 @@ +Subproject commit 9dc99a60ae07a8f8773527600c9ef9a6489a21c4 diff --git a/vendor/licenses/grammar/language-regexp.txt b/vendor/licenses/grammar/language-regexp.txt new file mode 100644 index 0000000000..29fe86b13b --- /dev/null +++ b/vendor/licenses/grammar/language-regexp.txt @@ -0,0 +1,18 @@ +--- +type: grammar +name: language-regexp +license: isc +--- +Copyright (c) 2016-2017, John Gardner + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. From 32147b629e839520df0d4b12572949bd527dc9e0 Mon Sep 17 00:00:00 2001 From: John Gardner Date: Fri, 3 Feb 2017 06:09:07 +1100 Subject: [PATCH 0240/1214] Register "Emakefile" as an Erlang filename (#3443) --- lib/linguist/languages.yml | 1 + samples/Erlang/filenames/Emakefile | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 samples/Erlang/filenames/Emakefile diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index e2794ea781..eda3a2e09b 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1156,6 +1156,7 @@ Erlang: - ".xrl" - ".yrl" filenames: + - Emakefile - rebar.config - rebar.config.lock - rebar.lock diff --git a/samples/Erlang/filenames/Emakefile b/samples/Erlang/filenames/Emakefile new file mode 100644 index 0000000000..65e3fde4b5 --- /dev/null +++ b/samples/Erlang/filenames/Emakefile @@ -0,0 +1,7 @@ +{"src/*", [ + report, + verbose, + {i, "include"}, + {outdir, "ebin"}, + debug_info +]}. From 76d41697aaed6e0354202dd94e07d646c82dfe61 Mon Sep 17 00:00:00 2001 From: fix-fix Date: Fri, 3 Feb 2017 00:09:55 +0500 Subject: [PATCH 0241/1214] Use official HTML primary color (#3447) Use primary color of HTML5 logo as defined on Logo FAQ page --- lib/linguist/languages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index eda3a2e09b..28e59786df 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1606,7 +1606,7 @@ HTML: ace_mode: html codemirror_mode: htmlmixed codemirror_mime_type: text/html - color: "#e44b23" + color: "#e34c26" aliases: - xhtml extensions: From b524461b7c09258dc6582807f68a77c04e4f0e01 Mon Sep 17 00:00:00 2001 From: Greg Zimmerman Date: Thu, 2 Feb 2017 14:13:01 -0500 Subject: [PATCH 0242/1214] Add PowerShell color. Matches default console color for PowerShell. (#3448) --- lib/linguist/languages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 28e59786df..700dd831b5 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3227,6 +3227,7 @@ PowerBuilder: language_id: 292 PowerShell: type: programming + color: "#012456" ace_mode: powershell codemirror_mode: powershell codemirror_mime_type: application/x-powershell From d6dc3a3991c082b7a31fc580a2a7eb93a5a09837 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Thu, 2 Feb 2017 20:58:52 +0100 Subject: [PATCH 0243/1214] Accomodate Markdown lines which begin with '>'. (#3452) --- lib/linguist/heuristics.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index 7aefad985d..514ddb8a1c 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -260,7 +260,7 @@ def call(data) end disambiguate ".md" do |data| - if /(^[-a-z0-9=#!\*\[|])|<\//i.match(data) || data.empty? + if /(^[-a-z0-9=#!\*\[|>])|<\//i.match(data) || data.empty? Language["Markdown"] elsif /^(;;|\(define_)/.match(data) Language["GCC machine description"] From 0056095e8ce7fa731030b86f5e952bbe70a17b9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20St=C3=B6lzle?= Date: Fri, 3 Feb 2017 11:50:30 +0100 Subject: [PATCH 0244/1214] Add .lkml to LookML (#3454) * Add .lkml to LookML * Limit .lkml to .view.lkml and .model.lkml * Add lkml samples * Fix extension order --- lib/linguist/languages.yml | 2 + samples/LookML/example.model.lkml | 49 +++++++++++++++++ samples/LookML/example.view.lkml | 90 +++++++++++++++++++++++++++++++ 3 files changed, 141 insertions(+) create mode 100644 samples/LookML/example.model.lkml create mode 100644 samples/LookML/example.view.lkml diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 700dd831b5..a86c8a310c 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2292,6 +2292,8 @@ LookML: color: "#652B81" extensions: - ".lookml" + - ".model.lkml" + - ".view.lkml" tm_scope: source.yaml language_id: 211 LoomScript: diff --git a/samples/LookML/example.model.lkml b/samples/LookML/example.model.lkml new file mode 100644 index 0000000000..ea6c4ff170 --- /dev/null +++ b/samples/LookML/example.model.lkml @@ -0,0 +1,49 @@ +- label: 'desired label name' +- connection: connection_name +- include: filename_or_pattern + # Possibly more include declarations +- persist_for: N (seconds | minutes | hours) +- case_sensitive: true | false +- week_start_day: monday | tuesday | wednesday | thursday | friday | saturday | sunday +- value_formats: + - name: desired_format_name + value_format: 'excel-style formatting string' + # Possibly more value formats + +- explore: view_name + label: 'desired label name' + description: 'description string' + symmetric_aggregates: true | false + hidden: true | false + fields: [field_or_set, field_or_set, …] + + sql_always_where: SQL WHERE condition + always_filter: + field_name: 'looker filter expression' + conditionally_filter: + field_name: 'looker filter expression' + unless: [field_or_set, field_or_set, …] + access_filter_fields: [fully_scoped_field, fully_scoped_field, …] + + always_join: [view_name, view_name, …] + joins: + - join: view_name + type: left_outer | full_outer | inner | cross + relationship: one_to_one | many_to_one | one_to_many | many_to_many + from: view_name + sql_table_name: table_name + view_label: 'desired label name' + fields: [field_or_set, field_or_set, …] + required_joins: [view_name, view_name, …] + foreign_key: dimension_name + sql_on: SQL ON clause + # Possibly more join declarations + + persist_for: N (seconds | minutes | hours) + from: view_name + view: view_name + case_sensitive: true | false + sql_table_name: table_name + cancel_grouping_fields: [fully_scoped_field, fully_scoped_field, …] + +# Possibly more explore declarations diff --git a/samples/LookML/example.view.lkml b/samples/LookML/example.view.lkml new file mode 100644 index 0000000000..f4918d766d --- /dev/null +++ b/samples/LookML/example.view.lkml @@ -0,0 +1,90 @@ +- view: view_name + sql_table_name: table_name + suggestions: true | false + + derived_table: + sql: SQL query + persist_for: N (seconds | minutes | hours) + sql_trigger_value: SQL query + distribution: column_name + distribution_style: ALL | EVEN + sortkeys: [column_name, column_name, …] + indexes: [column_name, column_name, …] + + sets: + set_name: + - field_or_set + - field_or_set + - … + # Possibly more set declarations + + fields: + - (dimension | dimension_group | measure | filter): field_name + label: 'desired label name' + view_label: 'desired label name' + group_label: 'desired label name' + description: 'description string' + hidden: true | false + alias: [old_field_name, old_field_name, …] + value_format: 'excel-style formatting string' + value_format_name: format_name + html: HTML expression using Liquid template elements + sql: SQL expression to generate the field value + required_fields: [field_name, field_name, …] + drill_fields: [field_or_set, field_or_set, …] + can_filter: true | false + fanout_on: repeated_record_name + + # DIMENSION SPECIFIC PARAMETERS + + type: dimension_field_type + primary_key: true | false + sql_case: + value: SQL condition + value: SQL condition + # Possibly more sql_case statements + alpha_sort: true | false + tiers: [N, N, …] + style: classic | interval | integer | relational + sql_latitude: SQL expression to generate a latitude + sql_longitude: SQL expression to generate a longitude + suggestable: true | false + suggest_persist_for: N (seconds | minutes | hours) + suggest_dimension: dimension_name + suggest_explore: explore_name + suggestions: ['suggestion string', 'suggestion string', …] + bypass_suggest_restrictions: true | false + full_suggestions: true | false + skip_drill_filter: true | false + case_sensitive: true | false + order_by_field: dimension_name + map_layer: name_of_map_layer + links: + - label: 'desired label name' + url: desired_url + icon_url: url_of_an_ico_file + # Possibly more links + + # DIMENSION GROUP SPECIFIC PARAMETERS + + timeframes: [timeframe, timeframe, …] + convert_tz: true | false + datatype: epoch | timestamp | datetime | date | yyyymmdd + + # MEASURE SPECIFIC PARAMETERS + + type: measure_field_type + direction: row | column + approximate: true | false + approximate_threshold: N + sql_distinct_key: SQL expression to define repeated entities + list_field: dimension_name + filters: + dimension_name: 'looker filter expression' + # Possibly more filters statements + + # FILTER SPECIFIC PARAMETERS + + default_value: 'desired default value' + + # Possibly more dimension or measure declarations From 62d285fce652197791de895a356587a3b030e1de Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Mon, 13 Feb 2017 14:35:38 +0100 Subject: [PATCH 0245/1214] Fix head commit for TXL grammar (#3470) --- vendor/grammars/TXL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/grammars/TXL b/vendor/grammars/TXL index c1c98dfa86..614cf83649 160000 --- a/vendor/grammars/TXL +++ b/vendor/grammars/TXL @@ -1 +1 @@ -Subproject commit c1c98dfa86a8510532aee3df99181f9e0487fee8 +Subproject commit 614cf836497338efb87909ce54700b2e18c9fa04 From 01de40faaaa990394063925f51bec8472753be87 Mon Sep 17 00:00:00 2001 From: Colin Seymour Date: Mon, 13 Feb 2017 18:22:54 +0000 Subject: [PATCH 0246/1214] Return early in Classifier.classify if no languages supplied (#3471) * Return early if no languages supplied There's no need to tokenise the data when attempting to classify without a limited language scope as no action will be performed when it comes to scoring anyway. * Add test for empty languages array --- lib/linguist/classifier.rb | 2 +- test/test_classifier.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/linguist/classifier.rb b/lib/linguist/classifier.rb index 89a0df2fb4..4d549cc9d4 100644 --- a/lib/linguist/classifier.rb +++ b/lib/linguist/classifier.rb @@ -95,7 +95,7 @@ def initialize(db = {}) # Returns sorted Array of result pairs. Each pair contains the # String language name and a Float score. def classify(tokens, languages) - return [] if tokens.nil? + return [] if tokens.nil? || languages.empty? tokens = Tokenizer.tokenize(tokens) if tokens.is_a?(String) scores = {} diff --git a/test/test_classifier.rb b/test/test_classifier.rb index 2ae2f45e12..818bee2968 100644 --- a/test/test_classifier.rb +++ b/test/test_classifier.rb @@ -53,4 +53,8 @@ def test_classify_ambiguous_languages assert_equal language.name, results.first[0], "#{sample[:path]}\n#{results.inspect}" end end + + def test_classify_empty_languages + assert_equal [], Classifier.classify(Samples.cache, fixture("Ruby/foo.rb"), []) + end end From d58cbc68a61334e9b8000bbf2d12562f5c56b5a4 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Wed, 15 Feb 2017 06:53:46 +0100 Subject: [PATCH 0247/1214] Support for the P4 language P4 is a language to describe the processing pipeline of network devices --- .gitmodules | 3 + grammars.yml | 2 + lib/linguist/languages.yml | 8 + samples/P4/l2.p4 | 329 +++++++++++++++++++ samples/P4/mirror_acl.p4 | 39 +++ vendor/README.md | 1 + vendor/grammars/atom-language-p4 | 1 + vendor/licenses/grammar/atom-language-p4.txt | 12 + 8 files changed, 395 insertions(+) create mode 100644 samples/P4/l2.p4 create mode 100644 samples/P4/mirror_acl.p4 create mode 160000 vendor/grammars/atom-language-p4 create mode 100644 vendor/licenses/grammar/atom-language-p4.txt diff --git a/.gitmodules b/.gitmodules index 14461012b1..9337c3e178 100644 --- a/.gitmodules +++ b/.gitmodules @@ -818,3 +818,6 @@ [submodule "vendor/grammars/language-regexp"] path = vendor/grammars/language-regexp url = https://github.com/Alhadis/language-regexp +[submodule "vendor/grammars/atom-language-p4"] + path = vendor/grammars/atom-language-p4 + url = https://github.com/TakeshiTseng/atom-language-p4 diff --git a/grammars.yml b/grammars.yml index 217eefad57..c1619668fe 100755 --- a/grammars.yml +++ b/grammars.yml @@ -180,6 +180,8 @@ vendor/grammars/atom-language-1c-bsl: - source.sdbl vendor/grammars/atom-language-clean: - source.clean +vendor/grammars/atom-language-p4: +- source.p4 vendor/grammars/atom-language-perl6: - source.meta-info - source.perl6fe diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index a86c8a310c..b5f6d81981 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2952,6 +2952,14 @@ Oz: codemirror_mode: oz codemirror_mime_type: text/x-oz language_id: 270 +P4: + type: programming + color: "#7055b5" + extensions: + - ".p4" + tm_scope: source.p4 + ace_mode: text + language_id: 348895984 PAWN: type: programming color: "#dbb284" diff --git a/samples/P4/l2.p4 b/samples/P4/l2.p4 new file mode 100644 index 0000000000..b24ca9745a --- /dev/null +++ b/samples/P4/l2.p4 @@ -0,0 +1,329 @@ +/* +Copyright 2013-present Barefoot Networks, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* + * Layer-2 processing + */ + +header_type l2_metadata_t { + fields { + lkp_pkt_type : 3; + lkp_mac_sa : 48; + lkp_mac_da : 48; + lkp_mac_type : 16; + + l2_nexthop : 16; /* next hop from l2 */ + l2_nexthop_type : 1; /* ecmp or nexthop */ + l2_redirect : 1; /* l2 redirect action */ + l2_src_miss : 1; /* l2 source miss */ + l2_src_move : IFINDEX_BIT_WIDTH; /* l2 source interface mis-match */ + stp_group: 10; /* spanning tree group id */ + stp_state : 3; /* spanning tree port state */ + bd_stats_idx : 16; /* ingress BD stats index */ + learning_enabled : 1; /* is learning enabled */ + port_vlan_mapping_miss : 1; /* port vlan mapping miss */ + same_if_check : IFINDEX_BIT_WIDTH; /* same interface check */ + } +} + +metadata l2_metadata_t l2_metadata; + +#ifndef L2_DISABLE +/*****************************************************************************/ +/* Spanning tree lookup */ +/*****************************************************************************/ +action set_stp_state(stp_state) { + modify_field(l2_metadata.stp_state, stp_state); +} + +table spanning_tree { + reads { + ingress_metadata.ifindex : exact; + l2_metadata.stp_group: exact; + } + actions { + set_stp_state; + } + size : SPANNING_TREE_TABLE_SIZE; +} +#endif /* L2_DISABLE */ + +control process_spanning_tree { +#ifndef L2_DISABLE + if (l2_metadata.stp_group != STP_GROUP_NONE) { + apply(spanning_tree); + } +#endif /* L2_DISABLE */ +} + +#ifndef L2_DISABLE +/*****************************************************************************/ +/* Source MAC lookup */ +/*****************************************************************************/ +action smac_miss() { + modify_field(l2_metadata.l2_src_miss, TRUE); +} + +action smac_hit(ifindex) { + bit_xor(l2_metadata.l2_src_move, ingress_metadata.ifindex, ifindex); +} + +table smac { + reads { + ingress_metadata.bd : exact; + l2_metadata.lkp_mac_sa : exact; + } + actions { + nop; + smac_miss; + smac_hit; + } + size : MAC_TABLE_SIZE; +} + +/*****************************************************************************/ +/* Destination MAC lookup */ +/*****************************************************************************/ +action dmac_hit(ifindex) { + modify_field(ingress_metadata.egress_ifindex, ifindex); + bit_xor(l2_metadata.same_if_check, l2_metadata.same_if_check, ifindex); +} + +action dmac_multicast_hit(mc_index) { + modify_field(intrinsic_metadata.mcast_grp, mc_index); +#ifdef FABRIC_ENABLE + modify_field(fabric_metadata.dst_device, FABRIC_DEVICE_MULTICAST); +#endif /* FABRIC_ENABLE */ +} + +action dmac_miss() { + modify_field(ingress_metadata.egress_ifindex, IFINDEX_FLOOD); +#ifdef FABRIC_ENABLE + modify_field(fabric_metadata.dst_device, FABRIC_DEVICE_MULTICAST); +#endif /* FABRIC_ENABLE */ +} + +action dmac_redirect_nexthop(nexthop_index) { + modify_field(l2_metadata.l2_redirect, TRUE); + modify_field(l2_metadata.l2_nexthop, nexthop_index); + modify_field(l2_metadata.l2_nexthop_type, NEXTHOP_TYPE_SIMPLE); +} + +action dmac_redirect_ecmp(ecmp_index) { + modify_field(l2_metadata.l2_redirect, TRUE); + modify_field(l2_metadata.l2_nexthop, ecmp_index); + modify_field(l2_metadata.l2_nexthop_type, NEXTHOP_TYPE_ECMP); +} + +action dmac_drop() { + drop(); +} + +table dmac { + reads { + ingress_metadata.bd : exact; + l2_metadata.lkp_mac_da : exact; + } + actions { +#ifdef OPENFLOW_ENABLE + openflow_apply; + openflow_miss; +#endif /* OPENFLOW_ENABLE */ + nop; + dmac_hit; + dmac_multicast_hit; + dmac_miss; + dmac_redirect_nexthop; + dmac_redirect_ecmp; + dmac_drop; + } + size : MAC_TABLE_SIZE; + support_timeout: true; +} +#endif /* L2_DISABLE */ + +control process_mac { +#ifndef L2_DISABLE + apply(smac); + apply(dmac); +#endif /* L2_DISABLE */ +} + +#ifndef L2_DISABLE +/*****************************************************************************/ +/* MAC learn notification */ +/*****************************************************************************/ +field_list mac_learn_digest { + ingress_metadata.bd; + l2_metadata.lkp_mac_sa; + ingress_metadata.ifindex; +} + +action generate_learn_notify() { + generate_digest(MAC_LEARN_RECEIVER, mac_learn_digest); +} + +table learn_notify { + reads { + l2_metadata.l2_src_miss : ternary; + l2_metadata.l2_src_move : ternary; + l2_metadata.stp_state : ternary; + } + actions { + nop; + generate_learn_notify; + } + size : LEARN_NOTIFY_TABLE_SIZE; +} +#endif /* L2_DISABLE */ + +control process_mac_learning { +#ifndef L2_DISABLE + if (l2_metadata.learning_enabled == TRUE) { + apply(learn_notify); + } +#endif /* L2_DISABLE */ +} + + +/*****************************************************************************/ +/* Validate packet */ +/*****************************************************************************/ +action set_unicast() { + modify_field(l2_metadata.lkp_pkt_type, L2_UNICAST); +} + +action set_unicast_and_ipv6_src_is_link_local() { + modify_field(l2_metadata.lkp_pkt_type, L2_UNICAST); + modify_field(ipv6_metadata.ipv6_src_is_link_local, TRUE); +} + +action set_multicast() { + modify_field(l2_metadata.lkp_pkt_type, L2_MULTICAST); + add_to_field(l2_metadata.bd_stats_idx, 1); +} + +action set_multicast_and_ipv6_src_is_link_local() { + modify_field(l2_metadata.lkp_pkt_type, L2_MULTICAST); + modify_field(ipv6_metadata.ipv6_src_is_link_local, TRUE); + add_to_field(l2_metadata.bd_stats_idx, 1); +} + +action set_broadcast() { + modify_field(l2_metadata.lkp_pkt_type, L2_BROADCAST); + add_to_field(l2_metadata.bd_stats_idx, 2); +} + +action set_malformed_packet(drop_reason) { + modify_field(ingress_metadata.drop_flag, TRUE); + modify_field(ingress_metadata.drop_reason, drop_reason); +} + +table validate_packet { + reads { +#ifndef __TARGET_BMV2__ + l2_metadata.lkp_mac_sa mask 0x010000000000 : ternary; +#else + l2_metadata.lkp_mac_sa : ternary; +#endif + l2_metadata.lkp_mac_da : ternary; + l3_metadata.lkp_ip_type : ternary; + l3_metadata.lkp_ip_ttl : ternary; + l3_metadata.lkp_ip_version : ternary; +#ifndef __TARGET_BMV2__ + ipv4_metadata.lkp_ipv4_sa mask 0xFF000000 : ternary; +#else + ipv4_metadata.lkp_ipv4_sa : ternary; +#endif +#ifndef IPV6_DISABLE +#ifndef __TARGET_BMV2__ + ipv6_metadata.lkp_ipv6_sa mask 0xFFFF0000000000000000000000000000 : ternary; +#else + ipv6_metadata.lkp_ipv6_sa : ternary; +#endif +#endif /* IPV6_DISABLE */ + } + actions { + nop; + set_unicast; + set_unicast_and_ipv6_src_is_link_local; + set_multicast; + set_multicast_and_ipv6_src_is_link_local; + set_broadcast; + set_malformed_packet; + } + size : VALIDATE_PACKET_TABLE_SIZE; +} + +control process_validate_packet { + if (ingress_metadata.drop_flag == FALSE) { + apply(validate_packet); + } +} + + +/*****************************************************************************/ +/* Egress BD lookup */ +/*****************************************************************************/ +action set_egress_bd_properties() { +} + +table egress_bd_map { + reads { + egress_metadata.bd : exact; + } + actions { + nop; + set_egress_bd_properties; + } + size : EGRESS_BD_MAPPING_TABLE_SIZE; +} + +control process_egress_bd { + apply(egress_bd_map); +} + + +/*****************************************************************************/ +/* Egress VLAN decap */ +/*****************************************************************************/ +action remove_vlan_single_tagged() { + modify_field(ethernet.etherType, vlan_tag_[0].etherType); + remove_header(vlan_tag_[0]); +} + +action remove_vlan_double_tagged() { + modify_field(ethernet.etherType, vlan_tag_[1].etherType); + remove_header(vlan_tag_[0]); + remove_header(vlan_tag_[1]); +} + +table vlan_decap { + reads { + vlan_tag_[0] : valid; + vlan_tag_[1] : valid; + } + actions { + nop; + remove_vlan_single_tagged; + remove_vlan_double_tagged; + } + size: VLAN_DECAP_TABLE_SIZE; +} + +control process_vlan_decap { + apply(vlan_decap); +} diff --git a/samples/P4/mirror_acl.p4 b/samples/P4/mirror_acl.p4 new file mode 100644 index 0000000000..f5db1f29d5 --- /dev/null +++ b/samples/P4/mirror_acl.p4 @@ -0,0 +1,39 @@ +// Copyright 2015, Barefoot Networks, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +action set_mirror_id(session_id) { + clone_ingress_pkt_to_egress(session_id); +} + +table mirror_acl { + reads { + ingress_metadata.if_label : ternary; + ingress_metadata.bd_label : ternary; + + /* ip acl */ + ingress_metadata.lkp_ipv4_sa : ternary; + ingress_metadata.lkp_ipv4_da : ternary; + ingress_metadata.lkp_ip_proto : ternary; + + /* mac acl */ + ingress_metadata.lkp_mac_sa : ternary; + ingress_metadata.lkp_mac_da : ternary; + ingress_metadata.lkp_mac_type : ternary; + } + actions { + nop; + set_mirror_id; + } + size : INGRESS_MIRROR_ACL_TABLE_SIZE; +} diff --git a/vendor/README.md b/vendor/README.md index 359a9b148a..2c0911dd0d 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -240,6 +240,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **OpenType Feature File:** [Alhadis/language-fontforge](https://github.com/Alhadis/language-fontforge) - **Ox:** [andreashetland/sublime-text-ox](https://github.com/andreashetland/sublime-text-ox) - **Oz:** [eregon/oz-tmbundle](https://github.com/eregon/oz-tmbundle) +- **P4:** [TakeshiTseng/atom-language-p4](https://github.com/TakeshiTseng/atom-language-p4) - **Papyrus:** [Kapiainen/SublimePapyrus](https://github.com/Kapiainen/SublimePapyrus) - **Parrot Internal Representation:** [textmate/parrot.tmbundle](https://github.com/textmate/parrot.tmbundle) - **Pascal:** [textmate/pascal.tmbundle](https://github.com/textmate/pascal.tmbundle) diff --git a/vendor/grammars/atom-language-p4 b/vendor/grammars/atom-language-p4 new file mode 160000 index 0000000000..9086e387fc --- /dev/null +++ b/vendor/grammars/atom-language-p4 @@ -0,0 +1 @@ +Subproject commit 9086e387fc96932666b7a3b1ffe6345e61264fd8 diff --git a/vendor/licenses/grammar/atom-language-p4.txt b/vendor/licenses/grammar/atom-language-p4.txt new file mode 100644 index 0000000000..bc0d3bef88 --- /dev/null +++ b/vendor/licenses/grammar/atom-language-p4.txt @@ -0,0 +1,12 @@ +--- +type: grammar +name: atom-language-p4 +license: mit +--- +Copyright (c) 2016 Yi Tseng + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. From 10457b66397f9a3eecdf9de37cebd7e52f1be5bc Mon Sep 17 00:00:00 2001 From: Colin Seymour Date: Wed, 15 Feb 2017 11:12:53 +0000 Subject: [PATCH 0248/1214] Release v5.0.5 (#3473) Release v5.0.5 * Update submodules * Update grammars * Bump version to 5.0.5 * Relax dependency on rugged It's probably not wise to depend on a beta version just yet. * revert php.tmbundle grammar update One of the changes in https://github.com/textmate/php.tmbundle/compare/3ed4837b43d3f650ebb525b068636281942883a0...010cc1c22c89c117ad4c985997668c3903dc37f0 leads to breakage in snippet highlighting on github.com --- github-linguist.gemspec | 2 +- grammars.yml | 3 ++- lib/linguist/version.rb | 2 +- vendor/CodeMirror | 2 +- vendor/grammars/Handlebars | 2 +- vendor/grammars/MagicPython | 2 +- vendor/grammars/SublimeClarion | 2 +- vendor/grammars/SublimePapyrus | 2 +- vendor/grammars/atom-fsharp | 2 +- vendor/grammars/atom-language-perl6 | 2 +- vendor/grammars/atom-language-rust | 2 +- vendor/grammars/elixir-tmbundle | 2 +- vendor/grammars/haxe-sublime-bundle | 2 +- vendor/grammars/idris | 2 +- vendor/grammars/kotlin-sublime-package | 2 +- vendor/grammars/language-blade | 2 +- vendor/grammars/language-click | 2 +- vendor/grammars/language-clojure | 2 +- vendor/grammars/language-coffee-script | 2 +- vendor/grammars/language-csound | 2 +- vendor/grammars/language-haskell | 2 +- vendor/grammars/language-javascript | 2 +- vendor/grammars/language-less | 2 +- vendor/grammars/language-python | 2 +- vendor/grammars/language-regexp | 2 +- vendor/grammars/language-restructuredtext | 2 +- vendor/grammars/language-roff | 2 +- vendor/grammars/language-turing | 2 +- vendor/grammars/language-yaml | 2 +- vendor/grammars/latex.tmbundle | 2 +- vendor/grammars/reason | 2 +- vendor/grammars/ruby-slim.tmbundle | 2 +- vendor/grammars/sas.tmbundle | 2 +- vendor/grammars/st2-zonefile | 2 +- vendor/grammars/sublime_cobol | 2 +- 35 files changed, 36 insertions(+), 35 deletions(-) diff --git a/github-linguist.gemspec b/github-linguist.gemspec index 183d0fb884..d6c62dc968 100644 --- a/github-linguist.gemspec +++ b/github-linguist.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |s| s.add_dependency 'charlock_holmes', '~> 0.7.3' s.add_dependency 'escape_utils', '~> 1.1.0' s.add_dependency 'mime-types', '>= 1.19' - s.add_dependency 'rugged', '0.25.1.1' + s.add_dependency 'rugged', '>= 0.25.1.1' s.add_development_dependency 'minitest', '>= 5.0' s.add_development_dependency 'mocha' diff --git a/grammars.yml b/grammars.yml index 217eefad57..6dd0bc4de5 100755 --- a/grammars.yml +++ b/grammars.yml @@ -417,13 +417,14 @@ vendor/grammars/language-python: - text.python.traceback vendor/grammars/language-regexp: - source.regexp -- source.regexp.comment - source.regexp.extended vendor/grammars/language-renpy: - source.renpy vendor/grammars/language-restructuredtext: - text.restructuredtext vendor/grammars/language-roff: +- source.ditroff +- source.ditroff.desc - source.ideal - source.pic - text.roff diff --git a/lib/linguist/version.rb b/lib/linguist/version.rb index d0ebf10085..398ea1395c 100644 --- a/lib/linguist/version.rb +++ b/lib/linguist/version.rb @@ -1,3 +1,3 @@ module Linguist - VERSION = "5.0.4" + VERSION = "5.0.5" end diff --git a/vendor/CodeMirror b/vendor/CodeMirror index 268cf99055..459873b5c1 160000 --- a/vendor/CodeMirror +++ b/vendor/CodeMirror @@ -1 +1 @@ -Subproject commit 268cf9905509b87de33a00342ee1cce9a1bdc5cd +Subproject commit 459873b5c1807527314706c03580ec06515e8d1e diff --git a/vendor/grammars/Handlebars b/vendor/grammars/Handlebars index ed851e0c67..63c28f7aa9 160000 --- a/vendor/grammars/Handlebars +++ b/vendor/grammars/Handlebars @@ -1 +1 @@ -Subproject commit ed851e0c67c2b674b6ca00c49414544aebbfbc07 +Subproject commit 63c28f7aa9360681451779164f40d80f2e70a9cc diff --git a/vendor/grammars/MagicPython b/vendor/grammars/MagicPython index b7d7f9d007..18de6108ce 160000 --- a/vendor/grammars/MagicPython +++ b/vendor/grammars/MagicPython @@ -1 +1 @@ -Subproject commit b7d7f9d00765e1aaa6a1c9c6f28846245ee2f9ae +Subproject commit 18de6108ce2d2520c77958db312d31a78777139b diff --git a/vendor/grammars/SublimeClarion b/vendor/grammars/SublimeClarion index 5823e7f447..750afa2b2a 160000 --- a/vendor/grammars/SublimeClarion +++ b/vendor/grammars/SublimeClarion @@ -1 +1 @@ -Subproject commit 5823e7f44704eabb08673a7e32b48836141a1f8e +Subproject commit 750afa2b2a5dd99b1c128183bf368c86f9a0b9c5 diff --git a/vendor/grammars/SublimePapyrus b/vendor/grammars/SublimePapyrus index b87e7c5238..a98c42007c 160000 --- a/vendor/grammars/SublimePapyrus +++ b/vendor/grammars/SublimePapyrus @@ -1 +1 @@ -Subproject commit b87e7c5238c2c93c6815bd39cf7689916c5a6536 +Subproject commit a98c42007caf01e47ad3a16ae8d8dcf7dea39ef2 diff --git a/vendor/grammars/atom-fsharp b/vendor/grammars/atom-fsharp index 4f9d5510f3..c875802334 160000 --- a/vendor/grammars/atom-fsharp +++ b/vendor/grammars/atom-fsharp @@ -1 +1 @@ -Subproject commit 4f9d5510f3b78885b5a248277c1e6f16be18bc96 +Subproject commit c875802334ce03cd027a4127f8e6c974568ccc79 diff --git a/vendor/grammars/atom-language-perl6 b/vendor/grammars/atom-language-perl6 index 519adffd86..c264a41233 160000 --- a/vendor/grammars/atom-language-perl6 +++ b/vendor/grammars/atom-language-perl6 @@ -1 +1 @@ -Subproject commit 519adffd86e70d3bf1fa42953c6c5aa46c9a49d8 +Subproject commit c264a41233b6e60bbf668ac7838a46eb5631f368 diff --git a/vendor/grammars/atom-language-rust b/vendor/grammars/atom-language-rust index 092cc6a8a0..05552e6045 160000 --- a/vendor/grammars/atom-language-rust +++ b/vendor/grammars/atom-language-rust @@ -1 +1 @@ -Subproject commit 092cc6a8a085ef1b28141d7aa7c0c242f3024c3a +Subproject commit 05552e60458e0fc507d2da772c699a0645b6a466 diff --git a/vendor/grammars/elixir-tmbundle b/vendor/grammars/elixir-tmbundle index 50846fe555..90a41b6a23 160000 --- a/vendor/grammars/elixir-tmbundle +++ b/vendor/grammars/elixir-tmbundle @@ -1 +1 @@ -Subproject commit 50846fe55547054c960c62fa2d63c0a1b85e7e57 +Subproject commit 90a41b6a23248f6542fbc684314b5799585b3a82 diff --git a/vendor/grammars/haxe-sublime-bundle b/vendor/grammars/haxe-sublime-bundle index e9559a2c53..b6bbf48404 160000 --- a/vendor/grammars/haxe-sublime-bundle +++ b/vendor/grammars/haxe-sublime-bundle @@ -1 +1 @@ -Subproject commit e9559a2c538c83d5dca09e410915834e9bdcd3cb +Subproject commit b6bbf484042552e5b921232cc944633a8454809a diff --git a/vendor/grammars/idris b/vendor/grammars/idris index 1089032af6..56fe4d65a6 160000 --- a/vendor/grammars/idris +++ b/vendor/grammars/idris @@ -1 +1 @@ -Subproject commit 1089032af66874410fb4c2fbe8a1f73806181cfe +Subproject commit 56fe4d65a6b30130658a3f07d1898a873e5a9785 diff --git a/vendor/grammars/kotlin-sublime-package b/vendor/grammars/kotlin-sublime-package index 535967fd2c..02d76dd8eb 160000 --- a/vendor/grammars/kotlin-sublime-package +++ b/vendor/grammars/kotlin-sublime-package @@ -1 +1 @@ -Subproject commit 535967fd2c53d299289d3b045097ea08dbe9764f +Subproject commit 02d76dd8eb687bbf0ff0894404e72ff7315b69a4 diff --git a/vendor/grammars/language-blade b/vendor/grammars/language-blade index 0282a2c5aa..4b09ca3be5 160000 --- a/vendor/grammars/language-blade +++ b/vendor/grammars/language-blade @@ -1 +1 @@ -Subproject commit 0282a2c5aa27d7288b0aa679c5accc52fc977794 +Subproject commit 4b09ca3be5879322222e679199a80ccc3097b440 diff --git a/vendor/grammars/language-click b/vendor/grammars/language-click index 1ee1fe012b..104f915f62 160000 --- a/vendor/grammars/language-click +++ b/vendor/grammars/language-click @@ -1 +1 @@ -Subproject commit 1ee1fe012be44973488d9f6666376ab72dbb024a +Subproject commit 104f915f6228fb04ac9301993227b4649dc71eef diff --git a/vendor/grammars/language-clojure b/vendor/grammars/language-clojure index 5747bb28c2..e29ea56ba0 160000 --- a/vendor/grammars/language-clojure +++ b/vendor/grammars/language-clojure @@ -1 +1 @@ -Subproject commit 5747bb28c2d12a246180824d8f851f2aec719d32 +Subproject commit e29ea56ba0bfe43a02081295568c00d3adc70c6a diff --git a/vendor/grammars/language-coffee-script b/vendor/grammars/language-coffee-script index dade09261c..6f5f2202df 160000 --- a/vendor/grammars/language-coffee-script +++ b/vendor/grammars/language-coffee-script @@ -1 +1 @@ -Subproject commit dade09261c20c35a2f6c8880658bc1bf58a2b42b +Subproject commit 6f5f2202dfd17c3106f1a5b25bb59927a847d606 diff --git a/vendor/grammars/language-csound b/vendor/grammars/language-csound index c1c5b4db72..0db8ee76a5 160000 --- a/vendor/grammars/language-csound +++ b/vendor/grammars/language-csound @@ -1 +1 @@ -Subproject commit c1c5b4db72e808cb6b1f77a1e6bd09c203140086 +Subproject commit 0db8ee76a58e0ae759719450c1eb15a54831eb0a diff --git a/vendor/grammars/language-haskell b/vendor/grammars/language-haskell index f9a937ad28..d81dbcb6c4 160000 --- a/vendor/grammars/language-haskell +++ b/vendor/grammars/language-haskell @@ -1 +1 @@ -Subproject commit f9a937ad28411485e763f90e0d89e1cd3cc73c76 +Subproject commit d81dbcb6c4d7688489da16dbb4fc5b82449d896d diff --git a/vendor/grammars/language-javascript b/vendor/grammars/language-javascript index 245162fea4..4146e0f3a1 160000 --- a/vendor/grammars/language-javascript +++ b/vendor/grammars/language-javascript @@ -1 +1 @@ -Subproject commit 245162fea4db7c75bb9142a09fa95f4d52910cf7 +Subproject commit 4146e0f3a160fc3ac0b80714af144e9ca8ea5329 diff --git a/vendor/grammars/language-less b/vendor/grammars/language-less index c9abeea663..65152fe43b 160000 --- a/vendor/grammars/language-less +++ b/vendor/grammars/language-less @@ -1 +1 @@ -Subproject commit c9abeea6639da0d040855275f6b9220a5f4ea5ff +Subproject commit 65152fe43b33655d06a61bfcf2f47b857d0209f1 diff --git a/vendor/grammars/language-python b/vendor/grammars/language-python index ceb204c654..0bb1c44108 160000 --- a/vendor/grammars/language-python +++ b/vendor/grammars/language-python @@ -1 +1 @@ -Subproject commit ceb204c65436254c7aeea518645b12916d9cfb4a +Subproject commit 0bb1c4410883bccd38b179d46307bec547d762f4 diff --git a/vendor/grammars/language-regexp b/vendor/grammars/language-regexp index 9dc99a60ae..f7ad4626ad 160000 --- a/vendor/grammars/language-regexp +++ b/vendor/grammars/language-regexp @@ -1 +1 @@ -Subproject commit 9dc99a60ae07a8f8773527600c9ef9a6489a21c4 +Subproject commit f7ad4626adb046149df554e50623370df9c16e60 diff --git a/vendor/grammars/language-restructuredtext b/vendor/grammars/language-restructuredtext index 659de4b4cd..890840ff68 160000 --- a/vendor/grammars/language-restructuredtext +++ b/vendor/grammars/language-restructuredtext @@ -1 +1 @@ -Subproject commit 659de4b4cdc0e556276c2efddc8e4f2df07d9fe2 +Subproject commit 890840ff68dae987fc21360bc6159239e3b58f0e diff --git a/vendor/grammars/language-roff b/vendor/grammars/language-roff index e796cb463f..19e69fe42f 160000 --- a/vendor/grammars/language-roff +++ b/vendor/grammars/language-roff @@ -1 +1 @@ -Subproject commit e796cb463fe640d65b87186ba5d2d71407b4d6ad +Subproject commit 19e69fe42ffbb2b3adacf66aa02ee2488011ac81 diff --git a/vendor/grammars/language-turing b/vendor/grammars/language-turing index 5f1d5f2f1a..b96a299fca 160000 --- a/vendor/grammars/language-turing +++ b/vendor/grammars/language-turing @@ -1 +1 @@ -Subproject commit 5f1d5f2f1a47424113c92ca154b5de45b6f9200d +Subproject commit b96a299fca6c07572ee4fb6b2fad2a27bf339c78 diff --git a/vendor/grammars/language-yaml b/vendor/grammars/language-yaml index 252a0c19c6..c7fd9b4e8c 160000 --- a/vendor/grammars/language-yaml +++ b/vendor/grammars/language-yaml @@ -1 +1 @@ -Subproject commit 252a0c19c6098b5270af61b402fa0aa184b32d8d +Subproject commit c7fd9b4e8cec784afc731d95bf6d11ed7c6e9044 diff --git a/vendor/grammars/latex.tmbundle b/vendor/grammars/latex.tmbundle index 4f20bf6e8c..60f4ed80f3 160000 --- a/vendor/grammars/latex.tmbundle +++ b/vendor/grammars/latex.tmbundle @@ -1 +1 @@ -Subproject commit 4f20bf6e8c02799a66ce18945570077e0f7abcde +Subproject commit 60f4ed80f3cbb14b7fa5161f971f8e1d083734ee diff --git a/vendor/grammars/reason b/vendor/grammars/reason index f18549ccd3..3d25699411 160000 --- a/vendor/grammars/reason +++ b/vendor/grammars/reason @@ -1 +1 @@ -Subproject commit f18549ccd31053f71c40f0e0c9b605cadfc3c9c9 +Subproject commit 3d25699411f71e9449ba6efaf564037a898529df diff --git a/vendor/grammars/ruby-slim.tmbundle b/vendor/grammars/ruby-slim.tmbundle index 2016357d9c..3a58baeade 160000 --- a/vendor/grammars/ruby-slim.tmbundle +++ b/vendor/grammars/ruby-slim.tmbundle @@ -1 +1 @@ -Subproject commit 2016357d9ca16b8c3e8c2aa9ac0a48ed46f27adb +Subproject commit 3a58baeade2fdb203cd99fcf06b46d5a217484af diff --git a/vendor/grammars/sas.tmbundle b/vendor/grammars/sas.tmbundle index 776b54772b..8b31bfff7c 160000 --- a/vendor/grammars/sas.tmbundle +++ b/vendor/grammars/sas.tmbundle @@ -1 +1 @@ -Subproject commit 776b54772b27f6f30be714fbabf9eb9abba3d013 +Subproject commit 8b31bfff7c42cb5a77c1c7793d12222cb7c333b5 diff --git a/vendor/grammars/st2-zonefile b/vendor/grammars/st2-zonefile index 0d943fefb8..e394e03014 160000 --- a/vendor/grammars/st2-zonefile +++ b/vendor/grammars/st2-zonefile @@ -1 +1 @@ -Subproject commit 0d943fefb815262804f0ae309b08221f34eda054 +Subproject commit e394e030141bc2f8886a3d6bfab2eef4e3567d04 diff --git a/vendor/grammars/sublime_cobol b/vendor/grammars/sublime_cobol index 7c60c10849..f3b7e4e6b9 160000 --- a/vendor/grammars/sublime_cobol +++ b/vendor/grammars/sublime_cobol @@ -1 +1 @@ -Subproject commit 7c60c10849c45a55203b352dcf0b212113a61caf +Subproject commit f3b7e4e6b9d62c221e7e3264ed58b2d829c5bf8b From 4e2eba4ef8d4cae1fe96a3f0dffec6a84effa3da Mon Sep 17 00:00:00 2001 From: Brandon Black Date: Wed, 15 Feb 2017 12:48:45 -0800 Subject: [PATCH 0249/1214] Revert "Release v5.0.5" (#3477) --- github-linguist.gemspec | 2 +- grammars.yml | 3 +-- lib/linguist/version.rb | 2 +- vendor/CodeMirror | 2 +- vendor/grammars/Handlebars | 2 +- vendor/grammars/MagicPython | 2 +- vendor/grammars/SublimeClarion | 2 +- vendor/grammars/SublimePapyrus | 2 +- vendor/grammars/atom-fsharp | 2 +- vendor/grammars/atom-language-perl6 | 2 +- vendor/grammars/atom-language-rust | 2 +- vendor/grammars/elixir-tmbundle | 2 +- vendor/grammars/haxe-sublime-bundle | 2 +- vendor/grammars/idris | 2 +- vendor/grammars/kotlin-sublime-package | 2 +- vendor/grammars/language-blade | 2 +- vendor/grammars/language-click | 2 +- vendor/grammars/language-clojure | 2 +- vendor/grammars/language-coffee-script | 2 +- vendor/grammars/language-csound | 2 +- vendor/grammars/language-haskell | 2 +- vendor/grammars/language-javascript | 2 +- vendor/grammars/language-less | 2 +- vendor/grammars/language-python | 2 +- vendor/grammars/language-regexp | 2 +- vendor/grammars/language-restructuredtext | 2 +- vendor/grammars/language-roff | 2 +- vendor/grammars/language-turing | 2 +- vendor/grammars/language-yaml | 2 +- vendor/grammars/latex.tmbundle | 2 +- vendor/grammars/reason | 2 +- vendor/grammars/ruby-slim.tmbundle | 2 +- vendor/grammars/sas.tmbundle | 2 +- vendor/grammars/st2-zonefile | 2 +- vendor/grammars/sublime_cobol | 2 +- 35 files changed, 35 insertions(+), 36 deletions(-) diff --git a/github-linguist.gemspec b/github-linguist.gemspec index d6c62dc968..183d0fb884 100644 --- a/github-linguist.gemspec +++ b/github-linguist.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |s| s.add_dependency 'charlock_holmes', '~> 0.7.3' s.add_dependency 'escape_utils', '~> 1.1.0' s.add_dependency 'mime-types', '>= 1.19' - s.add_dependency 'rugged', '>= 0.25.1.1' + s.add_dependency 'rugged', '0.25.1.1' s.add_development_dependency 'minitest', '>= 5.0' s.add_development_dependency 'mocha' diff --git a/grammars.yml b/grammars.yml index 6dd0bc4de5..217eefad57 100755 --- a/grammars.yml +++ b/grammars.yml @@ -417,14 +417,13 @@ vendor/grammars/language-python: - text.python.traceback vendor/grammars/language-regexp: - source.regexp +- source.regexp.comment - source.regexp.extended vendor/grammars/language-renpy: - source.renpy vendor/grammars/language-restructuredtext: - text.restructuredtext vendor/grammars/language-roff: -- source.ditroff -- source.ditroff.desc - source.ideal - source.pic - text.roff diff --git a/lib/linguist/version.rb b/lib/linguist/version.rb index 398ea1395c..d0ebf10085 100644 --- a/lib/linguist/version.rb +++ b/lib/linguist/version.rb @@ -1,3 +1,3 @@ module Linguist - VERSION = "5.0.5" + VERSION = "5.0.4" end diff --git a/vendor/CodeMirror b/vendor/CodeMirror index 459873b5c1..268cf99055 160000 --- a/vendor/CodeMirror +++ b/vendor/CodeMirror @@ -1 +1 @@ -Subproject commit 459873b5c1807527314706c03580ec06515e8d1e +Subproject commit 268cf9905509b87de33a00342ee1cce9a1bdc5cd diff --git a/vendor/grammars/Handlebars b/vendor/grammars/Handlebars index 63c28f7aa9..ed851e0c67 160000 --- a/vendor/grammars/Handlebars +++ b/vendor/grammars/Handlebars @@ -1 +1 @@ -Subproject commit 63c28f7aa9360681451779164f40d80f2e70a9cc +Subproject commit ed851e0c67c2b674b6ca00c49414544aebbfbc07 diff --git a/vendor/grammars/MagicPython b/vendor/grammars/MagicPython index 18de6108ce..b7d7f9d007 160000 --- a/vendor/grammars/MagicPython +++ b/vendor/grammars/MagicPython @@ -1 +1 @@ -Subproject commit 18de6108ce2d2520c77958db312d31a78777139b +Subproject commit b7d7f9d00765e1aaa6a1c9c6f28846245ee2f9ae diff --git a/vendor/grammars/SublimeClarion b/vendor/grammars/SublimeClarion index 750afa2b2a..5823e7f447 160000 --- a/vendor/grammars/SublimeClarion +++ b/vendor/grammars/SublimeClarion @@ -1 +1 @@ -Subproject commit 750afa2b2a5dd99b1c128183bf368c86f9a0b9c5 +Subproject commit 5823e7f44704eabb08673a7e32b48836141a1f8e diff --git a/vendor/grammars/SublimePapyrus b/vendor/grammars/SublimePapyrus index a98c42007c..b87e7c5238 160000 --- a/vendor/grammars/SublimePapyrus +++ b/vendor/grammars/SublimePapyrus @@ -1 +1 @@ -Subproject commit a98c42007caf01e47ad3a16ae8d8dcf7dea39ef2 +Subproject commit b87e7c5238c2c93c6815bd39cf7689916c5a6536 diff --git a/vendor/grammars/atom-fsharp b/vendor/grammars/atom-fsharp index c875802334..4f9d5510f3 160000 --- a/vendor/grammars/atom-fsharp +++ b/vendor/grammars/atom-fsharp @@ -1 +1 @@ -Subproject commit c875802334ce03cd027a4127f8e6c974568ccc79 +Subproject commit 4f9d5510f3b78885b5a248277c1e6f16be18bc96 diff --git a/vendor/grammars/atom-language-perl6 b/vendor/grammars/atom-language-perl6 index c264a41233..519adffd86 160000 --- a/vendor/grammars/atom-language-perl6 +++ b/vendor/grammars/atom-language-perl6 @@ -1 +1 @@ -Subproject commit c264a41233b6e60bbf668ac7838a46eb5631f368 +Subproject commit 519adffd86e70d3bf1fa42953c6c5aa46c9a49d8 diff --git a/vendor/grammars/atom-language-rust b/vendor/grammars/atom-language-rust index 05552e6045..092cc6a8a0 160000 --- a/vendor/grammars/atom-language-rust +++ b/vendor/grammars/atom-language-rust @@ -1 +1 @@ -Subproject commit 05552e60458e0fc507d2da772c699a0645b6a466 +Subproject commit 092cc6a8a085ef1b28141d7aa7c0c242f3024c3a diff --git a/vendor/grammars/elixir-tmbundle b/vendor/grammars/elixir-tmbundle index 90a41b6a23..50846fe555 160000 --- a/vendor/grammars/elixir-tmbundle +++ b/vendor/grammars/elixir-tmbundle @@ -1 +1 @@ -Subproject commit 90a41b6a23248f6542fbc684314b5799585b3a82 +Subproject commit 50846fe55547054c960c62fa2d63c0a1b85e7e57 diff --git a/vendor/grammars/haxe-sublime-bundle b/vendor/grammars/haxe-sublime-bundle index b6bbf48404..e9559a2c53 160000 --- a/vendor/grammars/haxe-sublime-bundle +++ b/vendor/grammars/haxe-sublime-bundle @@ -1 +1 @@ -Subproject commit b6bbf484042552e5b921232cc944633a8454809a +Subproject commit e9559a2c538c83d5dca09e410915834e9bdcd3cb diff --git a/vendor/grammars/idris b/vendor/grammars/idris index 56fe4d65a6..1089032af6 160000 --- a/vendor/grammars/idris +++ b/vendor/grammars/idris @@ -1 +1 @@ -Subproject commit 56fe4d65a6b30130658a3f07d1898a873e5a9785 +Subproject commit 1089032af66874410fb4c2fbe8a1f73806181cfe diff --git a/vendor/grammars/kotlin-sublime-package b/vendor/grammars/kotlin-sublime-package index 02d76dd8eb..535967fd2c 160000 --- a/vendor/grammars/kotlin-sublime-package +++ b/vendor/grammars/kotlin-sublime-package @@ -1 +1 @@ -Subproject commit 02d76dd8eb687bbf0ff0894404e72ff7315b69a4 +Subproject commit 535967fd2c53d299289d3b045097ea08dbe9764f diff --git a/vendor/grammars/language-blade b/vendor/grammars/language-blade index 4b09ca3be5..0282a2c5aa 160000 --- a/vendor/grammars/language-blade +++ b/vendor/grammars/language-blade @@ -1 +1 @@ -Subproject commit 4b09ca3be5879322222e679199a80ccc3097b440 +Subproject commit 0282a2c5aa27d7288b0aa679c5accc52fc977794 diff --git a/vendor/grammars/language-click b/vendor/grammars/language-click index 104f915f62..1ee1fe012b 160000 --- a/vendor/grammars/language-click +++ b/vendor/grammars/language-click @@ -1 +1 @@ -Subproject commit 104f915f6228fb04ac9301993227b4649dc71eef +Subproject commit 1ee1fe012be44973488d9f6666376ab72dbb024a diff --git a/vendor/grammars/language-clojure b/vendor/grammars/language-clojure index e29ea56ba0..5747bb28c2 160000 --- a/vendor/grammars/language-clojure +++ b/vendor/grammars/language-clojure @@ -1 +1 @@ -Subproject commit e29ea56ba0bfe43a02081295568c00d3adc70c6a +Subproject commit 5747bb28c2d12a246180824d8f851f2aec719d32 diff --git a/vendor/grammars/language-coffee-script b/vendor/grammars/language-coffee-script index 6f5f2202df..dade09261c 160000 --- a/vendor/grammars/language-coffee-script +++ b/vendor/grammars/language-coffee-script @@ -1 +1 @@ -Subproject commit 6f5f2202dfd17c3106f1a5b25bb59927a847d606 +Subproject commit dade09261c20c35a2f6c8880658bc1bf58a2b42b diff --git a/vendor/grammars/language-csound b/vendor/grammars/language-csound index 0db8ee76a5..c1c5b4db72 160000 --- a/vendor/grammars/language-csound +++ b/vendor/grammars/language-csound @@ -1 +1 @@ -Subproject commit 0db8ee76a58e0ae759719450c1eb15a54831eb0a +Subproject commit c1c5b4db72e808cb6b1f77a1e6bd09c203140086 diff --git a/vendor/grammars/language-haskell b/vendor/grammars/language-haskell index d81dbcb6c4..f9a937ad28 160000 --- a/vendor/grammars/language-haskell +++ b/vendor/grammars/language-haskell @@ -1 +1 @@ -Subproject commit d81dbcb6c4d7688489da16dbb4fc5b82449d896d +Subproject commit f9a937ad28411485e763f90e0d89e1cd3cc73c76 diff --git a/vendor/grammars/language-javascript b/vendor/grammars/language-javascript index 4146e0f3a1..245162fea4 160000 --- a/vendor/grammars/language-javascript +++ b/vendor/grammars/language-javascript @@ -1 +1 @@ -Subproject commit 4146e0f3a160fc3ac0b80714af144e9ca8ea5329 +Subproject commit 245162fea4db7c75bb9142a09fa95f4d52910cf7 diff --git a/vendor/grammars/language-less b/vendor/grammars/language-less index 65152fe43b..c9abeea663 160000 --- a/vendor/grammars/language-less +++ b/vendor/grammars/language-less @@ -1 +1 @@ -Subproject commit 65152fe43b33655d06a61bfcf2f47b857d0209f1 +Subproject commit c9abeea6639da0d040855275f6b9220a5f4ea5ff diff --git a/vendor/grammars/language-python b/vendor/grammars/language-python index 0bb1c44108..ceb204c654 160000 --- a/vendor/grammars/language-python +++ b/vendor/grammars/language-python @@ -1 +1 @@ -Subproject commit 0bb1c4410883bccd38b179d46307bec547d762f4 +Subproject commit ceb204c65436254c7aeea518645b12916d9cfb4a diff --git a/vendor/grammars/language-regexp b/vendor/grammars/language-regexp index f7ad4626ad..9dc99a60ae 160000 --- a/vendor/grammars/language-regexp +++ b/vendor/grammars/language-regexp @@ -1 +1 @@ -Subproject commit f7ad4626adb046149df554e50623370df9c16e60 +Subproject commit 9dc99a60ae07a8f8773527600c9ef9a6489a21c4 diff --git a/vendor/grammars/language-restructuredtext b/vendor/grammars/language-restructuredtext index 890840ff68..659de4b4cd 160000 --- a/vendor/grammars/language-restructuredtext +++ b/vendor/grammars/language-restructuredtext @@ -1 +1 @@ -Subproject commit 890840ff68dae987fc21360bc6159239e3b58f0e +Subproject commit 659de4b4cdc0e556276c2efddc8e4f2df07d9fe2 diff --git a/vendor/grammars/language-roff b/vendor/grammars/language-roff index 19e69fe42f..e796cb463f 160000 --- a/vendor/grammars/language-roff +++ b/vendor/grammars/language-roff @@ -1 +1 @@ -Subproject commit 19e69fe42ffbb2b3adacf66aa02ee2488011ac81 +Subproject commit e796cb463fe640d65b87186ba5d2d71407b4d6ad diff --git a/vendor/grammars/language-turing b/vendor/grammars/language-turing index b96a299fca..5f1d5f2f1a 160000 --- a/vendor/grammars/language-turing +++ b/vendor/grammars/language-turing @@ -1 +1 @@ -Subproject commit b96a299fca6c07572ee4fb6b2fad2a27bf339c78 +Subproject commit 5f1d5f2f1a47424113c92ca154b5de45b6f9200d diff --git a/vendor/grammars/language-yaml b/vendor/grammars/language-yaml index c7fd9b4e8c..252a0c19c6 160000 --- a/vendor/grammars/language-yaml +++ b/vendor/grammars/language-yaml @@ -1 +1 @@ -Subproject commit c7fd9b4e8cec784afc731d95bf6d11ed7c6e9044 +Subproject commit 252a0c19c6098b5270af61b402fa0aa184b32d8d diff --git a/vendor/grammars/latex.tmbundle b/vendor/grammars/latex.tmbundle index 60f4ed80f3..4f20bf6e8c 160000 --- a/vendor/grammars/latex.tmbundle +++ b/vendor/grammars/latex.tmbundle @@ -1 +1 @@ -Subproject commit 60f4ed80f3cbb14b7fa5161f971f8e1d083734ee +Subproject commit 4f20bf6e8c02799a66ce18945570077e0f7abcde diff --git a/vendor/grammars/reason b/vendor/grammars/reason index 3d25699411..f18549ccd3 160000 --- a/vendor/grammars/reason +++ b/vendor/grammars/reason @@ -1 +1 @@ -Subproject commit 3d25699411f71e9449ba6efaf564037a898529df +Subproject commit f18549ccd31053f71c40f0e0c9b605cadfc3c9c9 diff --git a/vendor/grammars/ruby-slim.tmbundle b/vendor/grammars/ruby-slim.tmbundle index 3a58baeade..2016357d9c 160000 --- a/vendor/grammars/ruby-slim.tmbundle +++ b/vendor/grammars/ruby-slim.tmbundle @@ -1 +1 @@ -Subproject commit 3a58baeade2fdb203cd99fcf06b46d5a217484af +Subproject commit 2016357d9ca16b8c3e8c2aa9ac0a48ed46f27adb diff --git a/vendor/grammars/sas.tmbundle b/vendor/grammars/sas.tmbundle index 8b31bfff7c..776b54772b 160000 --- a/vendor/grammars/sas.tmbundle +++ b/vendor/grammars/sas.tmbundle @@ -1 +1 @@ -Subproject commit 8b31bfff7c42cb5a77c1c7793d12222cb7c333b5 +Subproject commit 776b54772b27f6f30be714fbabf9eb9abba3d013 diff --git a/vendor/grammars/st2-zonefile b/vendor/grammars/st2-zonefile index e394e03014..0d943fefb8 160000 --- a/vendor/grammars/st2-zonefile +++ b/vendor/grammars/st2-zonefile @@ -1 +1 @@ -Subproject commit e394e030141bc2f8886a3d6bfab2eef4e3567d04 +Subproject commit 0d943fefb815262804f0ae309b08221f34eda054 diff --git a/vendor/grammars/sublime_cobol b/vendor/grammars/sublime_cobol index f3b7e4e6b9..7c60c10849 160000 --- a/vendor/grammars/sublime_cobol +++ b/vendor/grammars/sublime_cobol @@ -1 +1 @@ -Subproject commit f3b7e4e6b9d62c221e7e3264ed58b2d829c5bf8b +Subproject commit 7c60c10849c45a55203b352dcf0b212113a61caf From 72bec1fddc9a1d1bcfb61c0fc9fc1c11b3eb25d5 Mon Sep 17 00:00:00 2001 From: Phineas Date: Wed, 15 Feb 2017 22:11:13 +0000 Subject: [PATCH 0250/1214] Update LICENSE Copyright Date to 2017 (#3476) --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index ca0844d16c..9a0376abda 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2011-2016 GitHub, Inc. +Copyright (c) 2011-2017 GitHub, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation From 94367cc460d32dfa315236daca0490ae5e4cae1b Mon Sep 17 00:00:00 2001 From: Brandon Black Date: Wed, 15 Feb 2017 14:11:37 -0800 Subject: [PATCH 0251/1214] Update LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 9a0376abda..acc8e6f251 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2011-2017 GitHub, Inc. +Copyright (c) 2017 GitHub, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation From f7fe1fee6666ecfaf25cee75094a8d6d31ee84cd Mon Sep 17 00:00:00 2001 From: Brandon Black Date: Wed, 15 Feb 2017 21:29:04 -0800 Subject: [PATCH 0252/1214] Release v5.0.5 -- part Deux (#3479) * bumping to v5.0.5 * relaxing rugged version requirement --- github-linguist.gemspec | 2 +- lib/linguist/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/github-linguist.gemspec b/github-linguist.gemspec index 183d0fb884..9da23a157a 100644 --- a/github-linguist.gemspec +++ b/github-linguist.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |s| s.add_dependency 'charlock_holmes', '~> 0.7.3' s.add_dependency 'escape_utils', '~> 1.1.0' s.add_dependency 'mime-types', '>= 1.19' - s.add_dependency 'rugged', '0.25.1.1' + s.add_dependency 'rugged', '>= 0.25.1' s.add_development_dependency 'minitest', '>= 5.0' s.add_development_dependency 'mocha' diff --git a/lib/linguist/version.rb b/lib/linguist/version.rb index d0ebf10085..398ea1395c 100644 --- a/lib/linguist/version.rb +++ b/lib/linguist/version.rb @@ -1,3 +1,3 @@ module Linguist - VERSION = "5.0.4" + VERSION = "5.0.5" end From b66fcb252908fc489a700793291e216705b55664 Mon Sep 17 00:00:00 2001 From: Alex Louden Date: Mon, 20 Feb 2017 18:09:59 +0800 Subject: [PATCH 0253/1214] Improve Terraform (.tf) / HCL (.hcl) syntax highlighting (#3392) * Add Terraform grammar, and change .tf and .hcl files from using Ruby to Terraform sublime syntax * Expand Terraform sample to demonstrate more language features * Revert terraform sample change * Add terraform sample - Dokku AWS deploy * Updated to latest Terraform * Update terraform string interpolation * Update terraform to latest --- .gitmodules | 3 + grammars.yml | 2 + lib/linguist/languages.yml | 2 +- samples/HCL/main.tf | 135 ++++++++++++++++++ vendor/README.md | 2 +- vendor/grammars/Terraform.tmLanguage | 1 + .../licenses/grammar/Terraform.tmLanguage.txt | 26 ++++ 7 files changed, 169 insertions(+), 2 deletions(-) create mode 100644 samples/HCL/main.tf create mode 160000 vendor/grammars/Terraform.tmLanguage create mode 100644 vendor/licenses/grammar/Terraform.tmLanguage.txt diff --git a/.gitmodules b/.gitmodules index 14461012b1..720575dbcc 100644 --- a/.gitmodules +++ b/.gitmodules @@ -818,3 +818,6 @@ [submodule "vendor/grammars/language-regexp"] path = vendor/grammars/language-regexp url = https://github.com/Alhadis/language-regexp +[submodule "vendor/grammars/Terraform.tmLanguage"] + path = vendor/grammars/Terraform.tmLanguage + url = https://github.com/alexlouden/Terraform.tmLanguage \ No newline at end of file diff --git a/grammars.yml b/grammars.yml index 217eefad57..74165002cb 100755 --- a/grammars.yml +++ b/grammars.yml @@ -130,6 +130,8 @@ vendor/grammars/TLA: - source.tla vendor/grammars/TXL: - source.txl +vendor/grammars/Terraform.tmLanguage: +- source.terraform vendor/grammars/Textmate-Gosu-Bundle: - source.gosu.2 vendor/grammars/UrWeb-Language-Definition: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index a86c8a310c..b61ec12193 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1588,7 +1588,7 @@ HCL: ace_mode: ruby codemirror_mode: ruby codemirror_mime_type: text/x-ruby - tm_scope: source.ruby + tm_scope: source.terraform language_id: 144 HLSL: type: programming diff --git a/samples/HCL/main.tf b/samples/HCL/main.tf new file mode 100644 index 0000000000..66db9807ec --- /dev/null +++ b/samples/HCL/main.tf @@ -0,0 +1,135 @@ +resource "aws_security_group" "elb_sec_group" { + description = "Allow traffic from the internet to ELB port 80" + vpc_id = "${var.vpc_id}" + + ingress { + from_port = 80 + to_port = 80 + protocol = "tcp" + cidr_blocks = ["${split(",", var.allowed_cidr_blocks)}"] + } + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } +} + +resource "aws_security_group" "dokku_allow_ssh_from_internal" { + description = "Allow git access over ssh from the private subnet" + vpc_id = "${var.vpc_id}" + + ingress { + from_port = 22 + to_port = 22 + protocol = "tcp" + cidr_blocks = ["${var.private_subnet_cidr}"] + } + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } +} + +resource "aws_security_group" "allow_from_elb_to_instance" { + description = "Allow traffic from the ELB to the private instance" + vpc_id = "${var.vpc_id}" + + ingress { + security_groups = ["${aws_security_group.elb_sec_group.id}"] + from_port = 80 + to_port = 80 + protocol = "tcp" + } + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } +} + +resource "aws_instance" "dokku" { + ami = "ami-47a23a30" + instance_type = "${var.instance_type}" + associate_public_ip_address = false + key_name = "${var.key_name}" + subnet_id = "${var.private_subnet_id}" + vpc_security_group_ids = [ + "${var.bastion_sec_group_id}", + "${aws_security_group.allow_from_elb_to_instance.id}", + "${aws_security_group.dokku_allow_ssh_from_internal.id}" + ] + tags { + Name = "${var.name}" + } + connection { + user = "ubuntu" + private_key = "${var.private_key}" + bastion_host = "${var.bastion_host}" + bastion_port = "${var.bastion_port}" + bastion_user = "${var.bastion_user}" + bastion_private_key = "${var.bastion_private_key}" + } + provisioner "file" { + source = "${path.module}/../scripts/install-dokku.sh" + destination = "/home/ubuntu/install-dokku.sh" + } + provisioner "remote-exec" { + inline = [ + "chmod +x /home/ubuntu/install-dokku.sh", + "HOSTNAME=${var.hostname} /home/ubuntu/install-dokku.sh" + ] + } +} + +resource "aws_elb" "elb_dokku" { + name = "elb-dokku-${var.name}" + subnets = ["${var.public_subnet_id}"] + security_groups = ["${aws_security_group.elb_sec_group.id}"] + + listener { + instance_port = 80 + instance_protocol = "http" + lb_port = 80 + lb_protocol = "http" + } + + health_check { + healthy_threshold = 2 + unhealthy_threshold = 2 + timeout = 3 + target = "HTTP:80/" + interval = 30 + } + + instances = ["${aws_instance.dokku.id}"] + cross_zone_load_balancing = false + idle_timeout = 400 + + tags { + Name = "elb-dokku-${var.name}" + } +} + +resource "aws_route53_record" "dokku-deploy" { + zone_id = "${var.zone_id}" + name = "deploy.${var.hostname}" + type = "A" + ttl = "300" + records = ["${aws_instance.dokku.private_ip}"] +} + +resource "aws_route53_record" "dokku-wildcard" { + zone_id = "${var.zone_id}" + name = "*.${var.hostname}" + type = "CNAME" + ttl = "300" + records = ["${aws_elb.elb_dokku.dns_name}"] +} \ No newline at end of file diff --git a/vendor/README.md b/vendor/README.md index 359a9b148a..6df5654071 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -142,7 +142,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting - **Harbour:** [hernad/atom-language-harbour](https://github.com/hernad/atom-language-harbour) - **Haskell:** [atom-haskell/language-haskell](https://github.com/atom-haskell/language-haskell) - **Haxe:** [clemos/haxe-sublime-bundle](https://github.com/clemos/haxe-sublime-bundle) -- **HCL:** [aroben/ruby.tmbundle](https://github.com/aroben/ruby.tmbundle) +- **HCL:** [alexlouden/Terraform.tmLanguage](https://github.com/alexlouden/Terraform.tmLanguage) - **HTML:** [textmate/html.tmbundle](https://github.com/textmate/html.tmbundle) - **HTML+Django:** [textmate/python-django.tmbundle](https://github.com/textmate/python-django.tmbundle) - **HTML+ECR:** [atom-crystal/language-crystal](https://github.com/atom-crystal/language-crystal) diff --git a/vendor/grammars/Terraform.tmLanguage b/vendor/grammars/Terraform.tmLanguage new file mode 160000 index 0000000000..93b11ff8ab --- /dev/null +++ b/vendor/grammars/Terraform.tmLanguage @@ -0,0 +1 @@ +Subproject commit 93b11ff8abc164b0f61113bed1300c5d68f0c399 diff --git a/vendor/licenses/grammar/Terraform.tmLanguage.txt b/vendor/licenses/grammar/Terraform.tmLanguage.txt new file mode 100644 index 0000000000..ec7baf8b0d --- /dev/null +++ b/vendor/licenses/grammar/Terraform.tmLanguage.txt @@ -0,0 +1,26 @@ +--- +type: grammar +name: Terraform.tmLanguage +license: mit +--- +MIT License + +Copyright (c) 2016 Alex Louden + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file From f1be771611c6bd7983ea2b16c2cb4ecc7c4f55fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eloy=20Dur=C3=A1n?= Date: Mon, 20 Feb 2017 11:17:18 +0100 Subject: [PATCH 0254/1214] Disambiguate TypeScript with `tsx` extension. (#3464) Using the technique as discussed in #2761. --- lib/linguist/heuristics.rb | 8 + samples/TypeScript/import.tsx | 384 ++++++++ samples/TypeScript/react-native.tsx | 366 ++++++++ samples/TypeScript/require.tsx | 240 +++++ samples/TypeScript/triple-slash-reference.tsx | 863 ++++++++++++++++++ .../TypeScript/tsxAttributeResolution9.tsx | 27 - test/test_heuristics.rb | 7 + 7 files changed, 1868 insertions(+), 27 deletions(-) create mode 100644 samples/TypeScript/import.tsx create mode 100644 samples/TypeScript/react-native.tsx create mode 100644 samples/TypeScript/require.tsx create mode 100644 samples/TypeScript/triple-slash-reference.tsx delete mode 100644 samples/TypeScript/tsxAttributeResolution9.tsx diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index 514ddb8a1c..ab8c4599d1 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -465,5 +465,13 @@ def call(data) Language["Scilab"] end end + + disambiguate ".tsx" do |data| + if /^\s*(import.+(from\s+|require\()['"]react|\/\/\/\s* Promise + selectExample: (selectedExample: Example) => any + gettingStartedState: GettingStartedState +} + +interface State { + mouseOver: boolean +} + +class PlaygroundCPopup extends React.Component { + + state = { + mouseOver: false, + } + + refs: { + [key: string]: any + exampleAnchor: HTMLDivElement + congratsAnchor: HTMLDivElement + scroller: HTMLDivElement, + } + + componentDidUpdate(prevProps: Props, prevState: State) { + if (prevProps.gettingStartedState.selectedExample !== this.props.gettingStartedState.selectedExample) { + this.refs.scroller.scrollTop += this.refs.exampleAnchor.getBoundingClientRect().top + } + + if (prevProps.gettingStartedState.isCurrentStep('STEP5_WAITING') + && this.props.gettingStartedState.isCurrentStep('STEP5_DONE')) { + this.refs.scroller.scrollTop += this.refs.congratsAnchor.getBoundingClientRect().top + + const snd = new Audio(require('../../../assets/success.mp3') as string) + snd.volume = 0.5 + snd.play() + } + } + + render() { + const {mouseOver} = this.state + const {selectedExample} = this.props.gettingStartedState + const hovering = !this.props.gettingStartedState.isCurrentStep('STEP4_CLICK_TEASER_STEP5') + const downloadUrl = (example) => `${__BACKEND_ADDR__}/resources/getting-started-example?repository=${examples[example].path}&project_id=${this.props.projectId}&user=graphcool-examples` // tslint:disable-line + return ( +

+
+
this.setState({ mouseOver: false })} + onMouseEnter={() => { + this.setState({ mouseOver: true }) + }} + onMouseOver={(e: any) => { + if (this.props.gettingStartedState.isCurrentStep('STEP4_CLICK_TEASER_STEP5')) { + this.props.nextStep() + } + }} + > +
+
+ You did it! Time to run an example. +
+
+ You have successfully set up your own Instagram backend.{' '} + When building an app with Graphcool you can easily explore queries in the{' '} + playground and "copy & paste" selected queries into your code.{' '} + Of course, to do so, you need to implement the frontend first. +
+
+
We put together a simple app to show and add posts
+
using the backend you just built, to test and run it locally.
+
+
+
+
+ Select your preferred technology to download the example. +
+
+
this.props.selectExample('ReactRelay')} + > + React + Relay +
+
this.props.selectExample('ReactApollo')} + > + React + Apollo +
+
this.props.selectExample('ReactNativeApollo')} + > + React Native + Apollo +
+
this.props.selectExample('AngularApollo')} + > + Angular + Apollo +
+
+
+ {selectedExample && +
+
+

: "⸙" U2E19 # PALM BRANCH + : "⸙" U2E19 # PALM BRANCH + + + : "ff" UFB00 # LATIN SMALL LIGATURE FF + : "fi" UFB01 # LATIN SMALL LIGATURE FI + : "ffi" UFB03 # LATIN SMALL LIGATURE FFI + : "fl" UFB02 # LATIN SMALL LIGATURE FL + : "ffl" UFB04 # LATIN SMALL LIGATURE FFL + : "st" UFB06 # LATIN SMALL LIGATURE ST + : "ſt" UFB05 # LATIN SMALL LIGATURE LONG S T +# allow me still to use my ſ key, okay? + : "ſt" UFB05 # LATIN SMALL LIGATURE LONG S T +# ß is already available as I think. But now it comes in industrial size! + : "ẞ" U1E9E # LATIN CAPITAL LETTER SHARP S + +# Eventually we'll have to look over the really crazy-cakes Latin letters +# they're adding as "mediævalist extensions" +# ꜢꜣꜤꜥ for the Egyptologists, Ꝏꝏ because they're cꝏl... Maybe some others. +# Can't do for ꝏ though, since that's already °. +# Epigraphics should not be missed: + : "ꟻ" UA7FB # LATIN EPIGRAPHIC LETTER REVERSED F +