Compare commits

..

33 Commits

Author SHA1 Message Date
Arfon Smith
f1d3f396bb Merge pull request #2264 from github/grammar-update
Updating grammars
2015-03-24 12:28:29 -05:00
Arfon Smith
65ae444791 Updating grammars 2015-03-24 12:26:40 -05:00
Arfon Smith
e9916c644d Merge pull request #2263 from github/NetLinx
Net linx
2015-03-24 12:09:15 -05:00
Arfon Smith
1940a9ea92 Merge branch 'master' into NetLinx 2015-03-24 11:41:26 -05:00
Arfon Smith
c9f8a2677a Merge pull request #2261 from ntkme/storyboard-xib-xml
.storyboard and .xib as XML
2015-03-24 11:38:39 -05:00
Arfon Smith
5b6b3f74b5 Merge pull request #2262 from drautb/master
Fix categorization for Racket shell scripts.
2015-03-24 11:38:21 -05:00
Vicent Marti
f9ccac4240 Merge pull request #2259 from github/bump-rugged
Bump rugged to latest release
2015-03-24 08:36:52 -07:00
Ben Draut
aa7aae7808 Fix categorization for Racket shell scripts.
The current implementation categorizes shell scripts written in Racket
as Scheme, which is incorrect.

For example:

```racket
\#!/usr/bin/env racket

\#lang racket

"Hello World!"
```

This should be categorized as Racket, not Scheme. [This file][1]
demonstrates the problem in an existing repository.

[1]: https://github.com/drautb/sketchbook/blob/master/racket/sublime-project-generator/generate-sublime-project.rkt
2015-03-24 08:22:00 -06:00
なつき
7c66301583 .storyboard and .xib as XML 2015-03-24 01:58:55 -07:00
Andy Delcambre
7df872eb7f Bump rugged to latest release 2015-03-23 14:33:03 -06:00
Arfon Smith
6a4f4c724c Merge pull request #2253 from larsbrinkhoff/dtrace-script-mode
Fix Emacs modeline in DTrace sample.
2015-03-23 15:30:03 -05:00
Lars Brinkhoff
76828c45c7 Fix Emacs modeline in DTrace sample.
Apparently, the DTrace mode for Emacs is called dtrace-script:
https://github.com/dotemacs/dtrace-script-mode
2015-03-23 19:43:32 +01:00
Arfon Smith
27215f148b Merge pull request #2257 from Oldes/rebol_grammar_scope
Adding tm_scope for REBOL language and removing REBOL from LICENSE_WHITE...
2015-03-23 11:30:48 -05:00
Arfon Smith
77d52463ad Merge pull request #2256 from Oldes/red_grammar
Added grammar submodule for Red language
2015-03-23 11:30:06 -05:00
Oldes
0f6c2afbf6 Sublime-REBOL submodule updated. 2015-03-23 15:58:01 +01:00
Oldes
cbaa3ca6f4 Adding tm_scope for REBOL language and removing REBOL from LICENSE_WHITELIST as now is license available in the Sublime-REBOL project. 2015-03-23 11:38:07 +01:00
Oldes
63f54bdf06 Added grammar submodule for Red language 2015-03-23 10:43:39 +01:00
Alex McLain
b302863a4d Added additional sample files. 2015-03-21 20:22:46 -07:00
Alex McLain
ec46b1a92e Added NetLinx language. 2015-03-21 18:58:09 -07:00
Arfon Smith
ed65040539 Merge pull request #2250 from shaneog/patch-2
Add Neovim config file names to VimL language
2015-03-21 16:56:00 -05:00
Arfon Smith
cc1a420bc5 Merge pull request #2254 from shaunlebron/master
add .boot to clojure extensions
2015-03-21 16:54:20 -05:00
Shaun Williams
8555b20380 add .boot Clojure sample 2015-03-21 12:02:20 -05:00
Shaun Williams
6462ba70f9 put .boot after primary .clj extension 2015-03-21 11:48:52 -05:00
Shaun Williams
1ac43e0d7d reorder .boot to be in order 2015-03-21 11:32:29 -05:00
Shaun Williams
6ac51968c6 add .boot to clojure extensions 2015-03-21 11:20:48 -05:00
Shane O'Grady
cbcadf8e45 Add Neovim config file names to VimL language
Neovim uses configuration files named `.nvimrc` rather than `.vimrc`

