diff --git a/vlib/builtin/int.v b/vlib/builtin/int.v index e5df7d79c0..1bd004cb7c 100644 --- a/vlib/builtin/int.v +++ b/vlib/builtin/int.v @@ -156,14 +156,18 @@ pub fn (n int) hex() string { pub fn (n i64) hex() string { len := if n >= 0 { n.str().len + 3 } else { 19 } hex := malloc(len) - count := C.sprintf(charptr(hex), '0x%'C.PRIx64, n) + // TODO + //count := C.sprintf(charptr(hex), '0x%'C.PRIx64, n) + count := C.sprintf(charptr(hex), '0x%llx', n) return tos(hex, count) } pub fn (n u64) hex() string { len := if n > 0 { n.str().len + 3 } else { 19 } hex := malloc(len) - count := C.sprintf(charptr(hex), '0x%'C.PRIx64, n) + //count := C.sprintf(charptr(hex), '0x%'C.PRIx64, n) + count := C.sprintf(charptr(hex), '0x%llx', n) + //count := C.sprintf(charptr(hex), '0x%lx', n) return tos(hex, count) } diff --git a/vlib/v/ast/ast.v b/vlib/v/ast/ast.v index 822b0cea1f..be8a813429 100644 --- a/vlib/v/ast/ast.v +++ b/vlib/v/ast/ast.v @@ -11,7 +11,8 @@ import ( pub type Expr = InfixExpr | IfExpr | StringLiteral | IntegerLiteral | CharLiteral | FloatLiteral | Ident | CallExpr | BoolLiteral | StructInit | ArrayInit | SelectorExpr | PostfixExpr | AssignExpr | PrefixExpr | MethodCallExpr | IndexExpr | RangeExpr | MatchExpr | -CastExpr | EnumVal | Assoc | SizeOf | None | MapInit | IfGuardExpr | ParExpr | OrExpr +CastExpr | EnumVal | Assoc | SizeOf | None | MapInit | IfGuardExpr | ParExpr | OrExpr | +ConcatExpr pub type Stmt = VarDecl | GlobalDecl | FnDecl | Return | Module | Import | ExprStmt | ForStmt | StructDecl | ForCStmt | ForInStmt | CompIf | ConstDecl | Attr | BranchStmt | @@ -535,6 +536,11 @@ pub: text string } +pub struct ConcatExpr { +pub: + vals []Expr +} + pub struct None { pub: foo int // todo diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index d53debf25a..67ab421a2d 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -439,11 +439,16 @@ fn (c mut Checker) stmt(node ast.Stmt) { it.typ = typ } else { + println('checker.stmt(): unhandled node') + } + /* + println('1') node_name := typeof(node) - if !(node_name) in c.unhandled_stmts { + println('2') + if !(node_name in c.unhandled_stmts) { c.unhandled_stmts << node_name } - } + */ } }