mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: scope type alias to module
This commit is contained in:
parent
179fb13a17
commit
94537c5901
@ -829,12 +829,12 @@ fn (p mut Parser) type_decl() {
|
|||||||
p.fspace()
|
p.fspace()
|
||||||
}
|
}
|
||||||
mut parent := Type{}
|
mut parent := Type{}
|
||||||
|
if !p.builtin_mod && p.mod != 'main' {
|
||||||
|
name = p.prepend_mod(name)
|
||||||
|
}
|
||||||
// Sum type
|
// Sum type
|
||||||
//is_sum := p.tok == .pipe
|
//is_sum := p.tok == .pipe
|
||||||
if is_sum {
|
if is_sum {
|
||||||
if !p.builtin_mod && p.mod != 'main' {
|
|
||||||
name = p.prepend_mod(name)
|
|
||||||
}
|
|
||||||
// Register the first child (name we already parsed)
|
// Register the first child (name we already parsed)
|
||||||
/*
|
/*
|
||||||
p.table.register_type(Type{
|
p.table.register_type(Type{
|
||||||
|
@ -11,7 +11,7 @@ pub const (
|
|||||||
|
|
||||||
// Ref - https://docs.microsoft.com/en-us/windows/desktop/winprog/windows-data-types
|
// Ref - https://docs.microsoft.com/en-us/windows/desktop/winprog/windows-data-types
|
||||||
// A handle to an object.
|
// A handle to an object.
|
||||||
type HANDLE voidptr
|
pub type HANDLE voidptr
|
||||||
|
|
||||||
// win: FILETIME
|
// win: FILETIME
|
||||||
// https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-filetime
|
// https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-filetime
|
||||||
|
@ -17,7 +17,7 @@ struct C.CONSOLE_SCREEN_BUFFER_INFO {
|
|||||||
dwMaximumWindowSize C.COORD
|
dwMaximumWindowSize C.COORD
|
||||||
}
|
}
|
||||||
|
|
||||||
fn C.GetConsoleScreenBufferInfo(handle C.HANDLE, info &CONSOLE_SCREEN_BUFFER_INFO) bool
|
fn C.GetConsoleScreenBufferInfo(handle os.HANDLE, info &CONSOLE_SCREEN_BUFFER_INFO) bool
|
||||||
|
|
||||||
// get_terminal_size returns a number of colums and rows of terminal window.
|
// get_terminal_size returns a number of colums and rows of terminal window.
|
||||||
pub fn get_terminal_size() (int, int) {
|
pub fn get_terminal_size() (int, int) {
|
||||||
|
Loading…
Reference in New Issue
Block a user