Skip to content

Instantly share code, notes, and snippets.

@moshest
Last active February 29, 2020 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moshest/872246ea91975241439797f18c4a960d to your computer and use it in GitHub Desktop.
Save moshest/872246ea91975241439797f18c4a960d to your computer and use it in GitHub Desktop.
A POC for Dynamic Syntax Language

Dynamic Syntax Language (POC)

I had an idea, creating a programming language with a dynamic syntax. Meaning, every programmer can extend the language easily and implement syntactic sugars fast.

Example Usage

import { createUseStyles } from 'react-jss';

// use native css styles with your code
const useStyles = createUseStyles(
  .root {
    padding: 1em;
    border-radius: 0.2em;
    background: #f93;
    color: #fff;
    text-align: center;
    cursor: pointer;
  }
);

Result:

import { createUseStyles } from 'react-jss';

const useStyles = createUseStyles({
  root: {
    padding: '1em',
    borderRadius: '0.2em',
    background: '#f93',
    color: '#fff',
    textAlign: 'center',
    cursor: 'pointer',
  }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment