Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
languages
EmbeddedMontiArc
Commits
f56b13d1
Commit
f56b13d1
authored
Nov 07, 2017
by
Alexander Ryndin
Browse files
refactored struct lang to use MC types
parent
50b544ce
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/monticore/lang/embeddedmontiarc/Utils.java
deleted
100644 → 0
View file @
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
);
}
}
}
src/test/java/de/monticore/lang/embeddedmontiarc/AbstractSymtabTest.java
View file @
f56b13d1
...
...
@@ -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
;
...
...
src/test/java/de/monticore/lang/embeddedmontiarc/tag/TagTest.java
View file @
f56b13d1
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment