Giter Site home page Giter Site logo

asl-extension's Introduction

Auto Splitting Language

Adds Visual Studio Code support for LiveSplit's Auto Splitting Language (ASL). ASL scripts are connected to LiveSplit to create Auto Splitters, which have several abilities to automate LiveSplit. ASL allows users to specify memory locations and pointers to read data from processes. The data is then used to execute certain LiveSplit actions.

Features

  1. Adds appropriate syntax highlighting for the Auto Splitting Language
  2. Uses Visual Studio Code's C# syntax highlighting for the actions' code
  3. Adds helpful snippets for valid actions and objects

Helpful Links


This extension is not affiliated with LiveSplit.

asl-extension's People

Contributors

just-ero avatar b0sh avatar nnahoy avatar

Stargazers

Charlie Laabs avatar

Watchers

James Cloos avatar  avatar

asl-extension's Issues

Syntax highlighting wrong for declarations and anonymous functions on certain themes

This is concerning #4.
Even after (or especially because of) these changes, some of the highlighting seems off on any theme that isn't VSCode's default Dark+. Unsurprisingly, casting a lambda function is still broken (it only breaks once the => of the function part is completed).

Here's what I propose:

  • adding game, memory, modules, timer, etc. as some sort of "known variables"
  • if at all possible, adding normal C# support for the integrated namespaces and LiveSplit classes (probably not a thing)

This might fully be on me, since I may have removed too much from csharp.tmLanguage.json.


Here's some code with the ASL extension on Dark+:
Dark+ ASL Extension Example

Here's the same code with the ASL extension on One Monokai 80s Plus:
One Monokai 80s Plus ASL Extension Example

Here's the same code with the normal C# syntax highlighting on One Monokai 80s Plus:
One Monokai 80s Plus C# Example

Management of multiple spaces for the declaration of pointers

Hello,

While trying to open an autosplitter via this extension to benefit from syntax highlighting (thanks a lot for that by the way!) I noticed an omission in the regex of the pointer-path. The regex uses the token \s for the separation between the type and the name of the pointer but doesn't leave the choice on the number of possible spaces/tabs. For a script that likes to align names this unfortunately blocks syntax highlighting.

"begin": "\\b(?i)(byte[0-9]+|sbyte|byte|short|ushort|int|uint|long|ulong|float|double|bool|string[0-9]+)\\s(\\w+)",

image

Adding the quantifier + to the token \s solves the problem:

\\b(?i)(byte[0-9]+|sbyte|byte|short|ushort|int|uint|long|ulong|float|double|bool|string[0-9]+)\\s+(\\w+)

image

I can make a pull request if necessary :)

Kind regards,
Astropilot

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.