mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Add RenderScript and Filterscript.
This commit is contained in:
		| @@ -172,13 +172,15 @@ module Linguist | |||||||
|       end |       end | ||||||
|     end |     end | ||||||
|  |  | ||||||
|     disambiguate "F#", "Forth", "GLSL" do |data| |     disambiguate "F#", "Forth", "GLSL", "Filterscript" do |data| | ||||||
|       if /^(: |new-device)/.match(data) |       if /^(: |new-device)/.match(data) | ||||||
|         Language["Forth"] |         Language["Forth"] | ||||||
|       elsif /^\s*(#light|import|let|module|namespace|open|type)/.match(data) |       elsif /^\s*(#light|import|let|module|namespace|open|type)/.match(data) | ||||||
|         Language["F#"] |         Language["F#"] | ||||||
|       elsif /^\s*(#include|#pragma|precision|uniform|varying|void)/.match(data) |       elsif /^\s*(#version|precision|uniform|varying|vec[234])/.match(data) | ||||||
|         Language["GLSL"] |         Language["GLSL"] | ||||||
|  |       elsif /#include|#pragma\s+(rs|version)|__attribute__/.match(data) | ||||||
|  |         Language["Filterscript"] | ||||||
|       end |       end | ||||||
|     end |     end | ||||||
|  |  | ||||||
| @@ -278,5 +280,12 @@ module Linguist | |||||||
|       end |       end | ||||||
|     end |     end | ||||||
|  |  | ||||||
|  |     disambiguate "Rust", "RenderScript" do |data| | ||||||
|  |       if data.include?("^(use |fn |mod |pub |macro_rules|impl|#!?\[)") | ||||||
|  |         Language["Rust"] | ||||||
|  |       elsif /#include|#pragma\s+(rs|version)|__attribute__/.match(data) | ||||||
|  |         Language["RenderScript"] | ||||||
|  |       end | ||||||
|  |     end | ||||||
|   end |   end | ||||||
| end | end | ||||||
|   | |||||||
| @@ -938,6 +938,14 @@ Fantom: | |||||||
|   tm_scope: source.fan |   tm_scope: source.fan | ||||||
|   ace_mode: text |   ace_mode: text | ||||||
|  |  | ||||||
|  | Filterscript: | ||||||
|  |   type: programming | ||||||
|  |   group: RenderScript | ||||||
|  |   extensions: | ||||||
|  |   - .fs | ||||||
|  |   tm_scope: none | ||||||
|  |   ace_mode: text | ||||||
|  |  | ||||||
| Formatted: | Formatted: | ||||||
|   type: data |   type: data | ||||||
|   extensions: |   extensions: | ||||||
| @@ -2677,6 +2685,14 @@ Redcode: | |||||||
|   tm_scope: none |   tm_scope: none | ||||||
|   ace_mode: text |   ace_mode: text | ||||||
|  |  | ||||||
|  | RenderScript: | ||||||
|  |   type: programming | ||||||
|  |   extensions: | ||||||
|  |   - .rs | ||||||
|  |   - .rsh | ||||||
|  |   tm_scope: none | ||||||
|  |   ace_mode: text | ||||||
|  |  | ||||||
| RobotFramework: | RobotFramework: | ||||||
|   type: programming |   type: programming | ||||||
|   extensions: |   extensions: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user