Skip to content

Commit

Permalink
Adds strict checking to the parser/tc settings
Browse files Browse the repository at this point in the history
In bca2a6a the strict flag was set only to launches and builds, thus the
flag is not set when the parser/tc is called while typing. This commit
fixes that.
  • Loading branch information
idhugoid committed Oct 5, 2020
1 parent db9f31e commit e6f41cf
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ protected ParseResult startParseFile(IVdmSourceUnit file, String source,
try
{
Settings.release = file.getProject().getLanguageVersion();
Settings.strict = file.getProject().hasUseStrictLetDef();
} catch (CoreException e1)
{
if (Activator.DEBUG)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ protected ParseResult startParse(IVdmSourceUnit file, String source,
try
{
Settings.release = file.getProject().getLanguageVersion();
Settings.strict = file.getProject().hasUseStrictLetDef();
} catch (CoreException e1)
{
if (Activator.DEBUG)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ protected boolean validateTypes(IVdmProject project, String expression)
{
Settings.dialect = Dialect.VDM_PP;
Settings.release = project.getLanguageVersion();
Settings.strict = project.hasUseStrictLetDef();
Console.charset = getProject().getDefaultCharset();
IVdmModel model = project.getModel();
if (!model.isTypeCorrect())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ protected boolean validateTypes(IVdmProject project, String expression)
{
Settings.dialect = Dialect.VDM_RT;
Settings.release = project.getLanguageVersion();
Settings.strict = project.hasUseStrictLetDef();
Console.charset = getProject().getDefaultCharset();
IVdmModel model = project.getModel();
if (!model.isTypeCorrect())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ protected boolean validateTypes(IVdmProject project, String expression)
{
Settings.dialect = Dialect.VDM_SL;
Settings.release = project.getLanguageVersion();
Settings.strict = project.hasUseStrictLetDef();
Console.charset = getProject().getDefaultCharset();
IVdmModel model = project.getModel();
if (!model.isTypeCorrect())
Expand Down

0 comments on commit e6f41cf

Please sign in to comment.