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

toml: rename ast.Node -> ast.Value (#11974)

This commit is contained in:
Larpon
2021-09-25 19:31:02 +02:00
committed by GitHub
parent 80c15607da
commit 13b2aa701c
6 changed files with 111 additions and 103 deletions

View File

@ -9,22 +9,22 @@ import toml.ast.walker
import toml.token
import toml.scanner
// Checker checks a tree of TOML `ast.Node`'s for common errors.
// Checker checks a tree of TOML `ast.Value`'s for common errors.
pub struct Checker {
scanner &scanner.Scanner
}
pub fn (c Checker) check(n &ast.Node) ? {
pub fn (c Checker) check(n &ast.Value) ? {
walker.walk(c, n) ?
}
fn (c Checker) visit(node &ast.Node) ? {
match node {
fn (c Checker) visit(value &ast.Value) ? {
match value {
ast.Number {
c.check_number(node) ?
c.check_number(value) ?
}
ast.Bool {
c.check_boolean(node) ?
c.check_boolean(value) ?
}
else {
// TODO add more checks to make BurntSushi/toml-test invalid TOML pass