mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
- The existing ':' anchor works for rvalue substitutions
(Eg, ${:subdict.name}), but fails for lvalues, since it is
a punctuation token and parse stops there.
54 lines
1.3 KiB
C++
54 lines
1.3 KiB
C++
/*--------------------------------*- C++ -*----------------------------------*\
|
|
| ========= | |
|
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
| \\ / O peration | Version: plus |
|
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
|
| \\/ M anipulation | |
|
|
\*---------------------------------------------------------------------------*/
|
|
FoamFile
|
|
{
|
|
version 2.0;
|
|
format ascii;
|
|
class dictionary;
|
|
object testDict;
|
|
note "test with foamDictionary -expand";
|
|
}
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
// #inputMode overwrite
|
|
|
|
key1 val1;
|
|
|
|
subdict
|
|
{
|
|
key1 a;
|
|
key2 b;
|
|
}
|
|
|
|
update
|
|
{
|
|
key1 val1b;
|
|
key2 val2;
|
|
|
|
subdict
|
|
{
|
|
key2 $key1;
|
|
key3 val3;
|
|
key2b ${..key2};
|
|
key3b $^key1;
|
|
}
|
|
}
|
|
|
|
|
|
$update
|
|
|
|
// Can a leading '^' or ':' as anchor for scoping
|
|
key3 $^subdict.key1;
|
|
key3 ${^update.subdict.key3};
|
|
key4 ${:update.subdict...subdict.key1};
|
|
|
|
// This is currently not working
|
|
#remove update.key1
|
|
// #remove update
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|