aboutsummaryrefslogtreecommitdiff
path: root/src/server/collector.odin
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2022-04-28 00:04:10 +0200
committerDaniel Gavin <danielgavin5@hotmail.com>2022-04-28 00:04:10 +0200
commit485285ee58c3c3ef3bd09a1d8cd4232d2dfa1917 (patch)
treee7ff6cccf501a1f7098af6a4ce6e18d2d3681ee9 /src/server/collector.odin
parent02d0c0bec7a51dfa2dbdb87c9f34b8216ba83676 (diff)
remove the lower case for windows.
Diffstat (limited to 'src/server/collector.odin')
-rw-r--r--src/server/collector.odin28
1 files changed, 3 insertions, 25 deletions
diff --git a/src/server/collector.odin b/src/server/collector.odin
index 2de0068..b044f1c 100644
--- a/src/server/collector.odin
+++ b/src/server/collector.odin
@@ -269,13 +269,7 @@ collect_generic :: proc(collection: ^SymbolCollection, expr: ^ast.Expr, package_
collect_symbols :: proc(collection: ^SymbolCollection, file: ast.File, uri: string) -> common.Error {
forward, _ := filepath.to_slash(file.fullpath, context.temp_allocator)
-
- when ODIN_OS == .Windows {
- directory := strings.to_lower(path.dir(forward, context.temp_allocator), context.temp_allocator)
- } else {
- directory := path.dir(forward, context.temp_allocator)
- }
-
+ directory := path.dir(forward, context.temp_allocator)
package_map := get_package_mapping(file, collection.config, directory)
exprs := common.collect_globals(file, true)
@@ -409,12 +403,8 @@ collect_symbols :: proc(collection: ^SymbolCollection, file: ast.File, uri: stri
symbol.flags |= {.PrivatePackage}
}
- when ODIN_OS == .Windows {
- symbol.uri = get_index_unique_string(collection, strings.to_lower(uri, context.temp_allocator))
- } else {
- symbol.uri = get_index_unique_string(collection, uri)
- }
-
+ symbol.uri = get_index_unique_string(collection, uri)
+
pkg: ^map[string]Symbol
ok: bool
@@ -508,11 +498,7 @@ get_package_mapping :: proc(file: ast.File, config: ^common.Config, directory: s
name: string
- when ODIN_OS == .Windows {
- full := path.join(elems = {strings.to_lower(dir, context.temp_allocator), p}, allocator = context.temp_allocator)
- } else {
full := path.join(elems = {dir, p}, allocator = context.temp_allocator)
- }
if imp.name.text != "" {
name = imp.name.text
@@ -520,11 +506,7 @@ get_package_mapping :: proc(file: ast.File, config: ^common.Config, directory: s
name = path.base(full, false, context.temp_allocator)
}
- when ODIN_OS == .Windows {
- package_map[name] = strings.to_lower(full, context.temp_allocator)
- } else {
package_map[name] = full
- }
} else {
name: string
@@ -537,11 +519,7 @@ get_package_mapping :: proc(file: ast.File, config: ^common.Config, directory: s
name = path.base(full, false, context.temp_allocator)
}
- when ODIN_OS == .Windows {
- package_map[name] = strings.to_lower(full, context.temp_allocator)
- } else {
package_map[name] = full
- }
}
}