Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wa-lang
wa
提交
3bd7be6a
wa
项目概览
wa-lang
/
wa
11 个月 前同步成功
通知
68
Star
655
Fork
45
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
wa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3bd7be6a
编写于
7月 24, 2022
作者:
chai2010
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
app 完善 init 和例子
上级
7f2c8780
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
7 addition
and
20 deletion
+7
-20
README.md
README.md
+6
-0
_examples/hello/src/main.wa
_examples/hello/src/main.wa
+0
-2
_examples/hello/src/mypkg/pkg.wa
_examples/hello/src/mypkg/pkg.wa
+0
-2
_examples/hello/vendor/3rdparty/pkg/pkg.wa
_examples/hello/vendor/3rdparty/pkg/pkg.wa
+0
-2
internal/app/app.wa.go
internal/app/app.wa.go
+1
-1
internal/waroot/_example_template/src/main.wa
internal/waroot/_example_template/src/main.wa
+0
-3
internal/waroot/_example_template/src/mypkg/pkg.wa
internal/waroot/_example_template/src/mypkg/pkg.wa
+0
-2
internal/waroot/_example_template/vendor/3rdparty/pkg/pkg.wa
internal/waroot/_example_template/vendor/3rdparty/pkg/pkg.wa
+0
-2
internal/waroot/_waroot/src/fmt/print.wa
internal/waroot/_waroot/src/fmt/print.wa
+0
-2
internal/waroot/_waroot/src/runtime/runtime.wa
internal/waroot/_waroot/src/runtime/runtime.wa
+0
-2
internal/waroot/_waroot/src/syscall/syscall.wa
internal/waroot/_waroot/src/syscall/syscall.wa
+0
-2
未找到文件。
README.md
浏览文件 @
3bd7be6a
...
...
@@ -17,6 +17,12 @@
+------------+
```
安装和测试:
1.
`go install github.com/wa-lang/wa@latest`
2.
`wa init -name=_examples/hi`
3.
`wa run _examples/hi`
## 设计目标
-
披着 Go 和 Rust 语法外衣的 C++ 语言;
...
...
_examples/hello/src/main.wa
浏览文件 @
3bd7be6a
// 版权 @2022 _examples/hello 作者。保留所有权利。
package
main
import (
"fmt"
...
...
_examples/hello/src/mypkg/pkg.wa
浏览文件 @
3bd7be6a
// 版权 @2022 _examples/hello 作者。保留所有权利。
package
mypkg
fn Println(x int) {
println(x)
}
_examples/hello/vendor/3rdparty/pkg/pkg.wa
浏览文件 @
3bd7be6a
// 版权 @2022 _examples/hello 作者。保留所有权利。
package
pkg
fn Println(x int) {
println(x)
}
internal/app/app.wa.go
浏览文件 @
3bd7be6a
...
...
@@ -6,7 +6,6 @@ import (
"bytes"
"errors"
"fmt"
"html/template"
"io"
"io/fs"
"os"
...
...
@@ -15,6 +14,7 @@ import (
"runtime"
"sort"
"strings"
"text/template"
"time"
"github.com/wa-lang/wa/internal/ast"
...
...
internal/waroot/_example_template/src/main.wa
浏览文件 @
3bd7be6a
// 版权 @{{.Year}} {{.Name}} 作者。保留所有权利。
//
例子
:
命令行程序
package
main
import (
"fmt"
...
...
internal/waroot/_example_template/src/mypkg/pkg.wa
浏览文件 @
3bd7be6a
// 版权 @{{.Year}} {{.Name}} 作者。保留所有权利。
package
mypkg
// 打印整数
fn Println(x int) {
println(x)
...
...
internal/waroot/_example_template/vendor/3rdparty/pkg/pkg.wa
浏览文件 @
3bd7be6a
// 版权 @{{.Year}} {{.Name}} 作者。保留所有权利。
package
pkg
fn Println(x int) {
println(x)
}
internal/waroot/_waroot/src/fmt/print.wa
浏览文件 @
3bd7be6a
// 版权 @2019 凹语言 作者。保留所有权利。
package
fmt
fn Println(x int) {
println(x)
}
internal/waroot/_waroot/src/runtime/runtime.wa
浏览文件 @
3bd7be6a
// 版权 @2019 凹语言 作者。保留所有权利。
package
runtime
internal/waroot/_waroot/src/syscall/syscall.wa
浏览文件 @
3bd7be6a
// 版权 @2019 凹语言 作者。保留所有权利。
package
syscall
//wa:linkname write
fn Write(int32 fs, uintptr data, int size) int
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录