Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make tags use #+ syntax instead of //+ #4203

Merged
merged 16 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
dc767da
Make tags use #+ syntax instead of //+ syntax so it no longer looks l…
karl-zylinski Sep 5, 2024
73e4954
Better #+build tag error messages: Error when using more than one !no…
karl-zylinski Sep 8, 2024
f3a2b62
Merge remote-tracking branch 'origin/master' into file-tags-without-c…
karl-zylinski Sep 8, 2024
3637dcb
Simplified error messages in parse_build_tag, removed the idea of mak…
karl-zylinski Sep 9, 2024
957cd64
Rename process_file_tag -> parse_file_tag
karl-zylinski Sep 9, 2024
cc724ff
Made error handling code in parse_file clearer.
karl-zylinski Sep 9, 2024
580f059
parse_file: Removed some nesting and removed probable incorrect safet…
karl-zylinski Sep 9, 2024
f9de8fd
Documentation typo fix in tokenizer.
karl-zylinski Sep 9, 2024
86e2912
Merge remote-tracking branch 'origin/master' into file-tags-without-c…
karl-zylinski Sep 14, 2024
8b84b9a
Docs are generated as expected again.
karl-zylinski Sep 14, 2024
c24e18b
Fix incorrect syntax error in parse_file
karl-zylinski Sep 14, 2024
b12d312
core/odin: Added new file tag syntax as token. parse_file stores a li…
karl-zylinski Sep 14, 2024
19f0127
Moved all packages in core, base, vendor, tests and examples to use n…
karl-zylinski Sep 14, 2024
3d7b924
Fix a few incorrectly placed build tags.
karl-zylinski Sep 14, 2024
093ade0
Merge branch 'master' into file-tags-without-comments
karl-zylinski Sep 17, 2024
29fedc1
Changed some recently added //+ usages to #+ and also fixed some //+ …
karl-zylinski Sep 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion base/intrinsics/intrinsics.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This is purely for documentation
//+build ignore
#+build ignore
package intrinsics

// Package-Related
Expand Down
2 changes: 1 addition & 1 deletion base/runtime/core.odin
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// This could change at a later date if the all these data structures are
// implemented within the compiler rather than in this "preload" file
//
//+no-instrumentation
#+no-instrumentation
package runtime

import "base:intrinsics"
Expand Down
6 changes: 3 additions & 3 deletions base/runtime/entry_unix.odin
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//+private
//+build linux, darwin, freebsd, openbsd, netbsd, haiku
//+no-instrumentation
#+private
#+build linux, darwin, freebsd, openbsd, netbsd, haiku
#+no-instrumentation
package runtime

import "base:intrinsics"
Expand Down
6 changes: 3 additions & 3 deletions base/runtime/entry_wasm.odin
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//+private
//+build wasm32, wasm64p32
//+no-instrumentation
#+private
#+build wasm32, wasm64p32
#+no-instrumentation
package runtime

import "base:intrinsics"
Expand Down
6 changes: 3 additions & 3 deletions base/runtime/entry_windows.odin
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//+private
//+build windows
//+no-instrumentation
#+private
#+build windows
#+no-instrumentation
package runtime

import "base:intrinsics"
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/heap_allocator_orca.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build orca
//+private
#+build orca
#+private
package runtime

