From c462c2bd3181c78289bfb95e89659255b888f127 Mon Sep 17 00:00:00 2001 From: E Date: Thu, 1 Oct 2015 13:59:52 -0700 Subject: [PATCH 01/13] add FreeMarker to languages.yml --- lib/linguist/languages.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 0de559ee..945479fb 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1036,6 +1036,18 @@ Frege: - .fr tm_scope: source.haskell ace_mode: haskell + +FreeMarker: + type: programming + color: "#0050b2" + group: Java + search_term: ftl + aliases: + - ftl + extensions: + - .ftl + tm_scope: text.html.ftl + ace_mode: ftl G-code: type: data From acfad4371f97449d8a368b353ff0063583906cb9 Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Wed, 7 Oct 2015 19:41:37 -0400 Subject: [PATCH 02/13] Mention alphabetical order in contributing docs Closes #2649 --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1d358957..56ef275f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,7 +12,7 @@ We try only to add new extensions once they have some usage on GitHub. In most c To add support for a new extension: -0. Add your extension to the language entry in [`languages.yml`][languages]. +0. Add your extension to the language entry in [`languages.yml`][languages], keeping the extensions in alphabetical order. 0. Add at least one sample for your extension 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. From 37840856ed2bf7eb214c243a1cd442a5f808346b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20B?= Date: Fri, 9 Oct 2015 14:43:22 +0200 Subject: [PATCH 03/13] Add .phps extension for PHP .phps stands for "PHP Source" Useful to show examples of PHP code. A properly-configured server will output a .phps file as is, with color-formated source code instead of the HTML that would normally be generated. Usage in GitHub: https://github.com/search?utf8=%E2%9C%93&q=extension%3Aphps+NOT+nothack& type=Code Example taken from: https://github.com/PHPMailer/PHPMailer/blob/master/examples/mail.phps --- lib/linguist/languages.yml | 1 + samples/PHP/mail.phps | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 samples/PHP/mail.phps diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index d7a3a18b..420965c4 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2441,6 +2441,7 @@ PHP: - .php3 - .php4 - .php5 + - .phps - .phpt filenames: - Phakefile diff --git a/samples/PHP/mail.phps b/samples/PHP/mail.phps new file mode 100644 index 00000000..8e129f47 --- /dev/null +++ b/samples/PHP/mail.phps @@ -0,0 +1,31 @@ +setFrom('from@example.com', 'First Last'); +//Set an alternative reply-to address +$mail->addReplyTo('replyto@example.com', 'First Last'); +//Set who the message is to be sent to +$mail->addAddress('whoto@example.com', 'John Doe'); +//Set the subject line +$mail->Subject = 'PHPMailer mail() test'; +//Read an HTML message body from an external file, convert referenced images to embedded, +//convert HTML into a basic plain-text alternative body +$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); +//Replace the plain text body with one created manually +$mail->AltBody = 'This is a plain-text message body'; +//Attach an image file +$mail->addAttachment('images/phpmailer_mini.png'); + +//send the message, check for errors +if (!$mail->send()) { + echo "Mailer Error: " . $mail->ErrorInfo; +} else { + echo "Message sent!"; +} From b34acac7220722f128c96b3b75a73c57e9724d59 Mon Sep 17 00:00:00 2001 From: Jeff Kreeftmeijer Date: Sat, 10 Oct 2015 00:10:37 +0200 Subject: [PATCH 04/13] Add EEx (Embedded Elixir) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit EEx is embedded Elixir: http://elixir-lang.org/docs/v1.0/eex/. Here's some in-the-wild usage on Github: https://github.com/search?p=100&q=extension%3Aeex+NOT+nothack&ref=searchresults&type=Code&utf8=✓ This uses the "html_elixir" Ace mode, which was added in this pull request on the Ace project: https://github.com/ajaxorg/ace/pull/2696 --- grammars.yml | 1 + lib/linguist/languages.yml | 10 ++++++++++ samples/HTML+EEX/index.html.erb | 26 ++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 samples/HTML+EEX/index.html.erb diff --git a/grammars.yml b/grammars.yml index 4bd66f12..a56548e3 100644 --- a/grammars.yml +++ b/grammars.yml @@ -248,6 +248,7 @@ vendor/grammars/elixir-tmbundle: - source.elixir - text.elixir - text.html.elixir +- text.html.eex vendor/grammars/erlang.tmbundle: - source.erlang - text.html.erlang.yaws diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index d7a3a18b..9c25bd82 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1323,6 +1323,16 @@ HTML+Django: - htmldjango ace_mode: django +HTML+EEX: + type: markup + tm_scope: text.html.eex + group: HTML + aliases: + - eex + extensions: + - .eex + ace_mode: html_eex + HTML+ERB: type: markup tm_scope: text.html.erb diff --git a/samples/HTML+EEX/index.html.erb b/samples/HTML+EEX/index.html.erb new file mode 100644 index 00000000..5960a441 --- /dev/null +++ b/samples/HTML+EEX/index.html.erb @@ -0,0 +1,26 @@ +

