lydiandy / vast Goto Github PK
View Code? Open in Web Editor NEWA simple tool for vlang, generate v source file to AST json file
License: MIT License
A simple tool for vlang, generate v source file to AST json file
License: MIT License
// the version of vast will follow vlang
const version = '0.2.2'
新版vlang编译不了,所以看到.v里面的版本就下了好几个 0.2.2 版本,但还是都编译不过。。。
基本都是下面的错误信息,这个项目还维护么,老哥
C:\Users\80512\Downloads\v_windows (5)\v\vast-master>v -prod . .\vast.v:61:14: error: cannot use “i64“ as “int“ in argument 1 to “time.sleep“ 59 | } 60 | timestamp = new_timestamp 61 | time.sleep(500 * time.millisecond) | ~~~~~~~~~~~~~~~~~~~~~~ 62 | } 63 | } .\vast.v:87:20: error: unknown type “v.ast.Table“. Did you mean “table.Table“? 85 | 86 | struct Tree { 87 | table &ast.Table | ~~~~~ 88 | pref &pref.Preferences 89 | global_scope &ast.Scope .\vast.v:116:14: error: unknown function: v.ast.new_table 114 | mut t := Tree{ 115 | root: new_object() 116 | table: ast.new_table() | ~~~~~~~~~~~ 117 | pref: new_preferences() 118 | global_scope: &ast.Scope{ .\vast.v:124:38: error: cannot use “&ast.Table“ as “&table.Table“ in argument 2 to “v.parser.parse_file“ 122 | } 123 | // parse file with comment 124 | ast_file := parser.parse_file(file, t.table, .parse_comments, t.pref, t.global_scope) | ~~~~~~~ 125 | t.root = t.ast_file(ast_file) 126 | // generate the ast string .\vast.v:180:9: error: infix expr: cannot use “int literal“ (right expression) as “v.ast.Type“ 178 | // type node 179 | fn (t Tree) type_node(typ ast.Type) &Node { 180 | if typ == 0 { | ~~ 181 | return create_null() 182 | } else { .\vast.v:183:24: error: unknown method: “v.ast.Table.get_type_name“ 181 | return create_null() 182 | } else { 183 | type_name := t.table.get_type_name(typ) | ~~~~~~~~~~~~~~~~~~ 184 | return create_string(type_name) 185 | } .\vast.v:217:38: error: type “v.ast.File“ has no field or method “nr_lines“. Did you mean “warnings“? 215 | obj.add('path', t.string_node(node.path)) 216 | obj.add('path_base', t.string_node(node.path_base)) 217 | obj.add('lines', t.number_node(node.nr_lines)) | ~~~~~~~~ 218 | obj.add('bytes', t.number_node(node.nr_bytes)) 219 | obj.add('mod', t.mod(node.mod))
These for example do not have an or_block field in the json output.
y := <-ch or { -6.75 }
x << <-ch or { -6.75 }
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.