Code Monkey home page Code Monkey logo

qcpu-syntax-highlighter's Introduction

GitHub Stats

Profile Views

qcpu-syntax-highlighter's People

Contributors

qsmally avatar redcmd avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

qsmally

qcpu-syntax-highlighter's Issues

Feat.: mutable org labels

The QCPU CLI implements an optional closure to specify the override address / new pointer location.

A label can be defined like .label(anybaseint):, with anybaseint being something like:

  • 0b00001010 (binary, any bitcount is possible)
  • 0x0A (hexadecimal)
  • 10 (decimal)

It's optional, so .label: is still possible (but not empty: .label():)

Feat.: comma separated instructions

The QCPU CLI allows the programmer to separate instructions by commas, and this is mostly used for second-byte instructions like IMM, JMP and memory operations. In the highlighter, these commas are marked as invalid, they're red.

For example, an instruction might be IMM 1, 0x05 or MST 0, 0xEA, and with macros: IMM @loc, @word.

The parser of QCPU CLI doesn't mind having things like INC 0, INC 0, INC 0, but practically, the programmer should never do that.

Bug: incorrect indentation

If I insert a label as a separate line and press enter, an indentation is automatically formed, while it's not suffixed by : (because it's not a label definition, rather using an existing label). It does not happen when I put the label on the same line like CPS, with a comma separating them, such as CPS, .@return_label. See the video for reference:

bug.mp4

Feat.: header and declaration tooltips

For a future version, tooltips whenever using headers or declarations would be neat. If you were to create a header, like:

@HEADER MEMORYITERATOR memory_pointer_label closure_label

Upon using it, @MEMORYITERATOR, just having those two arguments (memory_pointer_label and closure_label) are a good reference for ease-of-programming. Besides, it'd be helpful to have a list of declarations (which are only in that file, not across-files like headers) when you type @.

Bug: signed integers (for immediates)

Mostly for immediate bytes, integers can be negative as well as positive. However, the numeric parser doesn't include that as the minus symbol is red.

Signed integers

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.