Adding Google Apps Script (.gs) as a JavaScript extension.

This commit is contained in:
Michael Johnson
2014-08-24 17:00:37 -04:00
parent edaea7bede
commit 410aace222
6 changed files with 759 additions and 74 deletions

View File

@@ -31,6 +31,9 @@ module Linguist
if languages.all? { |l| ["Rebol", "R"].include?(l) }
disambiguate_r(data, languages)
end
if languages.all? { |l| ["Gosu", "JavaScript"].include?(l) }
disambiguate_gosu(data, languages)
end
end
end
@@ -83,6 +86,12 @@ module Linguist
matches
end
def self.disambiguate_gosu(data, languages)
matches = []
matches << Language["Gosu"] if /^uses java\./.match(data)
matches
end
def self.active?
!!ACTIVE
end

View File

@@ -1142,6 +1142,7 @@ JavaScript:
- .bones
- .es6
- .frag
- .gs
- .jake
- .jsfl
- .jsm

View File

@@ -288,6 +288,7 @@
],
"JavaScript": [
".frag",
".gs",
".js",
".script!",
".xsjs",
@@ -839,8 +840,8 @@
"exception.zep.php"
]
},
"tokens_total": 654479,
"languages_total": 898,
"tokens_total": 655811,
"languages_total": 901,
"tokens": {
"ABAP": {
"*/**": 1,
@@ -26433,46 +26434,46 @@
"in": 3,
"Hello": 2,
"gst": 1,
"<": 1,
"<": 2,
"%": 2,
"@": 1,
"params": 1,
"(": 53,
"(": 122,
"users": 2,
"Collection": 1,
"<User>": 1,
")": 54,
")": 123,
"<%>": 2,
"for": 2,
"user": 1,
"{": 28,
"{": 72,
"user.LastName": 1,
"}": 28,
"}": 72,
"user.FirstName": 1,
"user.Department": 1,
"package": 2,
"package": 3,
"example": 2,
"enhancement": 1,
"String": 6,
"function": 11,
"String": 14,
"function": 16,
"toPerson": 1,
"Person": 7,
"var": 10,
"var": 17,
"vals": 4,
"this.split": 1,
"return": 4,
"new": 6,
"return": 17,
"new": 8,
"[": 4,
"]": 4,
"as": 3,
"as": 7,
"int": 2,
"Relationship.valueOf": 2,
"hello": 1,
"print": 3,
"uses": 2,
"uses": 8,
"java.util.*": 1,
"java.io.File": 1,
"class": 1,
"class": 2,
"extends": 1,
"Contact": 1,
"implements": 1,
@@ -26488,24 +26489,24 @@
"delegate": 1,
"_emailHelper": 2,
"represents": 1,
"enum": 1,
"enum": 2,
"FRIEND": 1,
"FAMILY": 1,
"BUSINESS_CONTACT": 1,
"static": 7,
"static": 26,
"ALL_PEOPLE": 2,
"HashMap": 1,
"<String,>": 1,
"construct": 1,
"name": 4,
"construct": 2,
"name": 12,
"age": 4,
"relationship": 2,
"EmailHelper": 1,
"this": 1,
"property": 2,
"get": 1,
"property": 13,
"get": 11,
"Name": 3,
"set": 1,
"set": 2,
"override": 1,
"getEmailName": 1,
"incrementAge": 1,
@@ -26514,10 +26515,10 @@
"printPersonInfo": 1,
"addPerson": 4,
"p": 5,
"if": 4,
"if": 19,
"ALL_PEOPLE.containsKey": 2,
".Name": 1,
"throw": 1,
"throw": 5,
"IllegalArgumentException": 1,
"p.Name": 2,
"addAllPeople": 1,
@@ -26525,7 +26526,7 @@
"List": 1,
"<Contact>": 1,
"contact": 3,
"typeis": 1,
"typeis": 2,
"and": 1,
"not": 1,
"contact.Name": 1,
@@ -26551,7 +26552,7 @@
"result.getInt": 1,
"loadFromFile": 1,
"file": 3,
"File": 2,
"File": 3,
"file.eachLine": 1,
"line": 1,
"line.HasContent": 1,
@@ -26560,7 +26561,123 @@
"writer": 2,
"FileWriter": 1,
"PersonCSVTemplate.renderToString": 1,
"PersonCSVTemplate.render": 1
"PersonCSVTemplate.render": 1,
"ronin": 1,
"gw.util.concurrent.LockingLazyVar": 1,
"gw.lang.reflect.*": 1,
"java.lang.*": 1,
"java.io.*": 1,
"ronin.config.*": 1,
"org.slf4j.*": 1,
"Ronin": 1,
"_CONFIG": 13,
"IRoninConfig": 2,
"Config": 1,
"_CURRENT_REQUEST": 1,
"ThreadLocal": 1,
"<RoninRequest>": 1,
";": 1,
"private": 1,
"internal": 2,
"init": 1,
"servlet": 3,
"RoninServlet": 3,
"m": 3,
"ApplicationMode": 2,
"src": 2,
"null": 15,
"cfg": 2,
"TypeSystem.getByFullNameIfValid": 2,
"defaultWarning": 3,
"false": 1,
"ctor": 2,
"cfg.TypeInfo.getConstructor": 1,
"ronin.config.ApplicationMode": 1,
"ronin.RoninServlet": 1,
"ctor.Constructor.newInstance": 1,
"else": 9,
"DefaultRoninConfig": 1,
"true": 2,
"roninLogger": 2,
"roninLogger.TypeInfo.getMethod": 1,
"ronin.config.LogLevel": 1,
".CallHandler.handleCall": 1,
"LogLevel": 5,
"log": 2,
"level": 7,
"WARN": 2,
"Quartz.maybeStart": 1,
"ReloadManager.setSourceRoot": 1,
"CurrentRequest": 3,
"req": 2,
"RoninRequest": 2,
"_CURRENT_REQUEST.set": 1,
"//": 2,
"CurrentTrace": 1,
"Trace": 1,
".Trace": 1,
"_CURRENT_REQUEST.get": 1,
"Mode": 1,
".Mode": 1,
"TESTING": 1,
".LogLevel": 1,
"DEBUG": 2,
"TraceEnabled": 1,
"boolean": 1,
"_CONFIG.TraceEnabled": 1,
"DefaultAction": 1,
".DefaultAction": 1,
"DefaultController": 1,
"Type": 1,
".DefaultController": 1,
".RoninServlet": 1,
"ErrorHandler": 1,
"IErrorHandler": 1,
".ErrorHandler": 1,
"LogHandler": 1,
"ILogHandler": 1,
".LogHandler": 2,
"msg": 4,
"Object": 1,
"component": 7,
"exception": 7,
"java.lang.Throwable": 1,
"INFO": 2,
"msgStr": 9,
"block": 3,
"_CONFIG.LogHandler.log": 1,
"switch": 1,
"case": 6,
"TRACE": 1,
"LoggerFactory.getLogger": 5,
"Logger.ROOT_LOGGER_NAME": 5,
".trace": 1,
"break": 5,
".debug": 1,
".info": 1,
".warn": 1,
"ERROR": 1,
"FATAL": 1,
".error": 1,
"CacheStore": 3,
"REQUEST": 3,
"SESSION": 3,
"APPLICATION": 3,
"cache": 1,
"<T>": 2,
"value": 4,
"T": 2,
"store": 10,
"or": 2,
"_CONFIG.RequestCache.getValue": 1,
"_CONFIG.SessionCache.getValue": 1,
"_CONFIG.ApplicationCache.getValue": 1,
"invalidate": 1,
"_CONFIG.RequestCache.invalidate": 1,
"_CONFIG.SessionCache.invalidate": 1,
"_CONFIG.ApplicationCache.invalidate": 1,
"loadChanges": 1,
"ReloadManager.detectAndReloadChangedResources": 1
},
"Grace": {
"method": 10,
@@ -29432,15 +29549,15 @@
".internalBuildGeneratedFileFrom": 1
},
"JavaScript": {
"function": 1214,
"(": 8528,
")": 8536,
"{": 2742,
";": 4066,
"function": 1235,
"(": 8618,
")": 8626,
"{": 2780,
";": 4151,
"//": 410,
"jshint": 1,
"_": 9,
"var": 916,
"var": 944,
"Modal": 2,
"content": 5,
"options": 56,
@@ -29451,20 +29568,20 @@
".proxy": 1,
"this.hide": 1,
"this": 578,
"}": 2718,
"}": 2756,
"Modal.prototype": 1,
"constructor": 8,
"toggle": 10,
"return": 947,
"[": 1461,
"return": 962,
"[": 1476,
"this.isShown": 3,
"]": 1458,
"]": 1473,
"show": 10,
"that": 33,
"e": 663,
".Event": 1,
"element.trigger": 1,
"if": 1230,
"if": 1243,
"||": 648,
"e.isDefaultPrevented": 2,
".addClass": 1,
@@ -29473,7 +29590,7 @@
"backdrop.call": 1,
"transition": 1,
".support.transition": 1,
"&&": 1017,
"&&": 1021,
"that.": 3,
"element.hasClass": 1,
"element.parent": 1,
@@ -29486,7 +29603,7 @@
"hide": 8,
"body": 22,
"modal": 4,
"-": 706,
"-": 719,
"open": 2,
"fade": 4,
"hidden": 12,
@@ -29508,6 +29625,36 @@
"target.modal": 1,
"option": 12,
"window.jQuery": 7,
"TagsTotalPerMonth": 4,
"TagsTotalPerMonth.getDatasource": 1,
"category": 6,
"months": 8,
"values": 20,
"new": 91,
"CategoryMonthlyExpenseBarChartDataSource": 1,
"TagsTotalPerMonth.getType": 1,
"Charts.ChartType.COLUMN": 2,
"TagsTotalPerMonthWithMean": 4,
"TagsTotalPerMonthWithMean.getDatasource": 1,
"CategoryMonthlyWithMeanExpenseDataSource": 1,
"TagsTotalPerMonthWithMean.getType": 1,
"Charts.ChartType.LINE": 1,
"TagsAccumulatedPerMonth": 4,
"TagsAccumulatedPerMonth.getDatasource": 1,
"CategoryMonthlyAccumulated": 1,
"TagsAccumulatedPerMonth.getType": 1,
"Charts.ChartType.AREA": 1,
"MonthTotalsPerTags": 4,
"MonthTotalsPerTags.getDatasource": 1,
"month": 3,
"tags": 2,
"CategoryExpenseDataSource": 1,
"MonthTotalsPerTags.getType": 1,
"Charts.ChartType.PIE": 1,
"SavingsFlowChartComposer": 3,
"SavingsFlowChartComposer.getDatasource": 1,
"SavingsFlowDataSource": 1,
"SavingsFlowChartComposer.getType": 1,
"Animal": 12,
"Horse": 12,
"Snake": 12,
@@ -29518,7 +29665,7 @@
"__extends": 6,
"child": 17,
"parent": 15,
"for": 262,
"for": 264,
"key": 85,
"__hasProp.call": 2,
"ctor": 6,
@@ -29526,14 +29673,13 @@
"ctor.prototype": 3,
"parent.prototype": 6,
"child.prototype": 4,
"new": 86,
"child.__super__": 3,
"name": 161,
"this.name": 7,
"Animal.prototype.move": 2,
"meters": 4,
"alert": 11,
"+": 1136,
"+": 1155,
"Snake.__super__.constructor.apply": 2,
"arguments": 83,
"Snake.prototype.move": 2,
@@ -29552,7 +29698,7 @@
"console.log": 3,
"hanaMath": 1,
".import": 1,
"x": 41,
"x": 46,
"parseFloat": 32,
".request.parameters.get": 2,
"y": 109,
@@ -29588,11 +29734,11 @@
"process.env.NODE_DEBUG": 2,
"/http/.test": 1,
"console.error": 3,
"else": 307,
"else": 309,
"parserOnHeaders": 2,
"headers": 41,
"this.maxHeaderPairs": 2,
"<": 209,
"<": 211,
"this._headers.length": 1,
"this._headers": 13,
"this._headers.concat": 1,
@@ -29613,11 +29759,11 @@
"info.versionMinor": 2,
"parser.incoming.httpVersion": 1,
"parser.incoming.url": 1,
"n": 874,
"n": 875,
"headers.length": 2,
"parser.maxHeaderPairs": 4,
"Math.min": 5,
"i": 853,
"i": 857,
"k": 302,
"v": 135,
"parser.incoming._addHeaderLine": 2,
@@ -29748,7 +29894,7 @@
"IncomingMessage.prototype._emitEnd": 1,
"IncomingMessage.prototype._addHeaderLine": 1,
"field": 36,
"value": 98,
"value": 103,
"dest": 12,
"field.toLowerCase": 1,
"switch": 30,
@@ -29859,7 +30005,7 @@
"DTRACE_HTTP_CLIENT_REQUEST": 1,
"OutgoingMessage.prototype._flush": 1,
"this.socket.writable": 2,
"XXX": 1,
"XXX": 2,
"Necessary": 1,
"this.socket.write": 1,
"req": 32,
@@ -30169,7 +30315,87 @@
"this.length": 41,
"app": 3,
"angular.module": 1,
"A": 24,
"sendToGoogleDrive": 1,
"gmailLabels": 2,
"driveFolder": 3,
"spreadsheetName": 3,
"archiveLabel": 4,
"itauNotificationEmail": 2,
"filter": 12,
"moveToLabel": 4,
"GmailApp.getUserLabelByName": 1,
"GmailApp.createLabel": 1,
"folders": 1,
"DriveApp.getFoldersByName": 1,
"folder": 3,
"folders.hasNext": 1,
"folders.next": 1,
"DriveApp.createFolder": 1,
"files": 1,
"folder.getFilesByName": 1,
"file": 10,
"doc": 7,
"files.hasNext": 1,
"files.next": 1,
"SpreadsheetApp.openById": 1,
"file.getId": 1,
"SpreadsheetApp.create": 1,
"DriveApp.getFileById": 1,
"doc.getId": 1,
"folder.addFile": 1,
"DriveApp.removeFile": 1,
"sheet": 1,
"doc.getSheets": 1,
"sheet.getLastRow": 1,
"sheet.appendRow": 2,
"message": 7,
"messages": 3,
"account": 5,
"operation": 7,
"date": 7,
"hour": 6,
"emailID": 4,
"plainBody": 9,
"accountRegex": 1,
"/Conta": 1,
"/": 298,
"operationRegex": 1,
"/Tipo": 1,
"de": 3,
"opera": 5,
"o": 323,
"A": 26,
"Z": 7,
"paymentRegex": 1,
"/Pagamento": 1,
"Za": 3,
"z": 22,
"valueRegex": 1,
"/Valor": 1,
"R": 3,
".": 92,
"dateRegex": 1,
"/Data": 1,
"hourRegex": 1,
"/Hora": 1,
"emailIDRegex": 1,
"/E": 1,
"mail": 1,
"threads": 3,
"GmailApp.search": 1,
"threads.length": 1,
".getMessages": 1,
"messages.length": 1,
"message.getPlainBody": 1,
"accountRegex.test": 1,
"RegExp.": 10,
"operationRegex.test": 1,
"valueRegex.test": 1,
"dateRegex.test": 1,
"hourRegex.test": 1,
"emailIDRegex.test": 1,
"paymentRegex.test": 1,
".addLabel": 1,
"w": 110,
"ma": 3,
"c.isReady": 4,
@@ -30191,13 +30417,11 @@
"X": 6,
"f": 666,
"a.length": 23,
"o": 322,
"c.isFunction": 9,
"d.call": 3,
"J": 5,
".getTime": 3,
"Y": 3,
"Z": 6,
"na": 1,
".type": 2,
"c.event.handle.apply": 1,
@@ -30236,7 +30460,6 @@
"j.handleObj.origHandler.apply": 1,
"pa": 1,
"b.replace": 3,
"/": 290,
"./g": 2,
".replace": 38,
"/g": 37,
@@ -30283,7 +30506,6 @@
"|": 206,
"#": 13,
"Ua": 1,
".": 91,
"Va": 1,
"S/": 4,
"Wa": 2,
@@ -30300,7 +30522,6 @@
"aa": 1,
"ba": 3,
"Array.prototype.push": 4,
"R": 2,
"ya": 2,
"Array.prototype.indexOf": 4,
"c.fn": 2,
@@ -30436,7 +30657,6 @@
"webkit": 6,
"w.": 17,
"/.exec": 4,
"opera": 4,
".*version": 4,
"msie": 4,
"/compatible/.test": 1,
@@ -30561,7 +30781,6 @@
"Aa": 3,
"t": 436,
"ca": 6,
"Za": 2,
"r/g": 2,
"/href": 1,
"src": 7,
@@ -30705,7 +30924,6 @@
"_change_data": 6,
"focusout": 11,
"change": 16,
"file": 5,
".specialChange": 4,
"focusin": 9,
"bind": 3,
@@ -30753,7 +30971,6 @@
"expr": 2,
"p.pop": 4,
"set": 22,
"z": 21,
"h.parentNode": 3,
"D": 9,
"k.error": 2,
@@ -30815,7 +31032,6 @@
"CLASS": 1,
"HTML": 9,
"find": 7,
"filter": 10,
"nextSibling": 3,
"iframe": 3,
"</\"+d+\">": 1,
@@ -30952,7 +31168,6 @@
"jQuery.fn": 4,
"jQuery.prototype": 2,
"match": 30,
"doc": 4,
"Handle": 14,
"DOMElement": 2,
"selector.nodeType": 2,
@@ -31000,7 +31215,6 @@
"Only": 5,
"deal": 2,
"null/undefined": 2,
"values": 10,
"Extend": 2,
"base": 2,
"Prevent": 2,
@@ -32430,7 +32644,6 @@
"bt": 42,
"bu": 11,
"bv": 2,
"de": 1,
"bw": 2,
"bz": 7,
"bA": 3,
@@ -32468,7 +32681,6 @@
"a.currentStyle": 4,
"a.currentStyle.filter": 1,
"a.style.filter": 1,
"RegExp.": 1,
"c.zoom": 1,
"b*100": 1,
"d.filter": 1,
@@ -32503,10 +32715,8 @@
"/mg": 1,
"bJ": 1,
"color": 4,
"date": 1,
"datetime": 1,
"email": 2,
"month": 1,
"range": 2,
"search": 5,
"tel": 2,
@@ -35329,7 +35539,6 @@
"RE_OCT_NUMBER.test": 1,
"RE_DEC_NUMBER.test": 1,
"JS_Parse_Error": 2,
"message": 5,
"this.col": 2,
"ex": 3,
"ex.name": 1,
@@ -72585,7 +72794,7 @@
"GLSL": 4076,
"Game Maker Language": 13310,
"Gnuplot": 1023,
"Gosu": 410,
"Gosu": 1008,
"Grace": 1381,
"Grammatical Framework": 10607,
"Groovy": 93,
@@ -72608,7 +72817,7 @@
"JSONiq": 151,
"Jade": 3,
"Java": 8987,
"JavaScript": 77056,
"JavaScript": 77790,
"Julia": 247,
"KRL": 25,
"Kit": 6,
@@ -72796,7 +73005,7 @@
"GLSL": 7,
"Game Maker Language": 13,
"Gnuplot": 6,
"Gosu": 4,
"Gosu": 5,
"Grace": 2,
"Grammatical Framework": 41,
"Groovy": 5,
@@ -72819,7 +73028,7 @@
"JSONiq": 2,
"Jade": 1,
"Java": 6,
"JavaScript": 24,
"JavaScript": 26,
"Julia": 1,
"KRL": 1,
"Kit": 1,
@@ -72949,5 +73158,5 @@
"fish": 3,
"wisp": 1
},
"md5": "b7e3e6804093f11267b22f781f54de75"
"md5": "37d31e7fbe17f173ee31e228d9928be6"
}