Git Product home page Git Product logo

Comments (4)

matthewp avatar matthewp commented on September 24, 2024 1

I never properly addressed this issue. Some background: I originally started on Lucy a couple of years ago and tagged template literals is how it originally worked. You can see the original version here: https://github.com/matthewp/lucy/blob/main/packages/xstate/test/guard-test.js#L10

For various reasons I put the project aside until I started it back up recently. I decided it was best to define the language as a standalone thing first. Recently I've been more interested in trying out a tagged template approach again. It wouldn't work with things like use but for the most part the new language should work well. The question is can it be done in a small package. The current compiler wouldn't work of course, it would need to be a new JS based parser / compiler.

That is to say I'm interested to try and work on this, but it won't be for at least a little while until the TS support and various tooling is more mature. Then I might come back around to this idea as I do think there is a segment of people who would be more likely to use Lucy if they didn't need to use a separate language file and associated tooling.

from liblucy.

mattpocock avatar mattpocock commented on September 24, 2024

A parse function would also be excellent:

import { parseToJson } from '@lucylang/node';

const machine = parseToJson(
`
// Lucy file in here
`
)

from liblucy.

matthewp avatar matthewp commented on September 24, 2024

@mattpocock is this meant to return an AST? Or is this the JSON representation from the other issue?

from liblucy.

mattpocock avatar mattpocock commented on September 24, 2024

@matthewp Probably the same JSON representation from the other issue. Though I'd assume we'd add methods for the raw parsing to JS, too.

from liblucy.

Related Issues (20)

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.