Added support for AL (#2300)
This commit is contained in:
parent
ac297ba525
commit
de21eb6418
File diff suppressed because one or more lines are too long
|
@ -91,6 +91,10 @@
|
|||
"title": "Ada",
|
||||
"owner": "Lucretia"
|
||||
},
|
||||
"al": {
|
||||
"title": "AL",
|
||||
"owner": "RunDevelopment"
|
||||
},
|
||||
"antlr4": {
|
||||
"title": "ANTLR4",
|
||||
"alias": "g4",
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
// based on https://github.com/microsoft/AL/blob/master/grammar/alsyntax.tmlanguage
|
||||
|
||||
Prism.languages.al = {
|
||||
'comment': /\/\/.*|\/\*[\s\S]*?\*\//,
|
||||
'string': {
|
||||
pattern: /'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,
|
||||
greedy: true
|
||||
},
|
||||
'function': {
|
||||
pattern: /(\b(?:event|procedure|trigger)\s+|(?:^|[^.])\.\s*)[a-z_]\w*(?=\s*\()/i,
|
||||
lookbehind: true
|
||||
},
|
||||
'keyword': [
|
||||
// keywords
|
||||
/\b(?:array|asserterror|begin|break|case|do|downto|else|end|event|exit|for|foreach|function|if|implements|in|indataset|interface|internal|local|of|procedure|program|protected|repeat|runonclient|securityfiltering|suppressdispose|temporary|then|to|trigger|until|var|while|with|withevents)\b/i,
|
||||
// objects and metadata that are used like keywords
|
||||
/\b(?:action|actions|addafter|addbefore|addfirst|addlast|area|assembly|chartpart|codeunit|column|controladdin|cuegroup|customizes|dataitem|dataset|dotnet|elements|enum|enumextension|extends|field|fieldattribute|fieldelement|fieldgroup|fieldgroups|fields|filter|fixed|grid|group|key|keys|label|labels|layout|modify|moveafter|movebefore|movefirst|movelast|page|pagecustomization|pageextension|part|profile|query|repeater|report|requestpage|schema|separator|systempart|table|tableelement|tableextension|textattribute|textelement|type|usercontrol|value|xmlport)\b/i
|
||||
],
|
||||
'number': /\b(?:0x[\da-f]+|(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(?:F|U(?:LL?)?|LL?)?\b/i,
|
||||
'boolean': /\b(?:false|true)\b/i,
|
||||
'variable': /\b(?:Curr(?:FieldNo|Page|Report)|RequestOptionsPage|x?Rec)\b/,
|
||||
'class-name': /\b(?:automation|biginteger|bigtext|blob|boolean|byte|char|clienttype|code|completiontriggererrorlevel|connectiontype|database|dataclassification|datascope|date|dateformula|datetime|decimal|defaultlayout|dialog|dictionary|dotnetassembly|dotnettypedeclaration|duration|errorinfo|errortype|executioncontext|executionmode|fieldclass|fieldref|fieldtype|file|filterpagebuilder|guid|httpclient|httpcontent|httpheaders|httprequestmessage|httpresponsemessage|instream|integer|joker|jsonarray|jsonobject|jsontoken|jsonvalue|keyref|list|moduledependencyinfo|moduleinfo|none|notification|notificationscope|objecttype|option|outstream|pageresult|record|recordid|recordref|reportformat|securityfilter|sessionsettings|tableconnectiontype|tablefilter|testaction|testfield|testfilterfield|testpage|testpermissions|testrequestpage|text|textbuilder|textconst|textencoding|time|transactionmodel|transactiontype|variant|verbosity|version|view|views|webserviceactioncontext|webserviceactionresultcode|xmlattribute|xmlattributecollection|xmlcdata|xmlcomment|xmldeclaration|xmldocument|xmldocumenttype|xmlelement|xmlnamespacemanager|xmlnametable|xmlnode|xmlnodelist|xmlprocessinginstruction|xmlreadoptions|xmltext|xmlwriteoptions)\b/i,
|
||||
'operator': /\.\.|:[=:]|[-+*/]=?|<>|[<>]=?|=|\b(?:and|div|mod|not|or|xor)\b/i,
|
||||
'punctuation': /[()\[\]{}:.;,]/
|
||||
};
|
|
@ -0,0 +1 @@
|
|||
Prism.languages.al={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,greedy:!0},function:{pattern:/(\b(?:event|procedure|trigger)\s+|(?:^|[^.])\.\s*)[a-z_]\w*(?=\s*\()/i,lookbehind:!0},keyword:[/\b(?:array|asserterror|begin|break|case|do|downto|else|end|event|exit|for|foreach|function|if|implements|in|indataset|interface|internal|local|of|procedure|program|protected|repeat|runonclient|securityfiltering|suppressdispose|temporary|then|to|trigger|until|var|while|with|withevents)\b/i,/\b(?:action|actions|addafter|addbefore|addfirst|addlast|area|assembly|chartpart|codeunit|column|controladdin|cuegroup|customizes|dataitem|dataset|dotnet|elements|enum|enumextension|extends|field|fieldattribute|fieldelement|fieldgroup|fieldgroups|fields|filter|fixed|grid|group|key|keys|label|labels|layout|modify|moveafter|movebefore|movefirst|movelast|page|pagecustomization|pageextension|part|profile|query|repeater|report|requestpage|schema|separator|systempart|table|tableelement|tableextension|textattribute|textelement|type|usercontrol|value|xmlport)\b/i],number:/\b(?:0x[\da-f]+|(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(?:F|U(?:LL?)?|LL?)?\b/i,boolean:/\b(?:false|true)\b/i,variable:/\b(?:Curr(?:FieldNo|Page|Report)|RequestOptionsPage|x?Rec)\b/,"class-name":/\b(?:automation|biginteger|bigtext|blob|boolean|byte|char|clienttype|code|completiontriggererrorlevel|connectiontype|database|dataclassification|datascope|date|dateformula|datetime|decimal|defaultlayout|dialog|dictionary|dotnetassembly|dotnettypedeclaration|duration|errorinfo|errortype|executioncontext|executionmode|fieldclass|fieldref|fieldtype|file|filterpagebuilder|guid|httpclient|httpcontent|httpheaders|httprequestmessage|httpresponsemessage|instream|integer|joker|jsonarray|jsonobject|jsontoken|jsonvalue|keyref|list|moduledependencyinfo|moduleinfo|none|notification|notificationscope|objecttype|option|outstream|pageresult|record|recordid|recordref|reportformat|securityfilter|sessionsettings|tableconnectiontype|tablefilter|testaction|testfield|testfilterfield|testpage|testpermissions|testrequestpage|text|textbuilder|textconst|textencoding|time|transactionmodel|transactiontype|variant|verbosity|version|view|views|webserviceactioncontext|webserviceactionresultcode|xmlattribute|xmlattributecollection|xmlcdata|xmlcomment|xmldeclaration|xmldocument|xmldocumenttype|xmlelement|xmlnamespacemanager|xmlnametable|xmlnode|xmlnodelist|xmlprocessinginstruction|xmlreadoptions|xmltext|xmlwriteoptions)\b/i,operator:/\.\.|:[=:]|[-+*/]=?|<>|[<>]=?|=|\b(?:and|div|mod|not|or|xor)\b/i,punctuation:/[()\[\]{}:.;,]/};
|
|
@ -0,0 +1,60 @@
|
|||
<h2>Full example</h2>
|
||||
<pre><code>// Source: https://github.com/microsoft/AL/blob/master/samples/ControlAddIn/al/Page/CustomerCardAddIn.al
|
||||
|
||||
pageextension 50300 CustomerCardAddIn extends "Customer Card"
|
||||
{
|
||||
layout
|
||||
{
|
||||
addafter(Blocked)
|
||||
{
|
||||
usercontrol(ControlName; TestAddIn)
|
||||
{
|
||||
ApplicationArea = All;
|
||||
|
||||
trigger Callback(i : integer; s: text; d : decimal; c : char)
|
||||
begin
|
||||
Message('Got from js: %1, %2, %3, %4', i, s, d, c);
|
||||
end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
actions
|
||||
{
|
||||
addafter(Approve)
|
||||
{
|
||||
action(CallJavaScript)
|
||||
{
|
||||
ApplicationArea = All;
|
||||
|
||||
trigger OnAction();
|
||||
begin
|
||||
CurrPage.ControlName.CallJavaScript(5, 'text', 6.3, 'c');
|
||||
end;
|
||||
}
|
||||
|
||||
action(CallViaCodeunit)
|
||||
{
|
||||
ApplicationArea = All;
|
||||
|
||||
trigger OnAction();
|
||||
var c : Codeunit AddInHelpers;
|
||||
begin
|
||||
c.CallJavaScript(CurrPage.ControlName);
|
||||
end;
|
||||
}
|
||||
|
||||
action(CallStaleControlAddIn)
|
||||
{
|
||||
ApplicationArea = All;
|
||||
|
||||
trigger OnAction();
|
||||
var c : Codeunit AddInHelpersSingleton;
|
||||
begin
|
||||
c.CallStaleAddInMethod();
|
||||
Message('Probably nothing should happen...');
|
||||
end;
|
||||
}
|
||||
}
|
||||
}
|
||||
}</code></pre>
|
|
@ -21,6 +21,7 @@
|
|||
"js": "JavaScript",
|
||||
"abap": "ABAP",
|
||||
"abnf": "Augmented Backus–Naur form",
|
||||
"al": "AL",
|
||||
"antlr4": "ANTLR4",
|
||||
"g4": "ANTLR4",
|
||||
"apacheconf": "Apache Configuration",
|
||||
|
|
|
@ -1 +1 @@
|
|||
!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"Backus–Naur form",rbnf:"Routing Backus–Naur form",conc:"Concurnas",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",iecst:"Structured Text (IEC 61131-3)",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras","js-templates":"JS Templates",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",py:"Python",q:"Q (kdb+ database)",qml:"QML",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",solidity:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",trig:"TriG",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||r[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}();
|
||||
!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"Backus–Naur form",rbnf:"Routing Backus–Naur form",conc:"Concurnas",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",iecst:"Structured Text (IEC 61131-3)",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras","js-templates":"JS Templates",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",py:"Python",q:"Q (kdb+ database)",qml:"QML",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",solidity:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",trig:"TriG",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||r[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}();
|
|
@ -0,0 +1,17 @@
|
|||
false
|
||||
true
|
||||
FALSE
|
||||
TRUE
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["boolean", "false"],
|
||||
["boolean", "true"],
|
||||
["boolean", "FALSE"],
|
||||
["boolean", "TRUE"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for booleans.
|
|
@ -0,0 +1,211 @@
|
|||
automation
|
||||
biginteger
|
||||
bigtext
|
||||
blob
|
||||
boolean
|
||||
byte
|
||||
char
|
||||
clienttype
|
||||
code
|
||||
completiontriggererrorlevel
|
||||
connectiontype
|
||||
database
|
||||
dataclassification
|
||||
datascope
|
||||
date
|
||||
dateformula
|
||||
datetime
|
||||
decimal
|
||||
defaultlayout
|
||||
dialog
|
||||
dictionary
|
||||
dotnetassembly
|
||||
dotnettypedeclaration
|
||||
duration
|
||||
errorinfo
|
||||
errortype
|
||||
executioncontext
|
||||
executionmode
|
||||
fieldclass
|
||||
fieldref
|
||||
fieldtype
|
||||
file
|
||||
filterpagebuilder
|
||||
guid
|
||||
httpclient
|
||||
httpcontent
|
||||
httpheaders
|
||||
httprequestmessage
|
||||
httpresponsemessage
|
||||
instream
|
||||
integer
|
||||
joker
|
||||
jsonarray
|
||||
jsonobject
|
||||
jsontoken
|
||||
jsonvalue
|
||||
keyref
|
||||
list
|
||||
moduledependencyinfo
|
||||
moduleinfo
|
||||
none
|
||||
notification
|
||||
notificationscope
|
||||
objecttype
|
||||
option
|
||||
outstream
|
||||
pageresult
|
||||
record
|
||||
recordid
|
||||
recordref
|
||||
reportformat
|
||||
securityfilter
|
||||
sessionsettings
|
||||
tableconnectiontype
|
||||
tablefilter
|
||||
testaction
|
||||
testfield
|
||||
testfilterfield
|
||||
testpage
|
||||
testpermissions
|
||||
testrequestpage
|
||||
text
|
||||
textbuilder
|
||||
textconst
|
||||
textencoding
|
||||
time
|
||||
transactionmodel
|
||||
transactiontype
|
||||
variant
|
||||
verbosity
|
||||
version
|
||||
view
|
||||
views
|
||||
webserviceactioncontext
|
||||
webserviceactionresultcode
|
||||
xmlattribute
|
||||
xmlattributecollection
|
||||
xmlcdata
|
||||
xmlcomment
|
||||
xmldeclaration
|
||||
xmldocument
|
||||
xmldocumenttype
|
||||
xmlelement
|
||||
xmlnamespacemanager
|
||||
xmlnametable
|
||||
xmlnode
|
||||
xmlnodelist
|
||||
xmlprocessinginstruction
|
||||
xmlreadoptions
|
||||
xmltext
|
||||
xmlwriteoptions
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["class-name", "automation"],
|
||||
["class-name", "biginteger"],
|
||||
["class-name", "bigtext"],
|
||||
["class-name", "blob"],
|
||||
["class-name", "boolean"],
|
||||
["class-name", "byte"],
|
||||
["class-name", "char"],
|
||||
["class-name", "clienttype"],
|
||||
["class-name", "code"],
|
||||
["class-name", "completiontriggererrorlevel"],
|
||||
["class-name", "connectiontype"],
|
||||
["class-name", "database"],
|
||||
["class-name", "dataclassification"],
|
||||
["class-name", "datascope"],
|
||||
["class-name", "date"],
|
||||
["class-name", "dateformula"],
|
||||
["class-name", "datetime"],
|
||||
["class-name", "decimal"],
|
||||
["class-name", "defaultlayout"],
|
||||
["class-name", "dialog"],
|
||||
["class-name", "dictionary"],
|
||||
["class-name", "dotnetassembly"],
|
||||
["class-name", "dotnettypedeclaration"],
|
||||
["class-name", "duration"],
|
||||
["class-name", "errorinfo"],
|
||||
["class-name", "errortype"],
|
||||
["class-name", "executioncontext"],
|
||||
["class-name", "executionmode"],
|
||||
["class-name", "fieldclass"],
|
||||
["class-name", "fieldref"],
|
||||
["class-name", "fieldtype"],
|
||||
["class-name", "file"],
|
||||
["class-name", "filterpagebuilder"],
|
||||
["class-name", "guid"],
|
||||
["class-name", "httpclient"],
|
||||
["class-name", "httpcontent"],
|
||||
["class-name", "httpheaders"],
|
||||
["class-name", "httprequestmessage"],
|
||||
["class-name", "httpresponsemessage"],
|
||||
["class-name", "instream"],
|
||||
["class-name", "integer"],
|
||||
["class-name", "joker"],
|
||||
["class-name", "jsonarray"],
|
||||
["class-name", "jsonobject"],
|
||||
["class-name", "jsontoken"],
|
||||
["class-name", "jsonvalue"],
|
||||
["class-name", "keyref"],
|
||||
["class-name", "list"],
|
||||
["class-name", "moduledependencyinfo"],
|
||||
["class-name", "moduleinfo"],
|
||||
["class-name", "none"],
|
||||
["class-name", "notification"],
|
||||
["class-name", "notificationscope"],
|
||||
["class-name", "objecttype"],
|
||||
["class-name", "option"],
|
||||
["class-name", "outstream"],
|
||||
["class-name", "pageresult"],
|
||||
["class-name", "record"],
|
||||
["class-name", "recordid"],
|
||||
["class-name", "recordref"],
|
||||
["class-name", "reportformat"],
|
||||
["class-name", "securityfilter"],
|
||||
["class-name", "sessionsettings"],
|
||||
["class-name", "tableconnectiontype"],
|
||||
["class-name", "tablefilter"],
|
||||
["class-name", "testaction"],
|
||||
["class-name", "testfield"],
|
||||
["class-name", "testfilterfield"],
|
||||
["class-name", "testpage"],
|
||||
["class-name", "testpermissions"],
|
||||
["class-name", "testrequestpage"],
|
||||
["class-name", "text"],
|
||||
["class-name", "textbuilder"],
|
||||
["class-name", "textconst"],
|
||||
["class-name", "textencoding"],
|
||||
["class-name", "time"],
|
||||
["class-name", "transactionmodel"],
|
||||
["class-name", "transactiontype"],
|
||||
["class-name", "variant"],
|
||||
["class-name", "verbosity"],
|
||||
["class-name", "version"],
|
||||
["class-name", "view"],
|
||||
["class-name", "views"],
|
||||
["class-name", "webserviceactioncontext"],
|
||||
["class-name", "webserviceactionresultcode"],
|
||||
["class-name", "xmlattribute"],
|
||||
["class-name", "xmlattributecollection"],
|
||||
["class-name", "xmlcdata"],
|
||||
["class-name", "xmlcomment"],
|
||||
["class-name", "xmldeclaration"],
|
||||
["class-name", "xmldocument"],
|
||||
["class-name", "xmldocumenttype"],
|
||||
["class-name", "xmlelement"],
|
||||
["class-name", "xmlnamespacemanager"],
|
||||
["class-name", "xmlnametable"],
|
||||
["class-name", "xmlnode"],
|
||||
["class-name", "xmlnodelist"],
|
||||
["class-name", "xmlprocessinginstruction"],
|
||||
["class-name", "xmlreadoptions"],
|
||||
["class-name", "xmltext"],
|
||||
["class-name", "xmlwriteoptions"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for class names.
|
|
@ -0,0 +1,17 @@
|
|||
// comment
|
||||
/**/
|
||||
/*
|
||||
comment
|
||||
*/
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["comment", "// comment"],
|
||||
["comment", "/**/"],
|
||||
["comment", "/*\n comment\n*/"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for comments.
|
|
@ -0,0 +1,92 @@
|
|||
procedure CallJavaScript(i : integer; s: text; d : decimal; c : char);
|
||||
local procedure AssignGlobalToLocal(var addin : ControlAddIn TestAddIn)
|
||||
trigger Callback(i : integer; s: text; d : decimal; c : char)
|
||||
trigger OnAction();
|
||||
event Callback(i : integer; s: text; d : decimal; c : char);
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["keyword", "procedure"],
|
||||
["function", "CallJavaScript"],
|
||||
["punctuation", "("],
|
||||
"i ",
|
||||
["punctuation", ":"],
|
||||
["class-name", "integer"],
|
||||
["punctuation", ";"],
|
||||
" s",
|
||||
["punctuation", ":"],
|
||||
["class-name", "text"],
|
||||
["punctuation", ";"],
|
||||
" d ",
|
||||
["punctuation", ":"],
|
||||
["class-name", "decimal"],
|
||||
["punctuation", ";"],
|
||||
" c ",
|
||||
["punctuation", ":"],
|
||||
["class-name", "char"],
|
||||
["punctuation", ")"],
|
||||
["punctuation", ";"],
|
||||
|
||||
["keyword", "local"],
|
||||
["keyword", "procedure"],
|
||||
["function", "AssignGlobalToLocal"],
|
||||
["punctuation", "("],
|
||||
["keyword", "var"],
|
||||
" addin ",
|
||||
["punctuation", ":"],
|
||||
["keyword", "ControlAddIn"],
|
||||
" TestAddIn",
|
||||
["punctuation", ")"],
|
||||
|
||||
["keyword", "trigger"],
|
||||
["function", "Callback"],
|
||||
["punctuation", "("],
|
||||
"i ",
|
||||
["punctuation", ":"],
|
||||
["class-name", "integer"],
|
||||
["punctuation", ";"],
|
||||
" s",
|
||||
["punctuation", ":"],
|
||||
["class-name", "text"],
|
||||
["punctuation", ";"],
|
||||
" d ",
|
||||
["punctuation", ":"],
|
||||
["class-name", "decimal"],
|
||||
["punctuation", ";"],
|
||||
" c ",
|
||||
["punctuation", ":"],
|
||||
["class-name", "char"],
|
||||
["punctuation", ")"],
|
||||
|
||||
["keyword", "trigger"],
|
||||
["function", "OnAction"],
|
||||
["punctuation", "("],
|
||||
["punctuation", ")"],
|
||||
["punctuation", ";"],
|
||||
|
||||
["keyword", "event"],
|
||||
["function", "Callback"],
|
||||
["punctuation", "("],
|
||||
"i ",
|
||||
["punctuation", ":"],
|
||||
["class-name", "integer"],
|
||||
["punctuation", ";"],
|
||||
" s",
|
||||
["punctuation", ":"],
|
||||
["class-name", "text"],
|
||||
["punctuation", ";"],
|
||||
" d ",
|
||||
["punctuation", ":"],
|
||||
["class-name", "decimal"],
|
||||
["punctuation", ";"],
|
||||
" c ",
|
||||
["punctuation", ":"],
|
||||
["class-name", "char"],
|
||||
["punctuation", ")"],
|
||||
["punctuation", ";"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for functions.
|
|
@ -0,0 +1,210 @@
|
|||
array
|
||||
asserterror
|
||||
begin
|
||||
break
|
||||
case
|
||||
do
|
||||
downto
|
||||
else
|
||||
end
|
||||
event
|
||||
exit
|
||||
for
|
||||
foreach
|
||||
function
|
||||
if
|
||||
implements
|
||||
in
|
||||
indataset
|
||||
interface
|
||||
internal
|
||||
local
|
||||
of
|
||||
procedure
|
||||
program
|
||||
protected
|
||||
repeat
|
||||
runonclient
|
||||
securityfiltering
|
||||
suppressdispose
|
||||
temporary
|
||||
then
|
||||
to
|
||||
trigger
|
||||
until
|
||||
var
|
||||
while
|
||||
with
|
||||
withevents
|
||||
|
||||
action
|
||||
actions
|
||||
addafter
|
||||
addbefore
|
||||
addfirst
|
||||
addlast
|
||||
area
|
||||
assembly
|
||||
chartpart
|
||||
codeunit
|
||||
column
|
||||
controladdin
|
||||
cuegroup
|
||||
customizes
|
||||
dataitem
|
||||
dataset
|
||||
dotnet
|
||||
elements
|
||||
enum
|
||||
enumextension
|
||||
extends
|
||||
field
|
||||
fieldattribute
|
||||
fieldelement
|
||||
fieldgroup
|
||||
fieldgroups
|
||||
fields
|
||||
filter
|
||||
fixed
|
||||
grid
|
||||
group
|
||||
key
|
||||
keys
|
||||
label
|
||||
labels
|
||||
layout
|
||||
modify
|
||||
moveafter
|
||||
movebefore
|
||||
movefirst
|
||||
movelast
|
||||
page
|
||||
pagecustomization
|
||||
pageextension
|
||||
part
|
||||
profile
|
||||
query
|
||||
repeater
|
||||
report
|
||||
requestpage
|
||||
schema
|
||||
separator
|
||||
systempart
|
||||
table
|
||||
tableelement
|
||||
tableextension
|
||||
textattribute
|
||||
textelement
|
||||
type
|
||||
usercontrol
|
||||
value
|
||||
xmlport
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["keyword", "array"],
|
||||
["keyword", "asserterror"],
|
||||
["keyword", "begin"],
|
||||
["keyword", "break"],
|
||||
["keyword", "case"],
|
||||
["keyword", "do"],
|
||||
["keyword", "downto"],
|
||||
["keyword", "else"],
|
||||
["keyword", "end"],
|
||||
["keyword", "event"],
|
||||
["keyword", "exit"],
|
||||
["keyword", "for"],
|
||||
["keyword", "foreach"],
|
||||
["keyword", "function"],
|
||||
["keyword", "if"],
|
||||
["keyword", "implements"],
|
||||
["keyword", "in"],
|
||||
["keyword", "indataset"],
|
||||
["keyword", "interface"],
|
||||
["keyword", "internal"],
|
||||
["keyword", "local"],
|
||||
["keyword", "of"],
|
||||
["keyword", "procedure"],
|
||||
["keyword", "program"],
|
||||
["keyword", "protected"],
|
||||
["keyword", "repeat"],
|
||||
["keyword", "runonclient"],
|
||||
["keyword", "securityfiltering"],
|
||||
["keyword", "suppressdispose"],
|
||||
["keyword", "temporary"],
|
||||
["keyword", "then"],
|
||||
["keyword", "to"],
|
||||
["keyword", "trigger"],
|
||||
["keyword", "until"],
|
||||
["keyword", "var"],
|
||||
["keyword", "while"],
|
||||
["keyword", "with"],
|
||||
["keyword", "withevents"],
|
||||
["keyword", "action"],
|
||||
["keyword", "actions"],
|
||||
["keyword", "addafter"],
|
||||
["keyword", "addbefore"],
|
||||
["keyword", "addfirst"],
|
||||
["keyword", "addlast"],
|
||||
["keyword", "area"],
|
||||
["keyword", "assembly"],
|
||||
["keyword", "chartpart"],
|
||||
["keyword", "codeunit"],
|
||||
["keyword", "column"],
|
||||
["keyword", "controladdin"],
|
||||
["keyword", "cuegroup"],
|
||||
["keyword", "customizes"],
|
||||
["keyword", "dataitem"],
|
||||
["keyword", "dataset"],
|
||||
["keyword", "dotnet"],
|
||||
["keyword", "elements"],
|
||||
["keyword", "enum"],
|
||||
["keyword", "enumextension"],
|
||||
["keyword", "extends"],
|
||||
["keyword", "field"],
|
||||
["keyword", "fieldattribute"],
|
||||
["keyword", "fieldelement"],
|
||||
["keyword", "fieldgroup"],
|
||||
["keyword", "fieldgroups"],
|
||||
["keyword", "fields"],
|
||||
["keyword", "filter"],
|
||||
["keyword", "fixed"],
|
||||
["keyword", "grid"],
|
||||
["keyword", "group"],
|
||||
["keyword", "key"],
|
||||
["keyword", "keys"],
|
||||
["keyword", "label"],
|
||||
["keyword", "labels"],
|
||||
["keyword", "layout"],
|
||||
["keyword", "modify"],
|
||||
["keyword", "moveafter"],
|
||||
["keyword", "movebefore"],
|
||||
["keyword", "movefirst"],
|
||||
["keyword", "movelast"],
|
||||
["keyword", "page"],
|
||||
["keyword", "pagecustomization"],
|
||||
["keyword", "pageextension"],
|
||||
["keyword", "part"],
|
||||
["keyword", "profile"],
|
||||
["keyword", "query"],
|
||||
["keyword", "repeater"],
|
||||
["keyword", "report"],
|
||||
["keyword", "requestpage"],
|
||||
["keyword", "schema"],
|
||||
["keyword", "separator"],
|
||||
["keyword", "systempart"],
|
||||
["keyword", "table"],
|
||||
["keyword", "tableelement"],
|
||||
["keyword", "tableextension"],
|
||||
["keyword", "textattribute"],
|
||||
["keyword", "textelement"],
|
||||
["keyword", "type"],
|
||||
["keyword", "usercontrol"],
|
||||
["keyword", "value"],
|
||||
["keyword", "xmlport"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for keywords and other literals which behave like keywords.
|
|
@ -0,0 +1,57 @@
|
|||
+ - * /
|
||||
+= -= *= /=
|
||||
|
||||
< <= > >= <> =
|
||||
|
||||
:=
|
||||
::
|
||||
|
||||
100..100
|
||||
|
||||
AND DIV MOD NOT OR XOR
|
||||
and div mod not or xor
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["operator", "+"],
|
||||
["operator", "-"],
|
||||
["operator", "*"],
|
||||
["operator", "/"],
|
||||
|
||||
["operator", "+="],
|
||||
["operator", "-="],
|
||||
["operator", "*="],
|
||||
["operator", "/="],
|
||||
|
||||
["operator", "<"],
|
||||
["operator", "<="],
|
||||
["operator", ">"],
|
||||
["operator", ">="],
|
||||
["operator", "<>"],
|
||||
["operator", "="],
|
||||
|
||||
["operator", ":="],
|
||||
["operator", "::"],
|
||||
|
||||
["number", "100"],
|
||||
["operator", ".."],
|
||||
["number", "100"],
|
||||
|
||||
["operator", "AND"],
|
||||
["operator", "DIV"],
|
||||
["operator", "MOD"],
|
||||
["operator", "NOT"],
|
||||
["operator", "OR"],
|
||||
["operator", "XOR"],
|
||||
["operator", "and"],
|
||||
["operator", "div"],
|
||||
["operator", "mod"],
|
||||
["operator", "not"],
|
||||
["operator", "or"],
|
||||
["operator", "xor"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for operators.
|
|
@ -0,0 +1,20 @@
|
|||
''
|
||||
""
|
||||
'foo'
|
||||
"bar"
|
||||
|
||||
'C:\text.txt'
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["string", "''"],
|
||||
["string", "\"\""],
|
||||
["string", "'foo'"],
|
||||
["string", "\"bar\""],
|
||||
["string", "'C:\\text.txt'"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for strings.
|
|
@ -0,0 +1,21 @@
|
|||
CurrFieldNo
|
||||
CurrPage
|
||||
CurrReport
|
||||
RequestOptionsPage
|
||||
Rec
|
||||
xRec
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["variable", "CurrFieldNo"],
|
||||
["variable", "CurrPage"],
|
||||
["variable", "CurrReport"],
|
||||
["variable", "RequestOptionsPage"],
|
||||
["variable", "Rec"],
|
||||
["variable", "xRec"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for variables.
|
Loading…
Reference in New Issue