1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

all: split all backends into cmd/tools/builders (#12811)

This commit is contained in:
Delyan Angelov
2021-12-12 21:10:43 +02:00
committed by GitHub
parent 57c1faadbe
commit 3afbb9e90a
18 changed files with 157 additions and 96 deletions

View File

@ -5,6 +5,7 @@ import v.util
import v.util.diff
import v.pref
import v.builder
import v.builder.cbuilder
import v.ast
import rand
import term
@ -98,7 +99,7 @@ fn (app App) gen_api_for_module_in_os(mod_name string, os_name string) string {
tmpname := '/tmp/${mod_name}_${os_name}.c'
prefs, _ := pref.parse_args([], ['-os', os_name, '-o', tmpname, '-shared', mpath])
mut b := builder.new_builder(prefs)
builder.compile_c(mut b)
cbuilder.compile_c(mut b)
mut res := []string{}
for f in b.parsed_files {
for s in f.stmts {