Skip to content

ColinTimBarndt/cm-language-java

Repository files navigation

cm-language-java

CodeMirror 6 Under development

This CodeMirror 6 plugin adds support for the Java programming language, including linting, autocomplete and syntax highlighting.

This plugin is based on the @codemirror/lang-java plugin.

Notice

This plugin is under development. Breaking changes will happen. Contributions are welcome.

Todo

Traverse

  • Program
    • (for a one-class-per-file structure)
  • PackageDeclaration
  • ImportDeclaration
    • name
      • Identifier
      • ScopedIdentifier
  • ClassDeclaration
    • ClassBody
  • InterfaceDeclaration
    • InterfaceBody
  • EnumDeclaration
    • EnumBody
    • EnumBodyDeclarations
    • EnumConstant
  • AnnotationTypeDeclaration
    • AnnotationTypeBody
    • AnnotationTypeElementDeclaration
  • ModuleDeclaration
    • ModuleBody
    • ModuleDirective
  • ConstructorDeclaration
    • ConstructorBody
  • MethodDeclaration
  • FieldDeclaration / ConstantDeclaration
  • InterfaceTypeList
  • Modifiers
    • annotation
    • AnnotationArgumentList
    • ElementValuePair
  • type
    • simpleType
    • unannotatedType
    • TypeName
    • TypeArguments
    • TypeBound
    • TypeParameters
      • TypeParameter
    • Wildcard
    • ArrayType
      • Dimension
  • ArrayInitializer
  • Block
    • ExpressionStatement
    • LabeledStatement
    • IfStatement
    • WhileStatement
    • ForStatement
    • EnhancedForStatement
    • AssertStatement
    • SwitchStatement
      • SwitchBlock
      • SwitchLabel
    • DoStatement
    • BreakStatement
    • ContinueStatement
    • ReturnStatement
    • SynchronizedStatement
    • LocalVariableDeclaration
      • VariableInitializer
    • ThrowStatement
    • TryStatement
      • CatchClause
      • FinallyClause
    • TryWithResourcesStatement
  • expression
    • AssignmentExpression
    • BinaryExpression
    • InstanceofExpression
    • LambdaExpression
    • TernaryExpression
    • UpdateExpression
    • baseExpression
    • UnaryExpression
    • CastExpression
    • baseExpression
      • literal
      • ClassLiteral
      • "this"
      • Identifier
      • ParenthesizedExpression
      • ObjectCreationExpression
      • FieldAccess
      • ArrayAccess
      • MethodInvocation
      • MethodReference
      • ArrayCreationExpression
  • literal
    • IntegerLiteral
    • FloatingPointLiteral
    • BooleanLiteral
    • CharacterLiteral
    • StringLiteral
    • "null"