See this PR for details neovim/neovim#330
2015-03-21 09:53:21 -03:00
Arfon Smith
74b111501d Merge pull request #2213 from ntkme/source-map
Detect generated source maps
2015-03-20 09:26:40 -05:00
なつき
67e4212f64 Test detecting generated source maps 2015-03-19 19:50:40 -07:00
Arfon Smith
55559a1020 Merge pull request #2246 from ampl/nl
Add a heuristic to disambiguate between NL and NewLisp
2015-03-19 20:26:56 -05:00
なつき
b103232e0e Detect generated source maps 2015-03-19 17:38:59 -07:00
vitaut
b587379f4a Add a heuristic to disambiguate between NL and NewLisp 2015-03-19 17:33:52 -07:00
Arfon Smith
ba654b2a1d Merge pull request #2242 from larsbrinkhoff/types
Fix the type classification of some languages.
2015-03-19 08:46:55 -05:00
Lars Brinkhoff
ae39475133 Fix the type classification of some languages. 2015-03-19 07:09:42 +01:00
31 changed files with 632 additions and 38 deletions

6
.gitmodules vendored
View File

@@ -645,3 +645,9 @@
[submodule "vendor/grammars/perl.tmbundle"]
path = vendor/grammars/perl.tmbundle
url = https://github.com/textmate/perl.tmbundle
[submodule "vendor/grammars/sublime-netlinx"]
path = vendor/grammars/sublime-netlinx
url = https://github.com/amclain/sublime-netlinx
[submodule "vendor/grammars/Sublime-Red"]
path = vendor/grammars/Sublime-Red
url = https://github.com/Oldes/Sublime-Red

View File

@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
s.add_dependency 'charlock_holmes', '~> 0.7.3'
s.add_dependency 'escape_utils', '~> 1.0.1'
s.add_dependency 'mime-types', '>= 1.19'
s.add_dependency 'rugged', '~> 0.22.0b4'
s.add_dependency 'rugged', '~> 0.23.0b1'
s.add_development_dependency 'minitest', '>= 5.0'
s.add_development_dependency 'mocha'

View File

@@ -113,6 +113,8 @@ vendor/grammars/Sublime-QML:
- source.qml
vendor/grammars/Sublime-REBOL:
- source.rebol
vendor/grammars/Sublime-Red:
- source.red
vendor/grammars/Sublime-SQF-Language:
- source.sqf
vendor/grammars/Sublime-Text-2-OpenEdge-ABL:
@@ -475,6 +477,9 @@ vendor/grammars/sublime-idris:
- source.idris
vendor/grammars/sublime-mask:
- source.mask
vendor/grammars/sublime-netlinx:
- source.netlinx
- source.netlinx.erb
vendor/grammars/sublime-nginx:
- source.nginx
vendor/grammars/sublime-nix:

View File

