summaryrefslogtreecommitdiffstats
path: root/tests/front-end/subdir
diff options
context:
space:
mode:
authorTim Foley <tfoley@nvidia.com>2017-06-27 14:22:01 -0700
committerTim Foley <tfoley@nvidia.com>2017-06-27 14:22:01 -0700
commit9eee1175d9c3089ba53ebed12171bf57a40e80e3 (patch)
tree4f3f1e8b03a1ea3a515c955d3b7e5f6a6b6283f0 /tests/front-end/subdir
parent97f253189af41f117e2de17093904cbb45202d46 (diff)
Allow "dotted" import paths
The code: __import foo.bar; will try to import from a file matching "foo/bar.slang". I also went ahead and allowed a raw string literal in and import: __import "foo/bar"; (In the latter case, an explicit `/` must be used instead of `.`)
Diffstat (limited to 'tests/front-end/subdir')
-rw-r--r--tests/front-end/subdir/import-subdir-a.slang5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/front-end/subdir/import-subdir-a.slang b/tests/front-end/subdir/import-subdir-a.slang
new file mode 100644
index 000000000..3962d4662
--- /dev/null
+++ b/tests/front-end/subdir/import-subdir-a.slang
@@ -0,0 +1,5 @@
+//TEST_IGNORE_FILE:
+
+// This is the imported code.
+
+float foo(float x) { return x; } \ No newline at end of file