Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance the syntax highlighting of ECMAScript 6 (#1684) #1685

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public class JSPartitionScanner extends RuleBasedPartitionScanner {
"with", //$NON-NLS-1$
"const", //$NON-NLS-1$
"let", //$NON-NLS-1$
"of", //$NON-NLS-1$
};

/**
Expand Down Expand Up @@ -123,6 +124,7 @@ public JSPartitionScanner() {

rules.add(new MultiLineRule("/*", "*/", TOKEN_COMMENT)); //$NON-NLS-1$ //$NON-NLS-2$
rules.add(new EndOfLineRule("//", TOKEN_COMMENT)); //$NON-NLS-1$
rules.add(new MultiLineRule("`", "`", TOKEN_STRING)); //$NON-NLS-1$ //$NON-NLS-2$
rules.add(new SingleLineRule("\"", "\"", TOKEN_STRING, '\\')); //$NON-NLS-1$ //$NON-NLS-2$
rules.add(new SingleLineRule("'", "'", TOKEN_STRING, '\\')); //$NON-NLS-1$ //$NON-NLS-2$

Expand Down Expand Up @@ -178,7 +180,8 @@ private void fetchJSCommonObjectsMethods() {
this.globalObjectTokens.add("vars"); //$NON-NLS-1$
this.globalObjectTokens.add("row"); //$NON-NLS-1$
this.globalObjectTokens.add("dataSetRow"); //$NON-NLS-1$

this.globalObjectTokens.add("importPackage"); //$NON-NLS-1$
this.globalObjectTokens.add("Packages"); //$NON-NLS-1$
this.keywordMethods.add("__rownum"); //$NON-NLS-1$

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -753,8 +753,45 @@
<Method displayNameID="Class.String.toLocaleLowerCase" name="toLocaleLowerCase" returnType="String" toolTipID="Class.String.toLocaleLowerCase.toolTip"/>
<Method displayNameID="Class.String.toUpperCase" name="toUpperCase" returnType="String" toolTipID="Class.String.toUpperCase.toolTip"/>
<Method displayNameID="Class.String.toLocaleUpperCase" name="toLocaleUpperCase" returnType="String" toolTipID="Class.String.toLocaleUpperCase.toolTip"/>
<Method displayNameID="Class.String.toString" name="toString" returnType="string" toolTipID="Class.String.toString.toolTip"/>
<Method displayNameID="Class.String.valueOf" name="valueOf" returnType="string" toolTipID="Class.String.valueOf.toolTip"/>
<Method displayNameID="Class.String.toString" name="toString" returnType="String" toolTipID="Class.String.toString.toolTip"/>
<Method displayNameID="Class.String.valueOf" name="valueOf" returnType="String" toolTipID="Class.String.valueOf.toolTip"/>
<Method displayNameID="Class.String.at" name="at" returnType="boolean" toolTipID="Class.String.at.toolTip">
<Argument name="index" tagID="Class.String.at.index" type="number"/>
</Method>
<Method displayNameID="Class.String.codePointAt" name="codePointAt" returnType="number" toolTipID="Class.String.codePointAt.toolTip">
<Argument name="position" tagID="Class.String.codePointAt.position" type="number"/>
</Method>
<Method displayNameID="Class.String.includes" name="includes" returnType="boolean" toolTipID="Class.String.includes.toolTip">
<Argument name="searchvalue" tagID="Class.String.includes.searchvalue" type="String"/>
</Method>
<Method displayNameID="Class.String.includes" name="includes" returnType="boolean" toolTipID="Class.String.includes.toolTip">
<Argument name="searchvalue" tagID="Class.String.includes.searchvalue" type="String"/>
<Argument name="start" tagID="Class.String.includes.start" type="number"/>
</Method>
<Method displayNameID="Class.String.endsWith" name="endsWith" returnType="boolean" toolTipID="Class.String.endsWith.toolTip">
<Argument name="value" tagID="Class.String.endsWith.value" type="String"/>
</Method>
<Method displayNameID="Class.String.startsWith" name="startsWith" returnType="boolean" toolTipID="Class.String.startsWith.toolTip">
<Argument name="value" tagID="Class.String.startsWith.value" type="String"/>
</Method>
<Method displayNameID="Class.String.repeat" name="repeat" returnType="String" toolTipID="Class.String.repeat.toolTip">
<Argument name="copies" tagID="Class.String.repeat.copies" type="number"/>
</Method>
<Method displayNameID="Class.String.replaceAll" name="replaceAll" returnType="String" toolTipID="Class.String.replaceAll.toolTip">
<Argument name="length" tagID="Class.String.replaceAll.RegExp" type="RegExp"/>
<Argument name="value" tagID="Class.String.replaceAll.replacement" type="String"/>
</Method>
<Method displayNameID="Class.String.padEnd" name="padEnd" returnType="String" toolTipID="Class.String.padEnd.toolTip">
<Argument name="length" tagID="Class.String.padEnd.length" type="number"/>
<Argument name="value" tagID="Class.String.padEnd.value" type="String"/>
</Method>
<Method displayNameID="Class.String.padStart" name="padStart" returnType="String" toolTipID="Class.String.padStart.toolTip">
<Argument name="length" tagID="Class.String.padStart.length" type="number"/>
<Argument name="value" tagID="Class.String.padStart.value" type="String"/>
</Method>
<Method displayNameID="Class.String.trim" name="trim" returnType="String" toolTipID="Class.String.trim.toolTip"/>
<Method displayNameID="Class.String.trimEnd" name="trimEnd" returnType="String" toolTipID="Class.String.trimEnd.toolTip"/>
<Method displayNameID="Class.String.trimStart" name="trimStart" returnType="String" toolTipID="Class.String.trimStart.toolTip"/>
</Class>
<Class displayNameID="Class.Date" name="Date" native="true" toolTipID="Class.Date.toolTip">
<Constructor displayNameID="Class.Date.Date" name="Date" returnType="Date" toolTipID="Class.Date.Date.toolTip"/>
Expand Down Expand Up @@ -958,6 +995,13 @@
<Argument name="value" tagID="Class.Array.concat.value" type="Object"/>
<Argument name="optionalArgument" tagID="Class.optionalArgument"/>
</Method>
<Method displayNameID="Class.Array.includes" name="includes" returnType="boolean" toolTipID="Class.Array.includes.toolTip">
<Argument name="searchvalue" tagID="Class.Array.includes.searchvalue" type="String"/>
</Method>
<Method displayNameID="Class.String.includes" name="includes" returnType="boolean" toolTipID="Class.String.includes.toolTip">
<Argument name="searchvalue" tagID="Class.Array.includes.searchvalue" type="String"/>
<Argument name="start" tagID="Class.Array.includes.start" type="number"/>
</Method>
<Method displayNameID="Class.Array.join" name="join" returnType="String" toolTipID="Class.Array.join.toolTip"/>
<Method displayNameID="Class.Array.join" name="join" returnType="String" toolTipID="Class.Array.join.toolTip">
<Argument name="seperator" tagID="Class.Array.join.separator" type="String"/>
Expand Down Expand Up @@ -4118,4 +4162,4 @@
<Style displayNameID="Style.GroupFooter9" name="group-footer-9" reference="List or table group footer for level 9" />
<Style displayNameID="Style.TextData" name="text-data" reference="Text data item" type="TextData"/>
-->
</ReportMetaData>
</ReportMetaData>
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,31 @@ Class.String.toString.toolTip=Returns this string value
Class.String.valueOf=valueOf
Class.String.valueOf.toolTip=Returns this string value

Class.String.at=at
Class.String.at.toolTip=Returns an indexed character from a string
Class.String.codePointAt=codePointAt
Class.String.codePointAt.toolTip=Returns the Unicode value at an index (position) in a string
Class.String.includes=includes
Class.String.includes.toolTip=Returns true if a string contains a specified string
Class.String.padEnd=padEnd
Class.String.padEnd.toolTip=Pads a string at the end
Class.String.padStart=padStart
Class.String.padStart.toolTip=Pads a string from the start
Class.String.repeat=repeat
Class.String.repeat.toolTip=Returns a string with a number of copies of a string
Class.String.replaceAll=replaceAll
Class.String.replaceAll.toolTip=Searches a string for a value or a regular expression and replace all occurrences
Class.String.endsWith=endsWith
Class.String.endsWith.toolTip=Returns true if a string ends with a specified string
Class.String.startsWith=startsWith
Class.String.startsWith.toolTip=Returns true if a string starts with a specified string
Class.String.trim=trim
Class.String.trim.toolTip=Removes whitespace from both sides of a string
Class.String.trimEnd=trimEnd
Class.String.trimEnd.toolTip=Removes whitespace from the end of a string
Class.String.trimStart=trimStart
Class.String.trimStart.toolTip=Removes whitespace from the beginning of a string

Class.String.String.object=object
Class.String.fromCharCode.c=c
Class.String.charAt.n=n
Expand All @@ -833,6 +858,19 @@ Class.String.substr.start=start
Class.String.substr.length=length
Class.String.substring.from=from
Class.String.substring.to=to
Class.String.at.index=index
Class.String.codePointAt.position=position
Class.String.includes.searchvalue=searchvalue
Class.String.includes.start=start
Class.String.endsWith.value=value
Class.String.startsWith.value=value
Class.String.repeat.copies=copies
Class.String.replaceAll.RegExp=RegExp
Class.String.replaceAll.replacement=replacement
Class.String.padEnd.length=length
Class.String.padEnd.value=value
Class.String.padStart.length=length
Class.String.padStart.value=value

#1.Global
Class.Global=Global Functions
Expand Down Expand Up @@ -889,6 +927,8 @@ Class.Array.length=length
Class.Array.length.toolTip=Returns an integer value one higher than the highest element defined in an array
Class.Array.concat=concat
Class.Array.concat.toolTip=Returns a new array consisting of a combination of the current array and any additional items
Class.Array.includes=includes
Class.Array.includes.toolTip=Returns true if an array contains a specified value. The method is case sensitive
Class.Array.join=join
Class.Array.join.toolTip=Returns a string value consisting of all the elements of an array concatenated together and separated by the specified separator character
Class.Array.pop=pop
Expand All @@ -915,6 +955,8 @@ Class.Array.unshift.toolTip=The arguments are prepended to the start of the arra
Class.Array.Array.size=size
Class.Array.Array.element=element
Class.Array.concat.value=value
Class.Array.includes.searchvalue=searchvalue
Class.Array.includes.start=start
Class.Array.join.separator=separator
Class.Array.push.value=value
Class.Array.slice.start=start
Expand Down
Loading