@@ -58,6 +58,7 @@ module Linguist
godeps? ||
generated_by_zephir? ||
minified_files? ||
source_map? ||
compiled_coffeescript? ||
generated_parser? ||
generated_net_docfile? ||
@@ -96,6 +97,20 @@ module Linguist
end
end
# Internal: Is the blob a generated source map?
#
# Source Maps usually have .css.map or .js.map extensions. In case they
# are not following the name convention, detect them based on the content.
#
# Returns true or false.
def source_map?
return false unless extname.downcase == '.map'
name =~ /(\.css|\.js)\.map$/i || # Name convention
lines[0] =~ /^{"version":\d+,/ || # Revision 2 and later begin with the version number
lines[0] =~ /^\/\*\* Begin line maps\. \*\*\/{/ # Revision 1 begins with a magic comment
end
# Internal: Is the blob of JS generated by CoffeeScript?
#
# CoffeeScript is meant to output JS that would be difficult to

View File

@@ -270,5 +270,13 @@ module Linguist
end
end
disambiguate "NL", "NewLisp" do |data|
if /^g3 /.match(data)
Language["NL"]
else
Language["NewLisp"]
end
end
end
end

View File

@@ -515,6 +515,7 @@ Clojure:
color: "#db5855"
extensions:
- .clj
- .boot
- .cl2
- .cljc
- .cljs
@@ -710,6 +711,8 @@ DM:
DTrace:
type: programming
aliases:
- dtrace-script
extensions:
- .d
interpreters:
@@ -718,7 +721,7 @@ DTrace:
ace_mode: c_cpp
Darcs Patch:
type: programming
type: data
search_term: dpatch
aliases:
- dpatch
@@ -736,13 +739,14 @@ Dart:
ace_mode: dart
Diff:
type: programming
type: data
color: "#88dddd"
extensions:
- .diff
- .patch
aliases:
- udiff
tm_scope: source.diff
ace_mode: diff
Dockerfile:
@@ -1156,7 +1160,7 @@ Graphviz (DOT):
ace_mode: text
Groff:
type: programming
type: markup
extensions:
- .man
- '.1'
@@ -1953,6 +1957,24 @@ Nemerle:
- .n
ace_mode: text
NetLinx:
type: programming
color: "#0000ff"
extensions:
- .axs
- .axi
tm_scope: source.netlinx
ace_mode: text
NetLinx+ERB:
type: programming
color: "#407fff"
extensions:
- .axs.erb
- .axi.erb
tm_scope: source.netlinx.erb
ace_mode: text
NetLogo:
type: programming
color: "#ff2b2b"
@@ -2592,6 +2614,8 @@ Racket:
- .rktd
- .rktl
- .scrbl
interpreters:
- racket
tm_scope: source.racket
ace_mode: lisp
@@ -2626,6 +2650,7 @@ Rebol:
- .r3
- .rebol
ace_mode: text
tm_scope: source.rebol
Red:
type: programming
@@ -2635,7 +2660,7 @@ Red:
- .reds
aliases:
- red/system
tm_scope: none
tm_scope: source.red
ace_mode: text
Redcode:
@@ -2845,7 +2870,6 @@ Scheme:
- .ss
interpreters:
- guile
- racket
- bigloo
- chicken
ace_mode: scheme
@@ -3202,12 +3226,15 @@ VimL:
search_term: vim
aliases:
- vim
- nvim
extensions:
- .vim
filenames:
- .nvimrc
- .vimrc
- _vimrc
- gvimrc
- nvimrc
- vimrc
ace_mode: text
@@ -3303,6 +3330,7 @@ XML:
- .rss
- .scxml
- .srdf
- .storyboard
- .stTheme
- .sublime-snippet
- .targets
@@ -3326,6 +3354,7 @@ XML:
- .x3d
- .xacro
- .xaml
- .xib
- .xlf
- .xliff
- .xmi

View File

@@ -0,0 +1,15 @@
;; from: https://github.com/boot-clj/boot#configure-task-options
(set-env!
:source-paths #{"src"}
:dependencies '[[me.raynes/conch "0.8.0"]])
(task-options!
pom {:project 'my-project
:version "0.1.0"}
jar {:manifest {"Foo" "bar"}})
(deftask build
"Build my project."
[]
(comp (pom) (jar) (install)))

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* -*- Mode: dtrace-script; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*

View File

@@ -0,0 +1,78 @@
(***********************************************************
Sample File
For testing syntax highlighting
************************************************************)
#if_not_defined Sample
#define Sample 1
(***********************************************************)
(* System Type : NetLinx *)
(***********************************************************)
(* DEVICE NUMBER DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_DEVICE
(***********************************************************)
(* CONSTANT DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_CONSTANT
<% global_constant_justify = 20 -%>
// Video Source Select Buttons
<%=
video_sources = {
BTN_VID_FOH_PC: { btn: 11, input: :VID_SRC_FOH_PC },
BTN_VID_STAGE_PC: { btn: 12, input: :VID_SRC_STAGE_PC },
BTN_VID_BLURAY: { btn: 13, input: :VID_SRC_BLURAY },
}
print_constant_hash video_sources.remap(:btn),
justify: global_constant_justify
%>
(***********************************************************)
(* INCLUDES GO BELOW *)
(***********************************************************)
(***********************************************************)
(* DATA TYPE DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_TYPE
(***********************************************************)
(* VARIABLE DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_VARIABLE
(***********************************************************)
(* SUBROUTINE/FUNCTION DEFINITIONS GO BELOW *)
(***********************************************************)
(***********************************************************)
(* STARTUP CODE GOES BELOW *)
(***********************************************************)
DEFINE_START
(***********************************************************)
(* THE EVENTS GO BELOW *)
(***********************************************************)
DEFINE_EVENT
// Video Source Select
<%=
justify group(video_sources.remap :input) { |name, input|
"[#{@dvTP}, #{name}] = (outputs[VID_DEST_PROJECTOR].input == #{input});"
}
%>
(***********************************************************)
(* THE MAINLINE GOES BELOW *)
(***********************************************************)
DEFINE_PROGRAM
(***********************************************************)
(* END OF PROGRAM *)
(* DO NOT PUT ANY CODE BELOW THIS COMMENT *)
(***********************************************************)
#end_if

View File

@@ -0,0 +1,78 @@
(***********************************************************
Sample File
For testing syntax highlighting
************************************************************)
#if_not_defined Sample
#define Sample 1
(***********************************************************)
(* System Type : NetLinx *)
(***********************************************************)
(* DEVICE NUMBER DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_DEVICE
(***********************************************************)
(* CONSTANT DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_CONSTANT
<% global_constant_justify = 20 -%>
// Video Source Select Buttons
<%=
video_sources = {
BTN_VID_FOH_PC: { btn: 11, input: :VID_SRC_FOH_PC },
BTN_VID_STAGE_PC: { btn: 12, input: :VID_SRC_STAGE_PC },
BTN_VID_BLURAY: { btn: 13, input: :VID_SRC_BLURAY },
}
print_constant_hash video_sources.remap(:btn),
justify: global_constant_justify
%>
(***********************************************************)
(* INCLUDES GO BELOW *)
(***********************************************************)
(***********************************************************)
(* DATA TYPE DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_TYPE
(***********************************************************)
(* VARIABLE DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_VARIABLE
(***********************************************************)
(* SUBROUTINE/FUNCTION DEFINITIONS GO BELOW *)
(***********************************************************)
(***********************************************************)
(* STARTUP CODE GOES BELOW *)
(***********************************************************)
DEFINE_START
(***********************************************************)
(* THE EVENTS GO BELOW *)
(***********************************************************)
DEFINE_EVENT
// Video Source Select
<%=
justify group(video_sources.remap :input) { |name, input|
"[#{@dvTP}, #{name}] = (outputs[VID_DEST_PROJECTOR].input == #{input});"
}
%>
(***********************************************************)
(* THE MAINLINE GOES BELOW *)
(***********************************************************)
DEFINE_PROGRAM
(***********************************************************)
(* END OF PROGRAM *)
(* DO NOT PUT ANY CODE BELOW THIS COMMENT *)
(***********************************************************)
#end_if

View File

@@ -0,0 +1,132 @@
(***********************************************************
Mock Projector
For testing syntax highlighting
************************************************************)
#if_not_defined MOCK_PROJECTOR
#define MOCK_PROJECTOR 1
(***********************************************************)
(* System Type : NetLinx *)
(***********************************************************)
(* DEVICE NUMBER DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_DEVICE
dvPROJECTOR = 5001:1:0;
(***********************************************************)
(* CONSTANT DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_CONSTANT
// Power States
POWER_STATE_ON = 0;
POWER_STATE_OFF = 1;
POWER_STATE_WARMING = 2;
POWER_STATE_COOLING = 3;
// Inputs
INPUT_HDMI = 0;
INPUT_VGA = 1;
INPUT_COMPOSITE = 2;
INPUT_SVIDEO = 3;
(***********************************************************)
(* INCLUDES GO BELOW *)
(***********************************************************)
#include 'amx-lib-log'
(***********************************************************)
(* DATA TYPE DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_TYPE
struct projector_t
{
integer power_state;
integer input;
integer lamp_hours;
}
(***********************************************************)
(* VARIABLE DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_VARIABLE
volatile projector_t proj_1;
(***********************************************************)
(* SUBROUTINE/FUNCTION DEFINITIONS GO BELOW *)
(***********************************************************)
define_function initialize(projector_t self)
{
self.power_state = POWER_STATE_OFF;
self.input = INPUT_HDMI;
self.lamp_hours = 0;
}
define_function switch_input(projector_t self, integer input)
{
self.input = input;
print(LOG_LEVEL_INFO, "'Projector set to input: ', itoa(input)");
}
(***********************************************************)
(* STARTUP CODE GOES BELOW *)
(***********************************************************)
DEFINE_START
initialize(proj_1);
(***********************************************************)
(* THE EVENTS GO BELOW *)
(***********************************************************)
DEFINE_EVENT
data_event[dvPROJECTOR]
{
string:
{
parse_message(data.text);
}
command: {}
online: {}
offline: {}
}
button_event[dvTP, BTN_HDMI]
button_event[dvTP, BTN_VGA]
button_event[dvTP, BTN_COMPOSITE]
button_event[dvTP, BTN_SVIDEO]
{
push:
{
switch (button.input.channel)
{
case BTN_HDMI: switch_input(proj_1, INPUT_HDMI);
case BTN_VGA: switch_input(proj_1, INPUT_VGA);
case BTN_COMPOSITE: switch_input(proj_1, INPUT_COMPOSITE);
case BTN_SVIDEO: switch_input(proj_1, INPUT_SVIDEO);
}
}
release: {}
}
(***********************************************************)
(* THE MAINLINE GOES BELOW *)
(***********************************************************)
DEFINE_PROGRAM
[dvTP, BTN_POWER_ON] = (proj_1.power_state == POWER_STATE_ON);
[dvTP, BTN_POWER_OFF] = (proj_1.power_state == POWER_STATE_OFF);
(***********************************************************)
(* END OF PROGRAM *)
(* DO NOT PUT ANY CODE BELOW THIS COMMENT *)
(***********************************************************)
#end_if

View File

@@ -0,0 +1,158 @@
(***********************************************************
AMX VOLUME CONTROL
VOLUME ARRAY EXAMPLE
Website: https://sourceforge.net/projects/amx-lib-volume/
This application demonstrates the use of volume control
arrays using the amx-lib-volume library.
Volume control operation can be viewed by watching the
master's internal diagnostic output.
I/O PORT CONNECTIONS:
Ch 1: Volume Up Button
Ch 2: Volume Down Button
************************************************************
Copyright 2011, 2012, 2014 Alex McLain
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.
************************************************************)
PROGRAM_NAME='volume array'
(***********************************************************)
(***********************************************************)
(* System Type : NetLinx *)
(***********************************************************)
(* REV HISTORY: *)
(***********************************************************)
(*
$History: See version control repository.
*)
(***********************************************************)
(* INCLUDES GO BELOW *)
(***********************************************************)
// Include the volume control library.
#include 'amx-lib-volume'
(***********************************************************)
(* DEVICE NUMBER DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_DEVICE
dvDebug = 0:0:0; // For debug output.
dvIO = 36000:1:0; // Volume up/down button connections.
(***********************************************************)
(* CONSTANT DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_CONSTANT
// Volume control indexes.
MIC1 = 1; // Microphone 1.
MIC2 = 2; // Microphone 2.
MIC3 = 3; // Microphone 3.
MIC4 = 4; // Microphone 4.
WLS1 = 5; // Wireless mic 1.
WLS2 = 6; // Wireless mic 2.
IPOD = 7; // iPod input.
CD = 8; // CD player input.
(***********************************************************)
(* DATA TYPE DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_TYPE
(***********************************************************)
(* VARIABLE DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_VARIABLE
// Define a volume control array for the input devices.
volume inputs[8];
(***********************************************************)
(* LATCHING DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_LATCHING
(***********************************************************)
(* MUTUALLY EXCLUSIVE DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_MUTUALLY_EXCLUSIVE
(***********************************************************)
(* SUBROUTINE/FUNCTION DEFINITIONS GO BELOW *)
(***********************************************************)
(* EXAMPLE: DEFINE_FUNCTION <RETURN_TYPE> <NAME> (<PARAMETERS>) *)
(* EXAMPLE: DEFINE_CALL '<NAME>' (<PARAMETERS>) *)
(***********************************************************)
(* STARTUP CODE GOES BELOW *)
(***********************************************************)
DEFINE_START
// Initialize the array of volume controls.
volArrayInit(inputs, 0, VOL_UNMUTED, 10000, 20000, 5);
(***********************************************************)
(* THE EVENTS GO BELOW *)
(***********************************************************)
DEFINE_EVENT
// Volume Up
button_event[dvIO, 1]
{
PUSH:
{
volArrayIncrement(inputs); // Increment the volume up a step.
send_string dvDebug, "'Volume Up MIC1: ', itoa(volGetLevel(inputs[MIC1]))";
send_string dvDebug, "'Volume Up MIC2: ', itoa(volGetLevel(inputs[MIC2]))";
send_string dvDebug, "'Volume Up MIC3: ', itoa(volGetLevel(inputs[MIC3]))";
send_string dvDebug, "'Volume Up MIC4: ', itoa(volGetLevel(inputs[MIC4]))";
send_string dvDebug, "'Volume Up WLS1: ', itoa(volGetLevel(inputs[WLS1]))";
send_string dvDebug, "'Volume Up WLS2: ', itoa(volGetLevel(inputs[WLS2]))";
send_string dvDebug, "'Volume Up IPOD: ', itoa(volGetLevel(inputs[IPOD]))";
send_string dvDebug, "'Volume Up CD: ', itoa(volGetLevel(inputs[CD]))";
}
}
// Volume Down
button_event[dvIO, 2]
{
PUSH:
{
volArrayDecrement(inputs); // Decrement the volume down a step.
send_string dvDebug, "'Volume Dn MIC1: ', itoa(volGetLevel(inputs[MIC1]))";
send_string dvDebug, "'Volume Dn MIC2: ', itoa(volGetLevel(inputs[MIC2]))";
send_string dvDebug, "'Volume Dn MIC3: ', itoa(volGetLevel(inputs[MIC3]))";
send_string dvDebug, "'Volume Dn MIC4: ', itoa(volGetLevel(inputs[MIC4]))";
send_string dvDebug, "'Volume Dn WLS1: ', itoa(volGetLevel(inputs[WLS1]))";
send_string dvDebug, "'Volume Dn WLS2: ', itoa(volGetLevel(inputs[WLS2]))";
send_string dvDebug, "'Volume Dn IPOD: ', itoa(volGetLevel(inputs[IPOD]))";
send_string dvDebug, "'Volume Dn CD: ', itoa(volGetLevel(inputs[CD]))";
}
}
(***********************************************************)
(* THE ACTUAL PROGRAM GOES BELOW *)
(***********************************************************)
DEFINE_PROGRAM
(***********************************************************)
(* END OF PROGRAM *)
(* DO NOT PUT ANY CODE BELOW THIS COMMENT *)
(***********************************************************)

View File

@@ -0,0 +1,10 @@
set nocompatible
set ignorecase
set smartcase
set showmatch
set showcmd
syntax on
set hlsearch " Highlight searches
set incsearch " Do incremental searching

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="UIApplication">
<connections>
<outlet property="delegate" destination="bYg-Ix-Cfg" id="h4M-LL-qlT"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<customObject id="bYg-Ix-Cfg" userLabel="App Delegate"/>
<window opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="Na2-4i-xf1">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</window>
</objects>
</document>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
</dependencies>
<scenes/>
</document>

12
test/fixtures/Data/sourcemap.v1.map vendored Normal file
View File

@@ -0,0 +1,12 @@
/** Begin line maps. **/{ “file”:”out.js”, "count": 2 }
[0,0,0,0,0,0,1,1,1,1,2]
[2,2,2,2,2,2,3,4,4,4,4,4]
/** Begin file information. **/
[“a.js”, “b.js”]
[“b.js”, “c.js”, “d.js”]
/** Begin mapping definitions. **/
["a.js", 1, 34]
["a.js", 5, 2]
["b.js", 1, 3, "event"]
["c.js", 1, 4]
["d.js", 3, 78, "foo"]

1
test/fixtures/Data/sourcemap.v3.map vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"out.js","sourceRoot":"","sources":["foo.js","bar.js"],"sourcesContent":[null,null],"names":["src","maps","are","fun"],"mappings":"A,AAAB;;ABCDE;"}

View File

@@ -5,47 +5,66 @@ class TestGenerated < Minitest::Test
class DataLoadedError < StandardError; end
def generated_without_loading_data(name)
blob = File.join(samples_path, name)
def generated_without_loading_data(blob)
begin
assert Generated.generated?(blob, lambda { raise DataLoadedError.new }), "#{name} was not recognized as a generated file"
assert Generated.generated?(blob, lambda { raise DataLoadedError.new }), "#{blob} was not recognized as a generated file"
rescue DataLoadedError
assert false, "Data was loaded when calling generated? on #{name}"
assert false, "Data was loaded when calling generated? on #{blob}"
end
end
def generated_loading_data(name)
blob = File.join(samples_path, name)
assert_raises(DataLoadedError, "Data wasn't loaded when calling generated? on #{name}") do
def generated_loading_data(blob)
assert_raises(DataLoadedError, "Data wasn't loaded when calling generated? on #{blob}") do
Generated.generated?(blob, lambda { raise DataLoadedError.new })
end
end
def test_check_generated_without_loading_data
def generated_fixture_without_loading_data(name)
generated_without_loading_data(File.join(fixtures_path, name))
end
def generated_fixture_loading_data(name)
generated_loading_data(File.join(fixtures_path, name))
end
def generated_sample_without_loading_data(name)
generated_without_loading_data(File.join(samples_path, name))
end
def generated_sample_loading_data(name)
generated_loading_data(File.join(samples_path, name))
end
def test_check_generated
# Xcode project files
generated_without_loading_data("Binary/MainMenu.nib")
generated_without_loading_data("Dummy/foo.xcworkspacedata")
generated_without_loading_data("Dummy/foo.xcuserstate")
generated_sample_without_loading_data("Binary/MainMenu.nib")
generated_sample_without_loading_data("Dummy/foo.xcworkspacedata")
generated_sample_without_loading_data("Dummy/foo.xcuserstate")
# .NET designer file
generated_without_loading_data("Dummu/foo.designer.cs")
generated_sample_without_loading_data("Dummu/foo.designer.cs")
# Composer generated composer.lock file
generated_without_loading_data("JSON/composer.lock")
generated_sample_without_loading_data("JSON/composer.lock")
# Node modules
generated_without_loading_data("Dummy/node_modules/foo.js")
generated_sample_without_loading_data("Dummy/node_modules/foo.js")
# Godep saved dependencies
generated_without_loading_data("Godeps/Godeps.json")
generated_without_loading_data("Godeps/_workspace/src/github.com/kr/s3/sign.go")
generated_sample_without_loading_data("Godeps/Godeps.json")
generated_sample_without_loading_data("Godeps/_workspace/src/github.com/kr/s3/sign.go")
# Generated by Zephir
generated_without_loading_data("C/exception.zep.c")
generated_without_loading_data("C/exception.zep.h")
generated_without_loading_data("PHP/exception.zep.php")
generated_sample_without_loading_data("C/exception.zep.c")
generated_sample_without_loading_data("C/exception.zep.h")
generated_sample_without_loading_data("PHP/exception.zep.php")
# Minified files
generated_loading_data("JavaScript/jquery-1.6.1.min.js")
generated_sample_loading_data("JavaScript/jquery-1.6.1.min.js")
# Source Map
generated_fixture_without_loading_data("Data/bootstrap.css.map")
generated_fixture_loading_data("Data/sourcemap.v3.map")
generated_fixture_loading_data("Data/sourcemap.v1.map")
end
end

View File

@@ -13,7 +13,6 @@ class TestGrammars < Minitest::Test
# These grammars have no license but have been grandfathered in. New grammars
# must have a license that allows redistribution.
"vendor/grammars/Sublime-Lasso",
"vendor/grammars/Sublime-REBOL",
"vendor/grammars/x86-assembly-textmate-bundle"
].freeze

1
vendor/grammars/Sublime-Red vendored Submodule