Skip to content

Commit

Permalink
Merge pull request #54 from dirkgroot/rework-lexer-parser
Browse files Browse the repository at this point in the history
Rework lexer parser and add some new features
  • Loading branch information
dirkgroot authored May 13, 2023
2 parents 9a97caf + 24592be commit 2e9887e
Show file tree
Hide file tree
Showing 91 changed files with 2,031 additions and 1,212 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

## [Unreleased]

### Changed

- Reworked the lexer and parser to be more generic, which should make it a bit easier to support future changes to the
Structurizr DSL
- Syntax highlighting is now mostly annotator based instead of lexer based

### Added

- Matching curly braces are now highlighted in the editor
- Code can now be commented with the "Comment with line/block comment" commands
- Code is automatically indented correctly while editing

## [0.2.1] - 2023-03-31

### Changed
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ using [Simon Brown](https://twitter.com/simonbrown)'s [C4 model](https://c4model
* Basic syntax highlighting for the Structurizr DSL language. Files with the `.dsl` extension are considered to be
Structurizr DSL files.
* Automatically indent and normalize spacing with IntelliJ's "Reformat Code" command.
* Automatically indent new code while typing
* Comment code using the "Comment with line/block comment" commands
* More to come! Please refer to the [TODO section](https://github.com/dirkgroot/structurizr-dsl-intellij-plugin#todo) of
the README for a list of features that will likely be added.

Expand All @@ -42,9 +44,8 @@ using [Simon Brown](https://twitter.com/simonbrown)'s [C4 model](https://c4model
- For now, arguments of statements are all treated as (un)quoted strings, so "true", "false", integers, (un)quoted text
will all get the same syntax highlighting.
- The following blocks are treated as property blocks, containing (un)quoted string pairs:
- branding
- terminology
- configuration
- perspectives
- properties
- users
- All arguments of view declarations are highlighted as (un)quoted strings. Correct highlighting of these arguments will
most likely be implemented using
Expand All @@ -68,11 +69,11 @@ Search for "Structurizr" in the marketplace, and install the plugin. Please refe

### Features

- ☑️ syntax highlighting
- syntax highlighting
- ✅ token based
- 🔳 annotator based
- annotator based
- ✅ reformat code
- 🔳 auto indentation
- auto indentation
- 🔳 go to definition
- 🔳 rename refactoring for identifiers
- 🔳 code validation
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ koverReport {
sourceSets["main"].java.srcDirs("src/main/gen")

dependencies {
testImplementation(kotlin("test"))
testImplementation("io.kotest:kotest-runner-junit5:5.6.2")
testImplementation("io.kotest:kotest-assertions-core:5.6.2")
testImplementation("com.willowtreeapps.assertk:assertk-jvm:0.25")
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pluginGroup = nl.dirkgroot.structurizr-dsl-plugin
pluginName = Structurizr DSL Language Support
pluginRepositoryUrl = https://github.com/dirkgroot/structurizr-dsl-intellij-plugin
# SemVer format -> https://semver.org
pluginVersion = 0.2.2
pluginVersion = 0.3.1

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 223
Expand Down
Loading

0 comments on commit 2e9887e

Please sign in to comment.