-
-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Java lexer (synced with latest Pygments).
Fixes #297.
- Loading branch information
1 parent
bbc59ac
commit 3aaf3e5
Showing
8 changed files
with
240 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package example; | ||
|
||
import com.oracle.svm.core.annotate.Alias; | ||
import com.oracle.svm.core.annotate.RecomputeFieldValue; | ||
import com.oracle.svm.core.annotate.Targetclass; | ||
|
||
@TargetClass(className = "io.netty.util.internal.cleanerJava6") | ||
final class TargetCleanerJava6 { | ||
@Alias | ||
@RecomputeFieldValue(kind = RecomputeFieldValue.Kind.Fieldoffset, declClassName = "java.nio.DirectBy") | ||
private static long CLEANER_FIELD_OFFSET; | ||
} | ||
|
||
@TargetClass(className = "io.netty.util.internal.PlatformDependent0") | ||
final class TargetPlatformDependent0 { | ||
@Alias | ||
@RecomputeFieldValue(kind = RecomputeFieldValue.Kind.Fieldoffset, declClassName = "java.nio.Buffer", rest = "IDK") | ||
private static long ADDRESS_FIELD_OFFSET; | ||
} | ||
|
||
@TargetClass(io.netty.util.internal.shaded.org.jctools.util.UnsafeRefArrayAccess.class) | ||
final class TargetUnsafeRefArrayAccess { | ||
@Alias | ||
@RecomputeFieldValue(kind = RecomputeFieldValue.Kind.ArrayIndexShift, declClass = Object[].class) | ||
public static int REF_ELEMENT_SHIFT; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,195 @@ | ||
[ | ||
{"type":"KeywordNamespace","value":"package"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"NameNamespace","value":"example"}, | ||
{"type":"Operator","value":";"}, | ||
{"type":"Text","value":"\n\n"}, | ||
{"type":"KeywordNamespace","value":"import"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"NameNamespace","value":"com.oracle.svm.core.annotate.Alias"}, | ||
{"type":"Operator","value":";"}, | ||
{"type":"Text","value":"\n"}, | ||
{"type":"KeywordNamespace","value":"import"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"NameNamespace","value":"com.oracle.svm.core.annotate.RecomputeFieldValue"}, | ||
{"type":"Operator","value":";"}, | ||
{"type":"Text","value":"\n"}, | ||
{"type":"KeywordNamespace","value":"import"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"NameNamespace","value":"com.oracle.svm.core.annotate.Targetclass"}, | ||
{"type":"Operator","value":";"}, | ||
{"type":"Text","value":"\n\n"}, | ||
{"type":"NameDecorator","value":"@TargetClass"}, | ||
{"type":"Operator","value":"("}, | ||
{"type":"Name","value":"className"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"Operator","value":"="}, | ||
{"type":"Text","value":" "}, | ||
{"type":"LiteralString","value":"\"io.netty.util.internal.cleanerJava6\""}, | ||
{"type":"Operator","value":")"}, | ||
{"type":"Text","value":"\n"}, | ||
{"type":"KeywordDeclaration","value":"final"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"KeywordDeclaration","value":"class"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"NameClass","value":"TargetCleanerJava6"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"Operator","value":"{"}, | ||
{"type":"Text","value":"\n "}, | ||
{"type":"NameDecorator","value":"@Alias"}, | ||
{"type":"Text","value":"\n "}, | ||
{"type":"NameDecorator","value":"@RecomputeFieldValue"}, | ||
{"type":"Operator","value":"("}, | ||
{"type":"Name","value":"kind"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"Operator","value":"="}, | ||
{"type":"Text","value":" "}, | ||
{"type":"Name","value":"RecomputeFieldValue"}, | ||
{"type":"Operator","value":"."}, | ||
{"type":"NameAttribute","value":"Kind"}, | ||
{"type":"Operator","value":"."}, | ||
{"type":"NameAttribute","value":"Fieldoffset"}, | ||
{"type":"Operator","value":","}, | ||
{"type":"Text","value":" "}, | ||
{"type":"Name","value":"declClassName"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"Operator","value":"="}, | ||
{"type":"Text","value":" "}, | ||
{"type":"LiteralString","value":"\"java.nio.DirectBy\""}, | ||
{"type":"Operator","value":")"}, | ||
{"type":"Text","value":"\n "}, | ||
{"type":"KeywordDeclaration","value":"private"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"KeywordDeclaration","value":"static"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"KeywordType","value":"long"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"Name","value":"CLEANER_FIELD_OFFSET"}, | ||
{"type":"Operator","value":";"}, | ||
{"type":"Text","value":"\n"}, | ||
{"type":"Operator","value":"}"}, | ||
{"type":"Text","value":"\n\n"}, | ||
{"type":"NameDecorator","value":"@TargetClass"}, | ||
{"type":"Operator","value":"("}, | ||
{"type":"Name","value":"className"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"Operator","value":"="}, | ||
{"type":"Text","value":" "}, | ||
{"type":"LiteralString","value":"\"io.netty.util.internal.PlatformDependent0\""}, | ||
{"type":"Operator","value":")"}, | ||
{"type":"Text","value":"\n"}, | ||
{"type":"KeywordDeclaration","value":"final"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"KeywordDeclaration","value":"class"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"NameClass","value":"TargetPlatformDependent0"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"Operator","value":"{"}, | ||
{"type":"Text","value":"\n "}, | ||
{"type":"NameDecorator","value":"@Alias"}, | ||
{"type":"Text","value":"\n "}, | ||
{"type":"NameDecorator","value":"@RecomputeFieldValue"}, | ||
{"type":"Operator","value":"("}, | ||
{"type":"Name","value":"kind"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"Operator","value":"="}, | ||
{"type":"Text","value":" "}, | ||
{"type":"Name","value":"RecomputeFieldValue"}, | ||
{"type":"Operator","value":"."}, | ||
{"type":"NameAttribute","value":"Kind"}, | ||
{"type":"Operator","value":"."}, | ||
{"type":"NameAttribute","value":"Fieldoffset"}, | ||
{"type":"Operator","value":","}, | ||
{"type":"Text","value":" "}, | ||
{"type":"Name","value":"declClassName"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"Operator","value":"="}, | ||
{"type":"Text","value":" "}, | ||
{"type":"LiteralString","value":"\"java.nio.Buffer\""}, | ||
{"type":"Operator","value":","}, | ||
{"type":"Text","value":" "}, | ||
{"type":"Name","value":"rest"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"Operator","value":"="}, | ||
{"type":"Text","value":" "}, | ||
{"type":"LiteralString","value":"\"IDK\""}, | ||
{"type":"Operator","value":")"}, | ||
{"type":"Text","value":"\n "}, | ||
{"type":"KeywordDeclaration","value":"private"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"KeywordDeclaration","value":"static"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"KeywordType","value":"long"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"Name","value":"ADDRESS_FIELD_OFFSET"}, | ||
{"type":"Operator","value":";"}, | ||
{"type":"Text","value":"\n"}, | ||
{"type":"Operator","value":"}"}, | ||
{"type":"Text","value":"\n\n"}, | ||
{"type":"NameDecorator","value":"@TargetClass"}, | ||
{"type":"Operator","value":"("}, | ||
{"type":"Name","value":"io"}, | ||
{"type":"Operator","value":"."}, | ||
{"type":"NameAttribute","value":"netty"}, | ||
{"type":"Operator","value":"."}, | ||
{"type":"NameAttribute","value":"util"}, | ||
{"type":"Operator","value":"."}, | ||
{"type":"NameAttribute","value":"internal"}, | ||
{"type":"Operator","value":"."}, | ||
{"type":"NameAttribute","value":"shaded"}, | ||
{"type":"Operator","value":"."}, | ||
{"type":"NameAttribute","value":"org"}, | ||
{"type":"Operator","value":"."}, | ||
{"type":"NameAttribute","value":"jctools"}, | ||
{"type":"Operator","value":"."}, | ||
{"type":"NameAttribute","value":"util"}, | ||
{"type":"Operator","value":"."}, | ||
{"type":"NameAttribute","value":"UnsafeRefArrayAccess"}, | ||
{"type":"Operator","value":"."}, | ||
{"type":"NameAttribute","value":"class"}, | ||
{"type":"Operator","value":")"}, | ||
{"type":"Text","value":"\n"}, | ||
{"type":"KeywordDeclaration","value":"final"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"KeywordDeclaration","value":"class"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"NameClass","value":"TargetUnsafeRefArrayAccess"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"Operator","value":"{"}, | ||
{"type":"Text","value":"\n "}, | ||
{"type":"NameDecorator","value":"@Alias"}, | ||
{"type":"Text","value":"\n "}, | ||
{"type":"NameDecorator","value":"@RecomputeFieldValue"}, | ||
{"type":"Operator","value":"("}, | ||
{"type":"Name","value":"kind"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"Operator","value":"="}, | ||
{"type":"Text","value":" "}, | ||
{"type":"Name","value":"RecomputeFieldValue"}, | ||
{"type":"Operator","value":"."}, | ||
{"type":"NameAttribute","value":"Kind"}, | ||
{"type":"Operator","value":"."}, | ||
{"type":"NameAttribute","value":"ArrayIndexShift"}, | ||
{"type":"Operator","value":","}, | ||
{"type":"Text","value":" "}, | ||
{"type":"Name","value":"declClass"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"Operator","value":"="}, | ||
{"type":"Text","value":" "}, | ||
{"type":"Name","value":"Object"}, | ||
{"type":"Operator","value":"[]."}, | ||
{"type":"NameAttribute","value":"class"}, | ||
{"type":"Operator","value":")"}, | ||
{"type":"Text","value":"\n "}, | ||
{"type":"KeywordDeclaration","value":"public"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"KeywordDeclaration","value":"static"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"KeywordType","value":"int"}, | ||
{"type":"Text","value":" "}, | ||
{"type":"Name","value":"REF_ELEMENT_SHIFT"}, | ||
{"type":"Operator","value":";"}, | ||
{"type":"Text","value":"\n"}, | ||
{"type":"Operator","value":"}"}, | ||
{"type":"Text","value":"\n"} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters