-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clarified error handling slightly, made sure to include a syntax erro…
…r on purpose
- Loading branch information
1 parent
c7d3749
commit 0bd8c74
Showing
10 changed files
with
75 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
TYPE T_INTERLOCK : WORD; | ||
END_TYPE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.11"> | ||
<DUT Name="E_Error" Id="{c568c63f-be9a-4c9b-92a0-4c4517e2c530}"> | ||
<Declaration><![CDATA[{attribute 'qualified_only'} | ||
{attribute 'strict'} | ||
TYPE E_Error : | ||
( | ||
OK := 0, | ||
SomeError := 5, | ||
OtherError | ||
) USINT; | ||
END_TYPE | ||
]]></Declaration> | ||
</DUT> | ||
</TcPlcObject> |
12 changes: 12 additions & 0 deletions
12
tests/roots/test-plc-project/src_plc/DUTs/ST_MyStruct.TcDUT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.11"> | ||
<DUT Name="ST_MyStruct" Id="{111e5770-8d5b-4d8e-bf7d-bb6f31cde823}"> | ||
<Declaration><![CDATA[TYPE ST_MyStruct : | ||
STRUCT | ||
number : LREAL; | ||
text : STRING(10); | ||
END_STRUCT | ||
END_TYPE | ||
]]></Declaration> | ||
</DUT> | ||
</TcPlcObject> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.11"> | ||
<DUT Name="T_ALIAS" Id="{211c8563-7ef4-49a4-abc1-63eb79b1eac8}"> | ||
<Declaration><![CDATA[TYPE T_ALIAS : WORD; | ||
END_TYPE | ||
]]></Declaration> | ||
</DUT> | ||
</TcPlcObject> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
tests/roots/test-plc-project/src_plc/POUs/F_SyntaxError.TcPOU
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.11"> | ||
<POU Name="F_SyntaxError" Id="{245635d7-7d54-4aa8-92df-775383b63265}" SpecialFunc="None"> | ||
<Declaration><![CDATA[FUNCTION F_SyntaxError RETURNS BOOL | ||
VAR_INPUT | ||
END_VAR | ||
]]></Declaration> | ||
<Implementation> | ||
<ST><![CDATA[]]></ST> | ||
</Implementation> | ||
</POU> | ||
</TcPlcObject> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters