From 707ddba143a99b12a3e8c7ec3df30faa256559e6 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Tue, 20 Aug 2019 00:08:45 +0300 Subject: [PATCH] examples: rename hot_code_reloading to hot_reload --- compiler/main.v | 5 +++-- compiler/parser.v | 2 +- examples/{hot_code_reloading => hot_reload}/.gitignore | 0 examples/{hot_code_reloading => hot_reload}/bounce.v | 0 examples/{hot_code_reloading => hot_reload}/graph.v | 0 examples/{hot_code_reloading => hot_reload}/message.v | 0 6 files changed, 4 insertions(+), 3 deletions(-) rename examples/{hot_code_reloading => hot_reload}/.gitignore (100%) rename examples/{hot_code_reloading => hot_reload}/bounce.v (100%) rename examples/{hot_code_reloading => hot_reload}/graph.v (100%) rename examples/{hot_code_reloading => hot_reload}/message.v (100%) diff --git a/compiler/main.v b/compiler/main.v index 03ae2b27d5..1a39c739cc 100644 --- a/compiler/main.v +++ b/compiler/main.v @@ -1302,11 +1302,12 @@ fn new_v(args[]string) *V { build_mode: build_mode cflags: cflags } - + if pref.is_play { + println('Playground') + } if pref.is_so { out_name_c = out_name.all_after('/') + '_shared_lib.c' } - return &V { os: _os out_name: out_name diff --git a/compiler/parser.v b/compiler/parser.v index ffb93b92f1..b716b25401 100644 --- a/compiler/parser.v +++ b/compiler/parser.v @@ -257,7 +257,7 @@ fn (p mut Parser) parse() { p.comp_time() case Token.key_global: if !p.pref.translated && !p.pref.is_live && - !p.builtin_mod && !p.building_v { + !p.builtin_mod && !p.building_v && !os.getwd().contains('/volt') { p.error('__global is only allowed in translated code') } p.next() diff --git a/examples/hot_code_reloading/.gitignore b/examples/hot_reload/.gitignore similarity index 100% rename from examples/hot_code_reloading/.gitignore rename to examples/hot_reload/.gitignore diff --git a/examples/hot_code_reloading/bounce.v b/examples/hot_reload/bounce.v similarity index 100% rename from examples/hot_code_reloading/bounce.v rename to examples/hot_reload/bounce.v diff --git a/examples/hot_code_reloading/graph.v b/examples/hot_reload/graph.v similarity index 100% rename from examples/hot_code_reloading/graph.v rename to examples/hot_reload/graph.v diff --git a/examples/hot_code_reloading/message.v b/examples/hot_reload/message.v similarity index 100% rename from examples/hot_code_reloading/message.v rename to examples/hot_reload/message.v