Git Product home page Git Product logo

vscode-sdlang's Introduction

SDLang VSCode Extension

VSCode extension to highlight SDLang (Simple Declarative Language)

Rewritten textmate grammar to support date, datetime, duration, and scopes

Much of this is based on the reference implementations

Original D Implementation Optimized D Implementation

Features

  • Complete Textmate highlighting for SDLang

Install

The extension is published on the VSCode Marketplace here.

Known Issues

Issues with the grammar

  • Names for some of the scopes might be odd; VSCode doesn't list the core scopes or provide a standard outside of linked Textmate docs, despite their use of other scopes in the core extensions such as entity.name.type.namespace.
  • The default line comment is #, it's the most used out of the three options given
    • VSCode only gives one option in the language configuration for a line comment

Issues based on the standard:

  • Anonymous namespace for a tagname prefixed with a colon :tagname should be allowed by the specification but is blocked by the D and Java implementations
  • Anonymous tag children aren't supported without a prior value, this will show up non-highlighted but is marked with as an invalid token
    • This is otherwise known as "curly brace on newline"
"Value" {
  # Valid
}

/* No Value */ {
  # Invalid
}
  • Does not support multiline and comments within timestamps, this shouldn't be allowed in the reference implementation
  • The grammar for dates and times is very lax and permissive according to the reference implementation, I attempted to cover any given examples

Development and Building

The grammar was written in yaml, rather than json; this is converted using js-yaml and dropped into _build/syntaxes.

Dependencies can be installed with npm install. Currently this relies on GNU Make.

To build and test, press F5 within vscode to start the debugger and run another instance with the extension.

To package the extension, run make package if you have GNU Make installed. Otherwise, use the command located under package in the Makefile.

vscode-sdlang's People

Contributors

cthuflu avatar

Stargazers

Luke Kaalim avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.