Code Monkey home page Code Monkey logo

deeplang-type-system's Issues

new AST discussion

This issue is a tracker for the new AST in new-AST-dev branch.
Definition of the AST is located in parser/ParseTree.ml,
Module documentation generated by OCaml is located in doc/internal/deeplang@.../DeeplangType/.
To view the generated HTML doc, you can paste the URL athttp://htmlpreview.github.io,
or clone the repo to your local machine and view it with your browser.

Currently the AST definition is not yet complete.
There are several topics that require further discussion.
You can find them in the generated HTML doc, labeled DISCUSSION WANTED.

If you have any idea on any of the topics listed, or have some other questions on the AST's definition,
you can post them in this issue for discussion.

ADT成员参数列表参数名字支持的问题

a2335ff21cd7643507a7fb6c1dd5b53
这个名字有助于解释参数意义,应该要加上吧。

主要,因为ADT有分支,所以不能像结构体一样用名字取出值
有一种方案是,允许ADT的分支定义一个私有结构体,这是OCaml的一个功能

image

deeplang.cf compile error in raspberry pi 3B

My bnfc versio is 2.8.1

> ocaml --version
The OCaml toplevel, version 4.05.0

Cannot generate Testdeeplang binary.

Use Bytes.set instead.
File "Testdeeplang.ml", line 6, characters 4-21:
Error: This function has type
         (Lexing.lexbuf -> Pardeeplang.token) ->
         Lexing.lexbuf -> Absdeeplang.code
       It is applied to too many arguments; maybe you forgot a `;'.
make: *** [Makefile:4\uff1aall] \u9519\u8bef 2
make: \u79bb\u5f00\u76ee\u5f55\u201c/home/pi/github/deeplang-type-system/output\u201d

2021-09-04-182404_1920x1080_scrot

Parser无法处理只declare不初始化

fun main(x: Char) {

  let x : I32 = 1;
  let a: I32 = 2;
  let b: F32 = 3.0;
}

可以parse,但是

fun main(x: Char) {

  let x : I32;
  let a: I32 = 2;
  let b: F32 = 3.0;
}

会parse报错:

syntax error: Expecting pattern
in [file "../examples/basicMain.dp", row 3, col 13 to row 3, col 14]

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.