1
|
/**
|
2
|
*
|
3
|
* OOAS Compiler (Deprecated)
|
4
|
*
|
5
|
* Copyright 2015, Institute for Software Technology, Graz University of
|
6
|
* Technology. Portions are copyright 2015 by the AIT Austrian Institute
|
7
|
* of Technology. All rights reserved.
|
8
|
*
|
9
|
* SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
|
10
|
*
|
11
|
* Please notice that this version of the OOAS compiler is considered de-
|
12
|
* precated. Only the Java version is maintained.
|
13
|
*
|
14
|
* Contributors:
|
15
|
* Willibald Krenn (TU Graz/AIT)
|
16
|
* Stefan Tiran (TU Graz/AIT)
|
17
|
*/
|
18
|
|
19
|
using System;
|
20
|
using System.Collections.Generic;
|
21
|
using System.Text;
|
22
|
|
23
|
namespace TUG.Mogentes.parser.visitors
|
24
|
{
|
25
|
|
26
|
/// <summary>
|
27
|
/// Visitor that inlines method calls (this works easily because we do not allow for recursion!)
|
28
|
/// </summary>
|
29
|
|
30
|
class OoaMethodCallVisitor : OoaCompleteAstTraversalVisitor
|
31
|
{
|
32
|
|
33
|
protected override void VisitAstElement(IAst element, IAst parent)
|
34
|
{
|
35
|
if (element.nodeType == AstNodeTypeEnum.statement)
|
36
|
{
|
37
|
if (((Statement)element).kind == StatementKind.MethodCall)
|
38
|
{
|
39
|
Call aCallStatement = (Call)element;
|
40
|
|
41
|
// parent should be seq block.
|
42
|
System.Diagnostics.Debug.Assert(parent is SeqBlock);
|
43
|
|
44
|
return;
|
45
|
}
|
46
|
}
|
47
|
base.VisitAstElement(element, parent);
|
48
|
}
|
49
|
|
50
|
public OoaMethodCallVisitor(ParserState aState)
|
51
|
: base(aState)
|
52
|
{ }
|
53
|
}
|
54
|
}
|