mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
examples: fix news_fetcher on Windows
This commit is contained in:
parent
fcb1f211e3
commit
7f29928aec
@ -1,3 +1,9 @@
|
||||
## V 0.1.17
|
||||
|
||||
- @ for escaping keywords (e.g. `struct Foo { @type string }`).
|
||||
- Windows Unicode fixes (V can now work with non-ASCII paths etc on Windows).
|
||||
|
||||
|
||||
## V 0.1.16
|
||||
*23 Jul 2019*
|
||||
- V can now be used with Visual Studio!
|
||||
|
@ -401,7 +401,7 @@ _thread_so = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)&reload_so, 0, 0, 0);
|
||||
cgen_name := p.table.cgen_name(f)
|
||||
f.defer_text = ' ${cgen_name}_time += time__ticks() - _PROF_START;'
|
||||
}
|
||||
p.statements_no_curly_end()
|
||||
p.statements_no_rcbr()
|
||||
// Print counting result after all statements in main
|
||||
if p.pref.is_prof && f.name == 'main' {
|
||||
p.genln(p.print_prof_counters())
|
||||
|
@ -962,17 +962,17 @@ fn (p &Parser) print_tok() {
|
||||
// statements() returns the type of the last statement
|
||||
fn (p mut Parser) statements() string {
|
||||
p.log('statements()')
|
||||
typ := p.statements_no_curly_end()
|
||||
typ := p.statements_no_rcbr()
|
||||
if !p.inside_if_expr {
|
||||
p.genln('}')
|
||||
}
|
||||
if p.fileis('if_expr') {
|
||||
println('statements() ret=$typ line=$p.scanner.line_nr')
|
||||
}
|
||||
//if p.fileis('if_expr') {
|
||||
//println('statements() ret=$typ line=$p.scanner.line_nr')
|
||||
//}
|
||||
return typ
|
||||
}
|
||||
|
||||
fn (p mut Parser) statements_no_curly_end() string {
|
||||
fn (p mut Parser) statements_no_rcbr() string {
|
||||
p.cur_fn.open_scope()
|
||||
if !p.inside_if_expr {
|
||||
p.genln('')
|
||||
@ -2819,7 +2819,7 @@ fn (p mut Parser) comp_time() {
|
||||
p.genln('#ifdef $ifdef_name')
|
||||
}
|
||||
p.check(.lcbr)
|
||||
p.statements_no_curly_end()
|
||||
p.statements_no_rcbr()
|
||||
if ! (p.tok == .dollar && p.peek() == .key_else) {
|
||||
p.genln('#endif')
|
||||
}
|
||||
@ -2859,7 +2859,7 @@ fn (p mut Parser) comp_time() {
|
||||
p.next()
|
||||
p.check(.lcbr)
|
||||
p.genln('#else')
|
||||
p.statements_no_curly_end()
|
||||
p.statements_no_rcbr()
|
||||
p.genln('#endif')
|
||||
}
|
||||
else {
|
||||
|
@ -7,11 +7,11 @@ module sync
|
||||
struct Mutex {
|
||||
}
|
||||
|
||||
fn (m Mutex) lock() {
|
||||
panic('not implemented')
|
||||
pub fn (m Mutex) lock() {
|
||||
//panic('not implemented')
|
||||
}
|
||||
|
||||
fn (m Mutex) unlock() {
|
||||
panic('not implemented')
|
||||
pub fn (m Mutex) unlock() {
|
||||
//panic('not implemented')
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user