From 5d4a24dd4f92073e96628f9fc04b5c8aab291854 Mon Sep 17 00:00:00 2001 From: "Dennis J. McWherter Jr" Date: Fri, 22 Aug 2014 20:51:36 -0500 Subject: [PATCH] Added PigLatin language identification. Updated languages.yml to associate *.pig files with PigLatin. Added pig script example to samples/. Updated the samples.json with to account for new sample. --- lib/linguist/languages.yml | 7 +++++++ lib/linguist/samples.json | 34 +++++++++++++++++++++++++++++++--- samples/PigLatin/example.pig | 10 ++++++++++ 3 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 samples/PigLatin/example.pig diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index b306aea5..8812b92f 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1714,6 +1714,13 @@ Perl6: - .pl6 - .pm6 +PigLatin: + type: programming + color: "#fcd7de" + lexer: Text only + extensions: + - .pig + Pike: type: programming color: "#066ab2" diff --git a/lib/linguist/samples.json b/lib/linguist/samples.json index dd234ab0..d1bbdd78 100644 --- a/lib/linguist/samples.json +++ b/lib/linguist/samples.json @@ -481,6 +481,9 @@ ".p6", ".pm6" ], + "PigLatin": [ + ".pig" + ], "Pike": [ ".pike", ".pmod" @@ -839,8 +842,8 @@ "exception.zep.php" ] }, - "tokens_total": 654479, - "languages_total": 898, + "tokens_total": 654509, + "languages_total": 899, "tokens": { "ABAP": { "*/**": 1, @@ -55158,6 +55161,29 @@ "": 1, "roleq": 1 }, + "PigLatin": { + "REGISTER": 1, + "SOME_JAR": 1, + ";": 4, + "A": 2, + "LOAD": 1, + "USING": 1, + "PigStorage": 1, + "(": 2, + ")": 2, + "AS": 1, + "name": 2, + "chararray": 1, + "age": 1, + "int": 1, + "-": 2, + "Load": 1, + "person": 1, + "B": 2, + "FOREACH": 1, + "generate": 1, + "DUMP": 1 + }, "Pike": { "#pike": 2, "__REAL_VERSION__": 2, @@ -72665,6 +72691,7 @@ "Pascal": 30, "Perl": 20690, "Perl6": 372, + "PigLatin": 30, "Pike": 1835, "Pod": 658, "PogoScript": 250, @@ -72876,6 +72903,7 @@ "Pascal": 1, "Perl": 17, "Perl6": 3, + "PigLatin": 1, "Pike": 2, "Pod": 1, "PogoScript": 1, @@ -72949,5 +72977,5 @@ "fish": 3, "wisp": 1 }, - "md5": "b7e3e6804093f11267b22f781f54de75" + "md5": "17cee34e914b3954bc81eacdef0b0ab8" } \ No newline at end of file diff --git a/samples/PigLatin/example.pig b/samples/PigLatin/example.pig new file mode 100644 index 00000000..6c6f73a8 --- /dev/null +++ b/samples/PigLatin/example.pig @@ -0,0 +1,10 @@ +/** + * sample.pig + */ + +REGISTER $SOME_JAR; + +A = LOAD 'person' USING PigStorage() AS (name:chararray, age:int); -- Load person +B = FOREACH A generate name; +DUMP B; +