foreign {
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/heap_allocator_other.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build js, wasi, freestanding, essence
//+private
#+build js, wasi, freestanding, essence
#+private
package runtime

_heap_alloc :: proc "contextless" (size: int, zero_memory := true) -> rawptr {
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/heap_allocator_unix.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build linux, darwin, freebsd, openbsd, netbsd, haiku
//+private
#+build linux, darwin, freebsd, openbsd, netbsd, haiku
#+private
package runtime

when ODIN_OS == .Darwin {
Expand Down
2 changes: 1 addition & 1 deletion base/runtime/internal.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+vet !cast
#+vet !cast
package runtime

import "base:intrinsics"
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/os_specific_bsd.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build freebsd, openbsd, netbsd
//+private
#+build freebsd, openbsd, netbsd
#+private
package runtime

foreign import libc "system:c"
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/os_specific_darwin.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build darwin
//+private
#+build darwin
#+private
package runtime

import "base:intrinsics"
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/os_specific_freestanding.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build freestanding
//+private
#+build freestanding
#+private
package runtime

// TODO(bill): reimplement `os.write`
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/os_specific_haiku.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build haiku
//+private
#+build haiku
#+private
package runtime

foreign import libc "system:c"
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/os_specific_js.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build js
//+private
#+build js
#+private
package runtime

foreign import "odin_env"
Expand Down
2 changes: 1 addition & 1 deletion base/runtime/os_specific_linux.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+private
#+private
package runtime

import "base:intrinsics"
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/os_specific_orca.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build orca
//+private
#+build orca
#+private
package runtime

import "base:intrinsics"
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/os_specific_wasi.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build wasi
//+private
#+build wasi
#+private
package runtime

foreign import wasi "wasi_snapshot_preview1"
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/os_specific_windows.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build windows
//+private
#+build windows
#+private
package runtime

foreign import kernel32 "system:Kernel32.lib"
Expand Down
2 changes: 1 addition & 1 deletion base/runtime/procs_darwin.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+private
#+private
package runtime

foreign import "system:Foundation.framework"
Expand Down
2 changes: 1 addition & 1 deletion base/runtime/procs_js.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build js
#+build js
package runtime

init_default_context_for_js: Context
Expand Down
2 changes: 1 addition & 1 deletion base/runtime/procs_wasm.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build wasm32, wasm64p32
#+build wasm32, wasm64p32
package runtime

@(private="file")
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/procs_windows_amd64.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+private
//+no-instrumentation
#+private
#+no-instrumentation
package runtime

foreign import kernel32 "system:Kernel32.lib"
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/procs_windows_i386.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+private
//+no-instrumentation
#+private
#+no-instrumentation
package runtime

@require foreign import "system:int64.lib"
Expand Down
2 changes: 1 addition & 1 deletion base/runtime/wasm_allocator.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build wasm32, wasm64p32
#+build wasm32, wasm64p32
package runtime

import "base:intrinsics"
Expand Down
2 changes: 1 addition & 1 deletion core/compress/zlib/zlib.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+vet !using-param
#+vet !using-param
package compress_zlib

/*
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/_aes/hw_intel/api.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build amd64
#+build amd64
package aes_hw_intel

import "core:sys/info"
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/_aes/hw_intel/ghash.odin
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

//+build amd64
#+build amd64
package aes_hw_intel

import "base:intrinsics"
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/_aes/hw_intel/hw_intel_keysched.odin
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

//+build amd64
#+build amd64
package aes_hw_intel

import "base:intrinsics"
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/_chacha20/simd256/chacha20_simd256.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build amd64
#+build amd64
package chacha20_simd256

import "base:intrinsics"
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/_chacha20/simd256/chacha20_simd256_stub.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build !amd64
#+build !amd64
package chacha20_simd256

import "base:intrinsics"
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/aes/aes_ctr_hw_intel.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build amd64
#+build amd64
package aes

import "base:intrinsics"
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/aes/aes_ecb_hw_intel.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build amd64
#+build amd64
package aes

import "base:intrinsics"
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/aes/aes_gcm_hw_intel.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build amd64
#+build amd64
package aes

import "base:intrinsics"
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/aes/aes_impl_hw_gen.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build !amd64
#+build !amd64
package aes

@(private = "file")
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/aes/aes_impl_hw_intel.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build amd64
#+build amd64
package aes

import "core:crypto/_aes/hw_intel"
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/rand_bsd.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build freebsd, openbsd, netbsd
#+build freebsd, openbsd, netbsd
package crypto

foreign import libc "system:c"
Expand Down
14 changes: 7 additions & 7 deletions core/crypto/rand_generic.odin
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//+build !linux
//+build !windows
//+build !openbsd
//+build !freebsd
//+build !netbsd
//+build !darwin
//+build !js
#+build !linux
#+build !windows
#+build !openbsd
#+build !freebsd
#+build !netbsd
#+build !darwin
#+build !js
package crypto

HAS_RAND_BYTES :: false
Expand Down
4 changes: 2 additions & 2 deletions core/debug/trace/trace_cpp.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+private file
//+build linux, darwin
#+private file
#+build linux, darwin
package debug_trace

import "base:intrinsics"
Expand Down
6 changes: 3 additions & 3 deletions core/debug/trace/trace_nil.odin
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//+build !windows
//+build !linux
//+build !darwin
#+build !windows
#+build !linux
#+build !darwin
package debug_trace

import "base:runtime"
Expand Down
4 changes: 2 additions & 2 deletions core/debug/trace/trace_windows.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+private
//+build windows
#+private
#+build windows
package debug_trace

import "base:intrinsics"
Expand Down
4 changes: 2 additions & 2 deletions core/dynlib/lib_js.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build js
//+private
#+build js
#+private
package dynlib

_load_library :: proc(path: string, global_symbols := false) -> (Library, bool) {
Expand Down
4 changes: 2 additions & 2 deletions core/dynlib/lib_unix.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build linux, darwin, freebsd, openbsd, netbsd
//+private
#+build linux, darwin, freebsd, openbsd, netbsd
#+private
package dynlib

import "core:os"
Expand Down
4 changes: 2 additions & 2 deletions core/dynlib/lib_windows.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build windows
//+private
#+build windows
#+private
package dynlib

import win32 "core:sys/windows"
Expand Down
2 changes: 1 addition & 1 deletion core/flags/errors_bsd.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build netbsd, openbsd
#+build netbsd, openbsd
package flags

import "base:runtime"
Expand Down
4 changes: 2 additions & 2 deletions core/flags/errors_nonbsd.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build !netbsd
//+build !openbsd
#+build !netbsd
#+build !openbsd
package flags

import "base:runtime"
Expand Down
2 changes: 1 addition & 1 deletion core/flags/internal_assignment.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+private
#+private
package flags

import "base:intrinsics"
Expand Down
2 changes: 1 addition & 1 deletion core/flags/internal_parsing.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+private
#+private
package flags

import "core:container/bit_array"
Expand Down
2 changes: 1 addition & 1 deletion core/flags/internal_rtti.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+private
#+private
package flags

import "base:intrinsics"
Expand Down
6 changes: 3 additions & 3 deletions core/flags/internal_rtti_nonbsd.odin
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//+private
//+build !netbsd
//+build !openbsd
#+private
#+build !netbsd
#+build !openbsd
package flags

import "core:net"
Expand Down
2 changes: 1 addition & 1 deletion core/flags/internal_validation.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+private
#+private
package flags

@require import "base:runtime"
Expand Down
2 changes: 1 addition & 1 deletion core/fmt/example.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build ignore
#+build ignore
package custom_formatter_example
import "core:fmt"
import "core:io"
Expand Down
2 changes: 1 addition & 1 deletion core/fmt/fmt_js.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build js
#+build js
package fmt

import "core:bufio"
Expand Down
Loading