Git Product home page Git Product logo

svelang's People

Contributors

weerox avatar

Watchers

 avatar  avatar

svelang's Issues

strcpy optimization

Make sure that, when possible, we use strncpy instead of strcpy, which hopefully will provide some speed optimization when compiling.

Don't let an expression end before EOL

Currently the line y + 2 will be parsed as an expression consisting of only the variable y, then a "standalone" variable + and a number 2. When an expression has started it shouldn't be allowed to finish before the end of the line. Also, it would be good if this type of error could be detected and the user be informed that they probably meant to spell out plus.

Check that a variable has been initialized before it is used

This can be done in interpret_variable, since symbol_table_get will return NULL if it can't find a symbol with that name (e.g. it hasn't been initialized yet).

Print an error message and return 1. For this to work correctly, all interpret_ functions has to check the return value of other interpret_ functions and return 1 on failure.

Fix ABNF syntax

The SYNTAX file contains the ABNF rules for svelang. There are some problems with it though, for example, it isn't specified where spaces are allowed.

Also, when specifying strings in ABNF they are automatically case-insensitive. Currently the interpreter isn't making case-insensitive checks on tokens.
This can either be solved by changing the ABNF strings into byte values or by making the interpreter case-insensitive.

Resize symbol table when size equals capacity

When the size of a symbol table is larger than its capacity it is guaranteed that two symbols shares the same hash, so double the size of the table, rehash the symbols and put them in the new table.

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.