ENH: support field width for #eval expressions

For example,
```
entry #eval 10 { vector(rand(), 0, 0) };
```

ENH: be more generous and ignore trailing ';' in expressions

STYLE: adjust parse token name for tensor::I
This commit is contained in:
Mark Olesen
2021-03-29 14:03:10 +02:00
parent d4ac96cdf3
commit 21720bea12
18 changed files with 128 additions and 62 deletions

View File

@ -7,7 +7,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2019-2020 OpenCFD Ltd.
Copyright (C) 2019-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -595,7 +595,7 @@ tr9:
goto st11;
tr11:
#line 418 "patchExprScanner.rl"
{te = p+1;{ EMIT_TOKEN(UNIT_TENSOR); }}
{te = p+1;{ EMIT_TOKEN(IDENTITY_TENSOR); }}
goto st11;
tr12:
#line 359 "patchExprScanner.rl"