diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-10-15 21:12:30 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-10-15 21:12:30 -0700 |
commit | 30c90fc4c79f254c41b4c3ee7dfb3cc505179438 (patch) | |
tree | b3eb2313bb200c3d23a1c0dda9ba8cdb7a8dba44 /089scenario_filesystem.cc | |
parent | 392249a76da19cae798998dda198fbe59fbee905 (diff) | |
download | mu-30c90fc4c79f254c41b4c3ee7dfb3cc505179438.tar.gz |
3502
Better implementation of commit 3445: not requiring types for special variables in scenarios. It turned out that it wasn't working anytime we needed to call 'get' on a special variable inside a scenario. After moving that work to an earlier transform we can now use 'filesystem' without a type inside scenarios.
Diffstat (limited to '089scenario_filesystem.cc')
-rw-r--r-- | 089scenario_filesystem.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/089scenario_filesystem.cc b/089scenario_filesystem.cc index 25b1a4c4..078757a5 100644 --- a/089scenario_filesystem.cc +++ b/089scenario_filesystem.cc @@ -20,7 +20,7 @@ scenario foo [ |xyz| ] ] - data:&:@:file-mapping <- get *filesystem:&:filesystem, data:offset + data:&:@:file-mapping <- get *filesystem, data:offset file1:file-mapping <- index *data, 0 file1-name:text <- get file1, name:offset 10:@:char/raw <- copy *file1-name @@ -59,7 +59,7 @@ scenario foo [ |x\\\\|yz| ] ] - data:&:@:file-mapping <- get *filesystem:&:filesystem, data:offset + data:&:@:file-mapping <- get *filesystem, data:offset file1:file-mapping <- index *data, 0 file1-name:text <- get file1, name:offset 10:@:char/raw <- copy *file1-name @@ -80,6 +80,8 @@ Name[r]["filesystem"] = FILESYSTEM; //: make 'filesystem' always a raw location in scenarios :(before "End is_special_name Cases") if (s == "filesystem") return true; +:(before "End Initialize Type Of Special Name In Scenario(r)") +if (r.name == "filesystem") r.type = new_type_tree("address:filesystem"); :(before "End initialize_transform_rewrite_literal_string_to_text()") recipes_taking_literal_strings.insert("assume-filesystem"); |