fix #2023
This commit is contained in:
parent
bb218b172f
commit
01f2797722
|
|
@ -1,9 +1,9 @@
|
|||
//
|
||||
// This CSharp output file generated by Gardens Point LEX
|
||||
// Version: 1.1.3.301
|
||||
// Machine: DESKTOP-G8V08V4
|
||||
// DateTime: 24.06.2019 15:32:41
|
||||
// UserName: ?????????
|
||||
// Machine: DESKTOP-IF20NRO
|
||||
// DateTime: 6/28/2019 7:30:18 AM
|
||||
// UserName: FatCow
|
||||
// GPLEX input file <ABCPascal.lex>
|
||||
// GPLEX frame file <embedded resource>
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
// (see accompanying GPPGcopyright.rtf)
|
||||
|
||||
// GPPG version 1.3.6
|
||||
// Machine: DESKTOP-G8V08V4
|
||||
// DateTime: 24.06.2019 15:32:41
|
||||
// UserName: ?????????
|
||||
// Machine: DESKTOP-IF20NRO
|
||||
// DateTime: 6/28/2019 7:30:19 AM
|
||||
// UserName: FatCow
|
||||
// Input file <ABCPascal.y>
|
||||
|
||||
// options: no-lines gplex
|
||||
|
|
|
|||
|
|
@ -19,21 +19,21 @@ namespace SyntaxVisitors.SugarVisitors
|
|||
if_node leftExprIfNode = null;
|
||||
if (binEpxr.operation_type == Operators.LogicalAND)
|
||||
{
|
||||
rightExprIfNode = new if_node(binEpxr.right, _if_node.then_body, _if_node.else_body, _if_node.source_context);
|
||||
leftExprIfNode = new if_node(binEpxr.left, rightExprIfNode, _if_node.else_body, _if_node.source_context);
|
||||
rightExprIfNode = new if_node(binEpxr.right, (statement)_if_node.then_body?.Clone(), (statement)_if_node.else_body?.Clone(), _if_node.source_context);
|
||||
leftExprIfNode = new if_node(binEpxr.left, rightExprIfNode, (statement)_if_node.else_body?.Clone(), _if_node.source_context);
|
||||
}
|
||||
else if (binEpxr.operation_type == Operators.LogicalOR)
|
||||
{
|
||||
rightExprIfNode = new if_node(
|
||||
new un_expr(binEpxr.right, Operators.LogicalNOT, binEpxr.source_context),
|
||||
_if_node.else_body,
|
||||
_if_node.then_body,
|
||||
(statement)_if_node.else_body?.Clone(),
|
||||
(statement)_if_node.then_body?.Clone(),
|
||||
_if_node.source_context);
|
||||
|
||||
leftExprIfNode = new if_node(
|
||||
new un_expr(binEpxr.left, Operators.LogicalNOT, binEpxr.source_context),
|
||||
rightExprIfNode,
|
||||
_if_node.then_body,
|
||||
(statement)_if_node.then_body?.Clone(),
|
||||
_if_node.source_context);
|
||||
}
|
||||
ReplaceUsingParent(_if_node, leftExprIfNode);
|
||||
|
|
|
|||
7
TestSuite/patterns-extended-is-var-chain.pas
Normal file
7
TestSuite/patterns-extended-is-var-chain.pas
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
begin
|
||||
var o1, o2, o3: object;
|
||||
if (o1 is word(var p1)) and (o2 is real(var p2))
|
||||
then
|
||||
else
|
||||
if (o3 is byte(var v1)) then
|
||||
end.
|
||||
Loading…
Reference in a new issue