ballerina-platform / plugin-intellij

Ballerina extension for IntelliJ IDEA.
Apache License 2.0
118 stars 4 forks source link

Add initial swan lake plugin implementation with syntax highlighting support #45

Closed ThemiraChathumina closed 6 months ago

ThemiraChathumina commented 7 months ago

Purpose

The purpose of this feature is to introduce plugin highlighting support for Ballerina Swan Lake versions. Related to https://github.com/ballerina-platform/plugin-intellij/issues/44

Goals

This will add highlighting for keywords and literals in the language and also various identifiers such as function names,class names, type names, enum names and annotations.

Approach

Create a lexer and a light weight parser using JFlex and Grammar Kit plugin in the intelliJ Platform. Keywords and literals are highlighted in the lexer level and identifyer types are recognized by the parser. IntelliJ based color schemes are applied to those token kinds.

Samples

Keyword and Literals

image

Type Definitions

image

Enums

image

Functions

image image

Classes

image

Services

image

Annotations

image

Markdown Documentation

image

CLAassistant commented 7 months ago

CLA assistant check
All committers have signed the CLA.