Listing Books

+ + + + + + + + + + +<%= for book <- @books do %> + + <%# comment %> + + + + + + +<% end %> +
TitleSummary
<%= book.title %><%= book.content %><%= link "Show", to: book_path(@conn, :show, book) %><%= link "Edit", to: book_path(@conn, :edit, book) %><%= link "Delete", to: book_path(@conn, :delete, book), method: :delete, data: [confirm: "Are you sure?"] %>
+ +
+ +<%= link "New book", to: book_path(@conn, :new) %> From 5ff580df0af2ebf38b5485a24eef69dae0b5aa87 Mon Sep 17 00:00:00 2001 From: Jared Kuolt Date: Fri, 9 Oct 2015 16:20:59 -0700 Subject: [PATCH 05/13] Support for files generated by Racc. This changeset includes a sample racc file from [this auto-generated file](https://github.com/tenderlove/rjson/blob/44e9bf0440508b78b2bc3376da22df11abbb5483/lib/rjson/parser.rb) (MIT-licensed). [Racc](https://github.com/tenderlove/racc) Racc is an LALR(1) parser generator. It is written in Ruby itself, and generates ruby programs. --- lib/linguist/generated.rb | 16 ++- samples/Ruby/racc.rb | 267 ++++++++++++++++++++++++++++++++++++++ test/test_blob.rb | 3 + 3 files changed, 285 insertions(+), 1 deletion(-) create mode 100644 samples/Ruby/racc.rb diff --git a/lib/linguist/generated.rb b/lib/linguist/generated.rb index d107e737..35766e4d 100644 --- a/lib/linguist/generated.rb +++ b/lib/linguist/generated.rb @@ -71,7 +71,8 @@ module Linguist generated_jni_header? || vcr_cassette? || generated_module? || - generated_unity3d_meta? + generated_unity3d_meta? || + generated_racc? end # Internal: Is the blob an Xcode file? @@ -359,5 +360,18 @@ module Linguist return false unless lines.count > 1 return lines[0].include?("fileFormatVersion: ") end + + # Internal: Is this a Racc-generated file? + # + # A Racc-generated file contains: + # # This file is automatically generated by Racc x.y.z + # on the third line. + # + # Return true or false + def generated_racc? + return false unless extname == '.rb' + return false unless lines.count > 2 + return lines[2].start_with?("# This file is automatically generated by Racc") + end end end diff --git a/samples/Ruby/racc.rb b/samples/Ruby/racc.rb new file mode 100644 index 00000000..a3e7f51c --- /dev/null +++ b/samples/Ruby/racc.rb @@ -0,0 +1,267 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.7 +# from Racc grammer file "". +# + +require 'racc/parser.rb' +module RJSON + class Parser < Racc::Parser + + + require 'rjson/handler' + + attr_reader :handler + + def initialize tokenizer, handler = Handler.new + @tokenizer = tokenizer + @handler = handler + super() + end + + def next_token + @tokenizer.next_token + end + + def parse + do_parse + handler + end +##### State transition tables begin ### + +racc_action_table = [ + 9, 33, 9, 11, 13, 16, 19, 22, 9, 7, + 23, 1, 9, 11, 13, 16, 19, 29, 30, 7, + 21, 1, 9, 11, 13, 16, 19, 31, nil, 7, + 21, 1, 23, 7, nil, 1 ] + +racc_action_check = [ + 6, 27, 33, 33, 33, 33, 33, 3, 31, 33, + 6, 33, 29, 29, 29, 29, 29, 12, 22, 29, + 12, 29, 2, 2, 2, 2, 2, 25, nil, 2, + 2, 2, 25, 0, nil, 0 ] + +racc_action_pointer = [ + 24, nil, 20, 7, nil, nil, -2, nil, nil, nil, + nil, nil, 10, nil, nil, nil, nil, nil, nil, nil, + nil, nil, 18, nil, nil, 20, nil, -7, nil, 10, + nil, 6, nil, 0, nil, nil, nil ] + +racc_action_default = [ + -27, -12, -21, -27, -1, -2, -27, -10, -15, -26, + -8, -22, -27, -23, -17, -16, -24, -20, -18, -25, + -19, -11, -27, -13, -3, -27, -6, -27, -9, -21, + 37, -27, -4, -21, -14, -5, -7 ] + +racc_goto_table = [ + 8, 26, 24, 27, 10, 3, 25, 5, 4, 12, + nil, nil, nil, nil, 28, nil, nil, nil, nil, nil, + nil, 32, nil, nil, nil, nil, 35, 34, 27, nil, + nil, 36 ] + +racc_goto_check = [ + 9, 7, 5, 8, 11, 1, 6, 3, 2, 12, + nil, nil, nil, nil, 11, nil, nil, nil, nil, nil, + nil, 5, nil, nil, nil, nil, 7, 9, 8, nil, + nil, 9 ] + +racc_goto_pointer = [ + nil, 5, 8, 7, nil, -4, 0, -5, -3, -2, + nil, 2, 7, nil, nil ] + +racc_goto_default = [ + nil, nil, 14, 18, 6, nil, nil, nil, 20, nil, + 2, nil, nil, 15, 17 ] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 14, :_reduce_none, + 1, 14, :_reduce_none, + 2, 15, :_reduce_none, + 3, 15, :_reduce_none, + 3, 19, :_reduce_none, + 1, 19, :_reduce_none, + 3, 20, :_reduce_none, + 2, 16, :_reduce_none, + 3, 16, :_reduce_none, + 1, 23, :_reduce_10, + 1, 24, :_reduce_11, + 1, 17, :_reduce_12, + 1, 18, :_reduce_13, + 3, 25, :_reduce_none, + 1, 25, :_reduce_none, + 1, 22, :_reduce_none, + 1, 22, :_reduce_none, + 1, 22, :_reduce_none, + 1, 26, :_reduce_none, + 1, 26, :_reduce_20, + 0, 27, :_reduce_none, + 1, 27, :_reduce_22, + 1, 27, :_reduce_23, + 1, 27, :_reduce_24, + 1, 27, :_reduce_25, + 1, 21, :_reduce_26 ] + +racc_reduce_n = 27 + +racc_shift_n = 37 + +racc_token_table = { + false => 0, + :error => 1, + :STRING => 2, + :NUMBER => 3, + :TRUE => 4, + :FALSE => 5, + :NULL => 6, + "," => 7, + ":" => 8, + "[" => 9, + "]" => 10, + "{" => 11, + "}" => 12 } + +racc_nt_base = 13 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "STRING", + "NUMBER", + "TRUE", + "FALSE", + "NULL", + "\",\"", + "\":\"", + "\"[\"", + "\"]\"", + "\"{\"", + "\"}\"", + "$start", + "document", + "object", + "array", + "start_object", + "end_object", + "pairs", + "pair", + "string", + "value", + "start_array", + "end_array", + "values", + "scalar", + "literal" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +# reduce 1 omitted + +# reduce 2 omitted + +# reduce 3 omitted + +# reduce 4 omitted + +# reduce 5 omitted + +# reduce 6 omitted + +# reduce 7 omitted + +# reduce 8 omitted + +# reduce 9 omitted + +def _reduce_10(val, _values, result) + @handler.start_array + result +end + +def _reduce_11(val, _values, result) + @handler.end_array + result +end + +def _reduce_12(val, _values, result) + @handler.start_object + result +end + +def _reduce_13(val, _values, result) + @handler.end_object + result +end + +# reduce 14 omitted + +# reduce 15 omitted + +# reduce 16 omitted + +# reduce 17 omitted + +# reduce 18 omitted + +# reduce 19 omitted + +def _reduce_20(val, _values, result) + @handler.scalar val[0] + result +end + +# reduce 21 omitted + +def _reduce_22(val, _values, result) + n = val[0]; result = n.count('.') > 0 ? n.to_f : n.to_i + result +end + +def _reduce_23(val, _values, result) + result = true + result +end + +def _reduce_24(val, _values, result) + result = false + result +end + +def _reduce_25(val, _values, result) + result = nil + result +end + +def _reduce_26(val, _values, result) + @handler.scalar val[0].gsub(/^"|"$/, '') + result +end + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module RJSON diff --git a/test/test_blob.rb b/test/test_blob.rb index 1ba647b0..42ece685 100644 --- a/test/test_blob.rb +++ b/test/test_blob.rb @@ -255,6 +255,9 @@ class TestBlob < Minitest::Test # Unity3D-generated metadata assert sample_blob("Unity3D Asset/Tiles.meta").generated? + + # Racc-generated Ruby + assert sample_blob("Ruby/racc.rb").generated? end def test_vendored From 27727a927f2e0df23e4b6c437b19839ba91b4c39 Mon Sep 17 00:00:00 2001 From: Kepler Sticka-Jones Date: Sat, 10 Oct 2015 23:49:07 -0600 Subject: [PATCH 06/13] The Crystal Grammar repository has moved. And I'm kinda thinking about changing my GitHub name... --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 98dbcfb2..941dc61a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -646,7 +646,7 @@ url = https://github.com/SRI-CSL/SMT.tmbundle.git [submodule "vendor/grammars/language-crystal"] path = vendor/grammars/language-crystal - url = https://github.com/k2b6s9j/language-crystal + url = https://github.com/atom-crystal/language-crystal [submodule "vendor/grammars/language-xbase"] path = vendor/grammars/language-xbase url = https://github.com/hernad/atom-language-harbour From aa0c9e3572bfdd17df7002eb2d2345917a3fc063 Mon Sep 17 00:00:00 2001 From: Adam Wright Date: Mon, 12 Oct 2015 14:40:18 +0800 Subject: [PATCH 07/13] Correct typo ("Any information you [c]an add") --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2a4d3c31..33b976d2 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ The Language stats bar displays languages percentages for the files in the repos 0. Click on the name of the language in the stats bar to see a list of the files that are identified as that language. 0. If you see files that you didn't write, consider moving the files into one of the [paths for vendored code](/lib/linguist/vendor.yml), or use the [manual overrides](#overrides) feature to ignore them. -0. If the files are being misclassified, search for [open issues][issues] to see if anyone else has already reported the issue. Any information you an add, especially links to public repositories, is helpful. +0. If the files are being misclassified, search for [open issues][issues] to see if anyone else has already reported the issue. Any information you can add, especially links to public repositories, is helpful. 0. If there are no reported issues of this misclassification, [open an issue][new-issue] and include a link to the repository or a sample of the code that is being misclassified. ## Overrides From 09c2eee91e619d094ebb79acbd93f16da57ae9f9 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Tue, 13 Oct 2015 07:57:58 +0200 Subject: [PATCH 08/13] Support for Metal language --- lib/linguist/languages.yml | 8 ++ samples/Metal/ITMVisualisationEngine.metal | 99 ++++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 samples/Metal/ITMVisualisationEngine.metal diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 420965c4..90a2959c 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2063,6 +2063,14 @@ Mercury: tm_scope: source.mercury ace_mode: prolog +Metal: + type: programming + color: "#8f14e9" + extensions: + - .metal + tm_scope: source.c++ + ace_mode: c_cpp + MiniD: # Legacy type: programming searchable: false diff --git a/samples/Metal/ITMVisualisationEngine.metal b/samples/Metal/ITMVisualisationEngine.metal new file mode 100644 index 00000000..a1372178 --- /dev/null +++ b/samples/Metal/ITMVisualisationEngine.metal @@ -0,0 +1,99 @@ +// Copyright 2014 Isis Innovation Limited and the authors of InfiniTAM + +#include + +#include "../../DeviceAgnostic/ITMSceneReconstructionEngine.h" +#include "../../DeviceAgnostic/ITMVisualisationEngine.h" +#include "ITMVisualisationEngine_Metal.h" + +using namespace metal; + +kernel void genericRaycastVH_device(DEVICEPTR(Vector4f) *pointsRay [[ buffer(0) ]], + const CONSTPTR(ITMVoxel) *voxelData [[ buffer(1) ]], + const CONSTPTR(typename ITMVoxelIndex::IndexData) *voxelIndex [[ buffer(2) ]], + const CONSTPTR(Vector2f) *minmaxdata [[ buffer(3) ]], + const CONSTPTR(CreateICPMaps_Params) *params [[ buffer(4) ]], + uint2 threadIdx [[ thread_position_in_threadgroup ]], + uint2 blockIdx [[ threadgroup_position_in_grid ]], + uint2 blockDim [[ threads_per_threadgroup ]]) +{ + int x = threadIdx.x + blockIdx.x * blockDim.x, y = threadIdx.y + blockIdx.y * blockDim.y; + + if (x >= params->imgSize.x || y >= params->imgSize.y) return; + + int locId = x + y * params->imgSize.x; + int locId2 = (int)floor((float)x / minmaximg_subsample) + (int)floor((float)y / minmaximg_subsample) * params->imgSize.x; + + castRay(pointsRay[locId], x, y, voxelData, voxelIndex, params->invM, params->invProjParams, + params->voxelSizes.y, params->lightSource.w, minmaxdata[locId2]); +} + +kernel void genericRaycastVGMissingPoints_device(DEVICEPTR(Vector4f) *forwardProjection [[ buffer(0) ]], + const CONSTPTR(int) *fwdProjMissingPoints [[ buffer(1) ]], + const CONSTPTR(ITMVoxel) *voxelData [[ buffer(2) ]], + const CONSTPTR(typename ITMVoxelIndex::IndexData) *voxelIndex [[ buffer(3) ]], + const CONSTPTR(Vector2f) *minmaxdata [[ buffer(4) ]], + const CONSTPTR(CreateICPMaps_Params) *params [[ buffer(5) ]], + uint2 threadIdx [[ thread_position_in_threadgroup ]], + uint2 blockIdx [[ threadgroup_position_in_grid ]], + uint2 blockDim [[ threads_per_threadgroup ]]) +{ + int pointId = threadIdx.x + blockIdx.x * blockDim.x; + + if (pointId >= params->imgSize.z) return; + + int locId = fwdProjMissingPoints[pointId]; + int y = locId / params->imgSize.x, x = locId - y * params->imgSize.x; + int locId2 = (int)floor((float)x / minmaximg_subsample) + (int)floor((float)y / minmaximg_subsample) * params->imgSize.x; + + castRay(forwardProjection[locId], x, y, voxelData, voxelIndex, params->invM, params->invProjParams, + params->voxelSizes.y, params->lightSource.w, minmaxdata[locId2]); +} + +kernel void renderICP_device(const CONSTPTR(Vector4f) *pointsRay [[ buffer(0) ]], + DEVICEPTR(Vector4f) *pointsMap [[ buffer(1) ]], + DEVICEPTR(Vector4f) *normalsMap [[ buffer(2) ]], + DEVICEPTR(Vector4u) *outRendering [[ buffer(3) ]], + const CONSTPTR(CreateICPMaps_Params) *params [[ buffer(4) ]], + uint2 threadIdx [[ thread_position_in_threadgroup ]], + uint2 blockIdx [[ threadgroup_position_in_grid ]], + uint2 blockDim [[ threads_per_threadgroup ]]) +{ + int x = threadIdx.x + blockIdx.x * blockDim.x, y = threadIdx.y + blockIdx.y * blockDim.y; + + if (x >= params->imgSize.x || y >= params->imgSize.y) return; + + processPixelICP(outRendering, pointsMap, normalsMap, pointsRay, params->imgSize.xy, x, y, params->voxelSizes.x, TO_VECTOR3(params->lightSource)); +} + +kernel void renderForward_device(DEVICEPTR(Vector4u) *outRendering [[ buffer(0) ]], + const CONSTPTR(Vector4f) *pointsRay [[ buffer(1) ]], + const CONSTPTR(CreateICPMaps_Params) *params [[ buffer(2) ]], + uint2 threadIdx [[ thread_position_in_threadgroup ]], + uint2 blockIdx [[ threadgroup_position_in_grid ]], + uint2 blockDim [[ threads_per_threadgroup ]]) +{ + int x = threadIdx.x + blockIdx.x * blockDim.x, y = threadIdx.y + blockIdx.y * blockDim.y; + + if (x >= params->imgSize.x || y >= params->imgSize.y) return; + + processPixelForwardRender(outRendering, pointsRay, params->imgSize.xy, x, y, params->voxelSizes.x, TO_VECTOR3(params->lightSource)); +} + +kernel void forwardProject_device(DEVICEPTR(Vector4f) *forwardProjection [[ buffer(0) ]], + const CONSTPTR(Vector4f) *pointsRay [[ buffer(1) ]], + const CONSTPTR(CreateICPMaps_Params) *params [[ buffer(2) ]], + uint2 threadIdx [[ thread_position_in_threadgroup ]], + uint2 blockIdx [[ threadgroup_position_in_grid ]], + uint2 blockDim [[ threads_per_threadgroup ]]) +{ + int x = (threadIdx.x + blockIdx.x * blockDim.x), y = (threadIdx.y + blockIdx.y * blockDim.y); + + if (x >= params->imgSize.x || y >= params->imgSize.y) return; + + int locId = x + y * params->imgSize.x; + Vector4f pixel = pointsRay[locId]; + + int locId_new = forwardProjectPixel(pixel * params->voxelSizes.x, params->M, params->projParams, params->imgSize.xy); + if (locId_new >= 0) forwardProjection[locId_new] = pixel; +} \ No newline at end of file From 1f1416a5f7ed42cf752cd67d13cf674a2b42397e Mon Sep 17 00:00:00 2001 From: edendramis Date: Thu, 15 Oct 2015 14:15:27 -0700 Subject: [PATCH 09/13] adding freemarker grammar --- .gitmodules | 3 +++ vendor/grammars/FreeMarker.tmbundle | 1 + 2 files changed, 4 insertions(+) create mode 160000 vendor/grammars/FreeMarker.tmbundle diff --git a/.gitmodules b/.gitmodules index 941dc61a..be2d7b30 100644 --- a/.gitmodules +++ b/.gitmodules @@ -680,3 +680,6 @@ [submodule "vendor/grammars/Stata.tmbundle"] path = vendor/grammars/Stata.tmbundle url = https://github.com/pschumm/Stata.tmbundle +[submodule "vendor/grammars/FreeMarker.tmbundle"] + path = vendor/grammars/FreeMarker.tmbundle + url = https://github.com/freemarker/FreeMarker.tmbundle diff --git a/vendor/grammars/FreeMarker.tmbundle b/vendor/grammars/FreeMarker.tmbundle new file mode 160000 index 00000000..6b7b880c --- /dev/null +++ b/vendor/grammars/FreeMarker.tmbundle @@ -0,0 +1 @@ +Subproject commit 6b7b880c533626b8e943ed686007c06771da3b42 From 11e3251efd66a3611c19ec664a46e022844d7bbf Mon Sep 17 00:00:00 2001 From: edendramis Date: Thu, 15 Oct 2015 14:43:02 -0700 Subject: [PATCH 10/13] adding samples --- samples/FreeMarker/example.ftl | 30 ++++++++++++++++++++++++++++++ samples/FreeMarker/layout.ftl | 12 ++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 samples/FreeMarker/example.ftl create mode 100644 samples/FreeMarker/layout.ftl diff --git a/samples/FreeMarker/example.ftl b/samples/FreeMarker/example.ftl new file mode 100644 index 00000000..c322b851 --- /dev/null +++ b/samples/FreeMarker/example.ftl @@ -0,0 +1,30 @@ +<#import "layout.ftl" as layout> + +<#assign results = [ + { + "title": "Example Result", + "description": "Lorem ipsum dolor sit amet, pede id pellentesque, sollicitudin turpis sed in sed sed, libero dictum." + } + ] /> + +<@layout.page title="FreeMarker Example"> + <#if results?size == 0> + There were no results. + <#else> +
    + <#list results as result> +
  • + ${result.title} +

    ${result.description}

    +
  • + +
+ + + <@currentTime /> + + + +<#macro currentTime> + ${.now?string.full} + diff --git a/samples/FreeMarker/layout.ftl b/samples/FreeMarker/layout.ftl new file mode 100644 index 00000000..cd7f554d --- /dev/null +++ b/samples/FreeMarker/layout.ftl @@ -0,0 +1,12 @@ +<#macro page title> + + + + + ${title} + + + <#nested /> + + + From 0f204767a943fb445694e450d365dfa3fd186a16 Mon Sep 17 00:00:00 2001 From: edendramis Date: Thu, 15 Oct 2015 14:48:20 -0700 Subject: [PATCH 11/13] updating examples --- samples/FreeMarker/example.ftl | 1 + samples/FreeMarker/layout.ftl | 24 ++++++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/samples/FreeMarker/example.ftl b/samples/FreeMarker/example.ftl index c322b851..10a6ee95 100644 --- a/samples/FreeMarker/example.ftl +++ b/samples/FreeMarker/example.ftl @@ -21,6 +21,7 @@ + <#-- This is a FreeMarker comment --> <@currentTime /> diff --git a/samples/FreeMarker/layout.ftl b/samples/FreeMarker/layout.ftl index cd7f554d..18512dd6 100644 --- a/samples/FreeMarker/layout.ftl +++ b/samples/FreeMarker/layout.ftl @@ -1,12 +1,32 @@ +<#ftl strip_text=true /> + <#macro page title> - + - ${title} + <@metaTags /> <#nested /> + <@footer /> + + +<#--- + Default meta tags +--> +<#macro metaTags> + <#compress> + + + + + + + +<#macro footer> +

This page is using FreeMarker v${.version}

+ From 9e3cc01715e3349f56c645888a635b005a3e7239 Mon Sep 17 00:00:00 2001 From: edendramis Date: Fri, 16 Oct 2015 09:54:17 -0700 Subject: [PATCH 12/13] adding FreeMarker to grammars.yml --- grammars.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/grammars.yml b/grammars.yml index 4bd66f12..4eee0d23 100644 --- a/grammars.yml +++ b/grammars.yml @@ -42,6 +42,8 @@ vendor/grammars/Docker.tmbundle: - source.dockerfile vendor/grammars/Elm.tmLanguage: - source.elm +vendor/grammars/FreeMarker.tmbundle: +- text.html.ftl vendor/grammars/G-Code/: - source.LS - source.MCPOST From a55a60a161e37795f3490a9885836cefc0c4043b Mon Sep 17 00:00:00 2001 From: Evangelia Dendramis Date: Fri, 16 Oct 2015 18:19:53 -0700 Subject: [PATCH 13/13] removing group and search term --- lib/linguist/languages.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 03b50f2b..d036ac35 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1036,12 +1036,10 @@ Frege: - .fr tm_scope: source.haskell ace_mode: haskell - + FreeMarker: type: programming color: "#0050b2" - group: Java - search_term: ftl aliases: - ftl extensions: