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
|
||||
|
||||
disambiguate "F#", "Forth", "GLSL" do |data|
|
||||
disambiguate "F#", "Forth", "GLSL", "Filterscript" do |data|
|
||||
if /^(: |new-device)/.match(data)
|
||||
Language["Forth"]
|
||||
elsif /^\s*(#light|import|let|module|namespace|open|type)/.match(data)
|
||||
Language["F#"]
|
||||
elsif /^\s*(#include|#pragma|precision|uniform|varying|void)/.match(data)
|
||||
elsif /^\s*(#version|precision|uniform|varying|vec[234])/.match(data)
|
||||
Language["GLSL"]
|
||||
elsif /#include|#pragma\s+(rs|version)|__attribute__/.match(data)
|
||||
Language["Filterscript"]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -278,5 +280,12 @@ module Linguist
|
||||
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
|
||||
|
||||
@@ -938,6 +938,14 @@ Fantom:
|
||||
tm_scope: source.fan
|
||||
ace_mode: text
|
||||
|
||||
Filterscript:
|
||||
type: programming
|
||||
group: RenderScript
|
||||
extensions:
|
||||
- .fs
|
||||
tm_scope: none
|
||||
ace_mode: text
|
||||
|
||||
Formatted:
|
||||
type: data
|
||||
extensions:
|
||||
@@ -2677,6 +2685,14 @@ Redcode:
|
||||
tm_scope: none
|
||||
ace_mode: text
|
||||
|
||||
RenderScript:
|
||||
type: programming
|
||||
extensions:
|
||||
- .rs
|
||||
- .rsh
|
||||
tm_scope: none
|
||||
ace_mode: text
|
||||
|
||||
RobotFramework:
|
||||
type: programming
|
||||
extensions:
|
||||
|
||||
Reference in New Issue
Block a user