Commit f56b13d1 authored by Alexander Ryndin's avatar Alexander Ryndin
Browse files

refactored struct lang to use MC types

parent 50b544ce
/**
*
* ******************************************************************************
* MontiCAR Modeling Family, www.se-rwth.de
* Copyright (c) 2017, Software Engineering Group at RWTH Aachen,
* All rights reserved.
*
* This project is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this project. If not, see <http://www.gnu.org/licenses/>.
* *******************************************************************************
*/
package de.monticore.lang.embeddedmontiarc;
import de.monticore.lang.monticar.ts.MontiCarTypeSymbol;
import de.monticore.symboltable.MutableScope;
public final class Utils {
private Utils() {
}
public static void addBuiltInTypes(MutableScope scope) {
String[] builtInTypes = new String[]{
"Q",
"B",
"C",
"Z",
"RangesType",
"RangeType",
"UnitNumberResolution",
"UnitNumberTypeArgument",
"AssignmentType",
"CommonMatrixType"
};
for (String typeName : builtInTypes) {
MontiCarTypeSymbol s = new MontiCarTypeSymbol(typeName);
s.setPackageName("java.lang");
scope.add(s);
}
}
}
......@@ -44,7 +44,7 @@ public class AbstractSymtabTest {
}
GlobalScope scope = new GlobalScope(mp, fam);
Utils.addBuiltInTypes(scope);
de.monticore.lang.monticar.Utils.addBuiltInTypes(scope);
LogConfig.init();//TODO comment for logger output
return scope;
......
......@@ -22,7 +22,6 @@ package de.monticore.lang.embeddedmontiarc.tag;
import de.monticore.ModelingLanguageFamily;
import de.monticore.io.paths.ModelPath;
import de.monticore.lang.embeddedmontiarc.Utils;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.ComponentSymbol;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.EmbeddedMontiArcLanguage;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.ExpandedComponentInstanceSymbol;
......@@ -77,7 +76,7 @@ public class TagTest {
fam.addModelingLanguage(getMontiArcLanguage());
final ModelPath mp = new ModelPath(Paths.get(modelPath));
GlobalScope scope = new GlobalScope(mp, fam);
Utils.addBuiltInTypes(scope);
de.monticore.lang.monticar.Utils.addBuiltInTypes(scope);
return scope;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment