[noop] 4 new revisions pushed by aeagle22206 on 2009-11-25 23:40 GMT

1 view
Skip to first unread message

no...@googlecode.com

unread,
Nov 25, 2009, 6:41:16 PM11/25/09
to noop-c...@googlegroups.com
4 new revisions:

Revision: f4d8ce4d17
Author: Alex Eagle <alex...@google.com>
Date: Wed Nov 25 12:28:55 2009
Log: IntelliJ now has a free version, so there's no good reason not to
impo...
http://code.google.com/p/noop/source/detail?r=f4d8ce4d17

Revision: 4ea7385b0b
Author: Alex Eagle <alex...@google.com>
Date: Wed Nov 25 15:26:47 2009
Log: Disallow bindings on method definitions. Add support for binding
defin...
http://code.google.com/p/noop/source/detail?r=4ea7385b0b

Revision: fe40e5e10e
Author: Alex Eagle <alex...@google.com>
Date: Wed Nov 25 15:29:16 2009
Log: Add scala facets to modules that contain scala code
http://code.google.com/p/noop/source/detail?r=fe40e5e10e

Revision: 85a30e921d
Author: Alex Eagle <alex...@google.com>
Date: Wed Nov 25 15:40:07 2009
Log: Finish the test that documentation can appear on bindings
http://code.google.com/p/noop/source/detail?r=85a30e921d

==============================================================================
Revision: f4d8ce4d17
Author: Alex Eagle <alex...@google.com>
Date: Wed Nov 25 12:28:55 2009
Log: IntelliJ now has a free version, so there's no good reason not to
impose a tyranny on others. Having the project files checked in should be
helpful.
http://code.google.com/p/noop/source/detail?r=f4d8ce4d17

Added:
/compiler/noop-compiler.iml
/core/noop-core.iml
/examples/examples.iml
/interpreter/noop-interpreter.iml
/noop.ipr
Modified:
/.hgignore

=======================================
--- /dev/null
+++ /compiler/noop-compiler.iml Wed Nov 25 12:28:55 2009
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module relativePaths="false" type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/target/classes" />
+ <output-test url="file://$MODULE_DIR$/target/test-classes" />
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src/main/stringtemplate"
isTestSource="false" />
+ </content>
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="module" module-name="noop-core" />
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-lang/scala-library/2.7.5/scala-library-2.7.5.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-lang/scala-library/2.7.5/scala-library-2.7.5-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-lang/scala-compiler/2.7.5/scala-compiler-2.7.5.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-lang/scala-compiler/2.7.5/scala-compiler-2.7.5-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr/3.1.1/antlr-3.1.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr/3.1.1/antlr-3.1.1-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.5.6/slf4j-api-1.5.6.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.5.6/slf4j-api-1.5.6-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-nop/1.5.6/slf4j-nop-1.5.6.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-nop/1.5.6/slf4j-nop-1.5.6-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-tools/testing/scalacheck/1.5/scalacheck-1.5.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-tools/testing/scalacheck/1.5/scalacheck-1.5-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/jmock/jmock/1.2.0/jmock-1.2.0.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/jmock/jmock/1.2.0/jmock-1.2.0-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/junit/junit/4.5/junit-4.5.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/junit/junit/4.5/junit-4.5-sources.jar!/" />
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-tools/testing/scalatest/0.9.5/scalatest-0.9.5.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-tools/testing/scalatest/0.9.5/scalatest-0.9.5-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ </component>
+</module>
+
=======================================
--- /dev/null
+++ /core/noop-core.iml Wed Nov 25 12:28:55 2009
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module relativePaths="false" type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/target/classes" />
+ <output-test url="file://$MODULE_DIR$/target/test-classes" />
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src/main/scala"
isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/target/generated/antlr"
isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/scala"
isTestSource="true" />
+ <excludeFolder url="file://$MODULE_DIR$/target/classes" />
+ </content>
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-lang/scala-library/2.7.5/scala-library-2.7.5.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-lang/scala-library/2.7.5/scala-library-2.7.5-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-lang/scala-compiler/2.7.5/scala-compiler-2.7.5.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-lang/scala-compiler/2.7.5/scala-compiler-2.7.5-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr/3.1.1/antlr-3.1.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr/3.1.1/antlr-3.1.1-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.5.6/slf4j-api-1.5.6.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.5.6/slf4j-api-1.5.6-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-nop/1.5.6/slf4j-nop-1.5.6.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-nop/1.5.6/slf4j-nop-1.5.6-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-tools/testing/scalacheck/1.5/scalacheck-1.5.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-tools/testing/scalacheck/1.5/scalacheck-1.5-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/jmock/jmock/1.2.0/jmock-1.2.0.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/jmock/jmock/1.2.0/jmock-1.2.0-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/junit/junit/4.5/junit-4.5.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/junit/junit/4.5/junit-4.5-sources.jar!/" />
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-tools/testing/scalatest/0.9.5/scalatest-0.9.5.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-tools/testing/scalatest/0.9.5/scalatest-0.9.5-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ </component>
+</module>
+
=======================================
--- /dev/null
+++ /examples/examples.iml Wed Nov 25 12:28:55 2009
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$" />
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module>
+
=======================================
--- /dev/null
+++ /interpreter/noop-interpreter.iml Wed Nov 25 12:28:55 2009
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module relativePaths="false" type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/target/classes" />
+ <output-test url="file://$MODULE_DIR$/target/test-classes" />
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src/main/scala"
isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/target/resources"
isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/scala"
isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/main/noop"
isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/../examples/noop"
isTestSource="false" />
+ <excludeFolder url="file://$MODULE_DIR$/target/classes" />
+ </content>
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="module" module-name="noop-core" />
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-lang/scala-library/2.7.5/scala-library-2.7.5.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-lang/scala-library/2.7.5/scala-library-2.7.5-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-lang/scala-compiler/2.7.5/scala-compiler-2.7.5.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-lang/scala-compiler/2.7.5/scala-compiler-2.7.5-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr-runtime/3.1.1/antlr-runtime-3.1.1.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/antlr/antlr-runtime/3.1.1/antlr-runtime-3.1.1-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.5.6/slf4j-api-1.5.6.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.5.6/slf4j-api-1.5.6-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-nop/1.5.6/slf4j-nop-1.5.6.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-nop/1.5.6/slf4j-nop-1.5.6-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/aopalliance/aopalliance/1.0/aopalliance-1.0.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/aopalliance/aopalliance/1.0/aopalliance-1.0-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/com/google/inject/guice/2.0/guice-2.0.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/com/google/inject/guice/2.0/guice-2.0-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/com/google/inject/extensions/guice-assisted-inject/2.0/guice-assisted-inject-2.0.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/com/google/inject/extensions/guice-assisted-inject/2.0/guice-assisted-inject-2.0-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-tools/testing/scalacheck/1.5/scalacheck-1.5.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-tools/testing/scalacheck/1.5/scalacheck-1.5-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/jmock/jmock/1.2.0/jmock-1.2.0.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/jmock/jmock/1.2.0/jmock-1.2.0-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/junit/junit/4.5/junit-4.5.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/junit/junit/4.5/junit-4.5-sources.jar!/" />
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-tools/testing/scalatest/0.9.5/scalatest-0.9.5.jar!/"
/>
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root
url="jar://$MAVEN_REPOSITORY$/org/scala-tools/testing/scalatest/0.9.5/scalatest-0.9.5-sources.jar!/"
/>
+ </SOURCES>
+ </library>
+ </orderEntry>
+ </component>
+</module>
+
=======================================
--- /dev/null
+++ /noop.ipr Wed Nov 25 12:28:55 2009
@@ -0,0 +1,262 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="AntConfiguration">
+ <defaultAnt bundledAnt="true" />
+ </component>
+ <component name="BuildJarProjectSettings">
+ <option name="BUILD_JARS_ON_MAKE" value="false" />
+ </component>
+ <component name="CodeStyleManager">
+ <option name="USE_DEFAULT_CODE_STYLE_SCHEME" value="true" />
+ <option name="CODE_STYLE_SCHEME" value="" />
+ </component>
+ <component name="CodeStyleProjectProfileManger">
+ <option name="PROJECT_PROFILE" />
+ <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
+ </component>
+ <component name="CompilerConfiguration">
+ <option name="DEFAULT_COMPILER" value="Javac" />
+ <resourceExtensions />
+ <wildcardResourcePatterns>
+ <entry name="!?*.java" />
+ </wildcardResourcePatterns>
+ <annotationProcessing enabled="false" useClasspath="true" />
+ </component>
+ <component name="CopyrightManager" default="">
+ <module2copyright />
+ </component>
+ <component name="DependenciesAnalyzeManager">
+ <option name="myForwardDirection" value="false" />
+ </component>
+ <component name="DependencyValidationManager">
+ <option name="SKIP_IMPORT_STATEMENTS" value="false" />
+ </component>
+ <component name="EclipseCompilerSettings">
+ <option name="DEBUGGING_INFO" value="true" />
+ <option name="GENERATE_NO_WARNINGS" value="true" />
+ <option name="DEPRECATION" value="false" />
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+ <option name="MAXIMUM_HEAP_SIZE" value="128" />
+ </component>
+ <component name="EclipseEmbeddedCompilerSettings">
+ <option name="DEBUGGING_INFO" value="true" />
+ <option name="GENERATE_NO_WARNINGS" value="true" />
+ <option name="DEPRECATION" value="false" />
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+ <option name="MAXIMUM_HEAP_SIZE" value="128" />
+ </component>
+ <component name="Encoding" useUTFGuessing="true"
native2AsciiForPropertiesFiles="false" />
+ <component name="EntryPointsManager">
+ <entry_points />
+ </component>
+ <component name="ExportToHTMLSettings">
+ <option name="PRINT_LINE_NUMBERS" value="false" />
+ <option name="OPEN_IN_BROWSER" value="false" />
+ <option name="OUTPUT_DIRECTORY" />
+ </component>
+ <component name="IdProvider"
IDEtalkID="0246D33576B8D4BC3331F9A5BB848389" />
+ <component name="ImportConfiguration">
+ <option name="VENDOR" />
+ <option name="RELEASE_TAG" />
+ <option name="LOG_MESSAGE" />
+ <option name="CHECKOUT_AFTER_IMPORT" value="true" />
+ </component>
+ <component name="JUnitProjectSettings">
+ <option name="TEST_RUNNER" value="UI" />
+ </component>
+ <component name="JavacSettings">
+ <option name="DEBUGGING_INFO" value="true" />
+ <option name="GENERATE_NO_WARNINGS" value="false" />
+ <option name="DEPRECATION" value="true" />
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+ <option name="MAXIMUM_HEAP_SIZE" value="128" />
+ </component>
+ <component name="JavadocGenerationManager">
+ <option name="OUTPUT_DIRECTORY" />
+ <option name="OPTION_SCOPE" value="protected" />
+ <option name="OPTION_HIERARCHY" value="false" />
+ <option name="OPTION_NAVIGATOR" value="false" />
+ <option name="OPTION_INDEX" value="false" />
+ <option name="OPTION_SEPARATE_INDEX" value="false" />
+ <option name="OPTION_DOCUMENT_TAG_USE" value="false" />
+ <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
+ <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
+ <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="false" />
+ <option name="OPTION_DEPRECATED_LIST" value="false" />
+ <option name="OTHER_OPTIONS" />
+ <option name="HEAP_SIZE" />
+ <option name="LOCALE" />
+ <option name="OPEN_IN_BROWSER" value="false" />
+ </component>
+ <component name="JikesSettings">
+ <option name="JIKES_PATH" value="" />
+ <option name="DEBUGGING_INFO" value="true" />
+ <option name="DEPRECATION" value="true" />
+ <option name="GENERATE_NO_WARNINGS" value="false" />
+ <option name="IS_EMACS_ERRORS_MODE" value="true" />
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+ </component>
+ <component name="LogConsolePreferences">
+ <option name="FILTER_ERRORS" value="false" />
+ <option name="FILTER_WARNINGS" value="false" />
+ <option name="FILTER_INFO" value="true" />
+ <option name="CUSTOM_FILTER" />
+ </component>
+ <component name="Palette2">
+ <group name="Swing">
+ <item class="com.intellij.uiDesigner.HSpacer"
tooltip-text="Horizontal Spacer"
icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false"
auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="1" hsize-policy="6" anchor="0"
fill="1" />
+ </item>
+ <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical
Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false"
auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="1" anchor="0"
fill="2" />
+ </item>
+ <item class="javax.swing.JPanel"
icon="/com/intellij/uiDesigner/icons/panel.png" removable="false"
auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0"
fill="3" />
+ </item>
+ <item class="javax.swing.JScrollPane"
icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false"
auto-create-binding="false" can-attach-label="true">
+ <default-constraints vsize-policy="7" hsize-policy="7" anchor="0"
fill="3" />
+ </item>
+ <item class="javax.swing.JButton"
icon="/com/intellij/uiDesigner/icons/button.png" removable="false"
auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="0"
fill="1" />
+ <initial-values>
+ <property name="text" value="Button" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JRadioButton"
icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false"
auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="8"
fill="0" />
+ <initial-values>
+ <property name="text" value="RadioButton" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JCheckBox"
icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false"
auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="8"
fill="0" />
+ <initial-values>
+ <property name="text" value="CheckBox" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JLabel"
icon="/com/intellij/uiDesigner/icons/label.png" removable="false"
auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="0" anchor="8"
fill="0" />
+ <initial-values>
+ <property name="text" value="Label" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JTextField"
icon="/com/intellij/uiDesigner/icons/textField.png" removable="false"
auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8"
fill="1">
+ <preferred-size width="150" height="-1" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JPasswordField"
icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false"
auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8"
fill="1">
+ <preferred-size width="150" height="-1" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JFormattedTextField"
icon="/com/intellij/uiDesigner/icons/formattedTextField.png"
removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8"
fill="1">
+ <preferred-size width="150" height="-1" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTextArea"
icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false"
auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0"
fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTextPane"
icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false"
auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0"
fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JEditorPane"
icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false"
auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0"
fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JComboBox"
icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false"
auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="2" anchor="8"
fill="1" />
+ </item>
+ <item class="javax.swing.JTable"
icon="/com/intellij/uiDesigner/icons/table.png" removable="false"
auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0"
fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JList"
icon="/com/intellij/uiDesigner/icons/list.png" removable="false"
auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="2" anchor="0"
fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTree"
icon="/com/intellij/uiDesigner/icons/tree.png" removable="false"
auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0"
fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTabbedPane"
icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false"
auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0"
fill="3">
+ <preferred-size width="200" height="200" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JSplitPane"
icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false"
auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0"
fill="3">
+ <preferred-size width="200" height="200" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JSpinner"
icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false"
auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8"
fill="1" />
+ </item>
+ <item class="javax.swing.JSlider"
icon="/com/intellij/uiDesigner/icons/slider.png" removable="false"
auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8"
fill="1" />
+ </item>
+ <item class="javax.swing.JSeparator"
icon="/com/intellij/uiDesigner/icons/separator.png" removable="false"
auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0"
fill="3" />
+ </item>
+ <item class="javax.swing.JProgressBar"
icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false"
auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="0"
fill="1" />
+ </item>
+ <item class="javax.swing.JToolBar"
icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false"
auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="0"
fill="1">
+ <preferred-size width="-1" height="20" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JToolBar$Separator"
icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png"
removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="0" anchor="0"
fill="1" />
+ </item>
+ <item class="javax.swing.JScrollBar"
icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false"
auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="0" anchor="0"
fill="2" />
+ </item>
+ </group>
+ </component>
+ <component name="ProjectDetails">
+ <option name="projectName" value="noop" />
+ </component>
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/examples/examples.iml"
filepath="$PROJECT_DIR$/examples/examples.iml" />
+ <module fileurl="file://$PROJECT_DIR$/compiler/noop-compiler.iml"
filepath="$PROJECT_DIR$/compiler/noop-compiler.iml" />
+ <module fileurl="file://$PROJECT_DIR$/core/noop-core.iml"
filepath="$PROJECT_DIR$/core/noop-core.iml" />
+ <module
fileurl="file://$PROJECT_DIR$/interpreter/noop-interpreter.iml"
filepath="$PROJECT_DIR$/interpreter/noop-interpreter.iml" />
+ </modules>
+ </component>
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6"
assert-keyword="true" jdk-15="true" project-jdk-name="1.6"
project-jdk-type="JavaSDK" />
+ <component name="RmicSettings">
+ <option name="IS_EANABLED" value="false" />
+ <option name="DEBUGGING_INFO" value="true" />
+ <option name="GENERATE_NO_WARNINGS" value="false" />
+ <option name="GENERATE_IIOP_STUBS" value="false" />
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+ </component>
+ <component name="SvnBranchConfigurationManager">
+ <option name="mySupportsUserInfoFilter" value="true" />
+ </component>
+ <component name="VcsDirectoryMappings">
+ <mapping directory="" vcs="hg4idea" />
+ </component>
+ <component name="com.intellij.jsf.UserDefinedFacesConfigs">
+ <option name="USER_DEFINED_CONFIGS">
+ <value>
+ <list size="0" />
+ </value>
+ </option>
+ </component>
+ <component name="hg4idea.settings">
+ <option name="checkIncoming" value="false" />
+ </component>
+</project>
+
=======================================
--- /.hgignore Mon Oct 19 04:42:14 2009
+++ /.hgignore Wed Nov 25 12:28:55 2009
@@ -1,8 +1,6 @@
target
reports
-.*\.iml
.*\.iws
-.*\.ipr
.DS_Store
^\..*
pom.xml

==============================================================================
Revision: 4ea7385b0b
Author: Alex Eagle <alex...@google.com>
Date: Wed Nov 25 15:26:47 2009
Log: Disallow bindings on method definitions. Add support for binding
definition as top-level construct in file. Bindings will be classes
http://code.google.com/p/noop/source/detail?r=4ea7385b0b

Modified:
/core/src/main/antlr3/noop/grammar/antlr/Noop.g
/core/src/main/antlr3/noop/grammar/antlr/NoopAST.g
/core/src/main/scala/noop/model/ClassDefinition.scala
/core/src/test/scala/noop/grammar/BindingSpec.scala
/core/src/test/scala/noop/grammar/DocumentationSpec.scala

=======================================
--- /core/src/main/antlr3/noop/grammar/antlr/Noop.g Sat Nov 21 19:36:25 2009
+++ /core/src/main/antlr3/noop/grammar/antlr/Noop.g Wed Nov 25 15:26:47 2009
@@ -81,7 +81,7 @@
;

file
- : namespaceDeclaration? importDeclaration* (classDefinition |
interfaceDefinition | test)
+ : namespaceDeclaration? importDeclaration* (classDefinition |
interfaceDefinition | bindingDefinition | test)
;

namespaceDeclaration
@@ -152,12 +152,12 @@
;

unittest
- : 'unittest' StringLiteral bindingsDeclaration? block
- -> ^(UNITTEST StringLiteral bindingsDeclaration? block?)
+ : 'unittest' StringLiteral bindingDeclaration? block
+ -> ^(UNITTEST StringLiteral bindingDeclaration? block?)
;

methodSignature
- : doc? modifiers? returnType VariableIdentifier parameterList
bindingsDeclaration? throwsDeclaration?
+ : doc? modifiers? returnType VariableIdentifier parameterList
throwsDeclaration?
;

throwsDeclaration
@@ -212,15 +212,19 @@
-> ^(TRY block FINALLY block)
;

-
-bindingsDeclaration
- : 'binding' (bindings | TypeIdentifier)
- -> ^(BINDING bindings? TypeIdentifier?)
+bindingDefinition
+ : 'binding' qualifiedType '{' (binding ';')+ '}'
+ -> ^(BINDING qualifiedType binding+)
+ ;
+
+bindingDeclaration
+ : 'binding' (bindings | qualifiedType)
+ -> ^(BINDING bindings? qualifiedType?)
;

bindingsBlock
- : 'binding' (bindings | TypeIdentifier) block
- -> ^(BINDING bindings? TypeIdentifier? block?)
+ : 'binding' (bindings | qualifiedType) block
+ -> ^(BINDING bindings? qualifiedType? block?)
;

bindings
@@ -228,8 +232,8 @@
;

binding
- : TypeIdentifier '->' expression
- -> ^(BIND TypeIdentifier expression)
+ : qualifiedType '->' expression
+ -> ^(BIND qualifiedType expression)
;

shouldStatement
=======================================
--- /core/src/main/antlr3/noop/grammar/antlr/NoopAST.g Sat Nov 21 19:36:25
2009
+++ /core/src/main/antlr3/noop/grammar/antlr/NoopAST.g Wed Nov 25 15:26:47
2009
@@ -82,7 +82,7 @@
@init { $SourceFile::file = $file;
paraphrases.push("at top-level in file"); }
@after { paraphrases.pop(); }
- : namespaceDeclaration? importDeclaration* (classDefinition |
interfaceDefinition | test)
+ : namespaceDeclaration? importDeclaration* (classDefinition |
interfaceDefinition | bindingsDefinition | test)
;

namespaceDeclaration
@@ -221,6 +221,14 @@
}
;

+bindingsDefinition
+ : ^(BINDING t=TypeIdentifier b=bindings d=doc?)
+ {
+ ClassDefinition classDef = new ClassDefinition($t.text,
$SourceFile::file.namespace(), $d.doc);
+ classDef.bindings().\$plus\$plus\$eq($b.bindings);
+ $SourceFile::file.classDef_\$eq(classDef);
+ }
+ ;

bindingsDeclaration returns [Buffer<BindingDeclaration> bindings]
: ^(BINDING b=bindings)
@@ -228,17 +236,17 @@
;

bindingsReference returns [String text]
- : ^(BINDING t=TypeIdentifier)
+ : ^(BINDING t=qualifiedType)
{ $text = $t.text; }
;

bindings returns [Buffer<BindingDeclaration> bindings]
@init{ $bindings = new ArrayBuffer<BindingDeclaration>(); }
- : binding[bindings]
+ : binding[bindings]*
;

binding[Buffer<BindingDeclaration> bindings]
- : ^(BIND t=TypeIdentifier exp=expression)
+ : ^(BIND t=qualifiedType exp=expression)
{ $bindings.\$plus\$eq(new BindingDeclaration($t.text, $exp.exp)); }
;

=======================================
--- /core/src/main/scala/noop/model/ClassDefinition.scala Fri Nov 13
17:38:34 2009
+++ /core/src/main/scala/noop/model/ClassDefinition.scala Wed Nov 25
15:26:47 2009
@@ -32,7 +32,8 @@
val methods: Buffer[Method] = new ArrayBuffer[Method];
val unittests: Buffer[Method] = new ArrayBuffer[Method];
val modifiers: Buffer[Modifier.Value] = new ArrayBuffer[Modifier.Value];
- val imports: Buffer[String] = new ArrayBuffer[String];
+ val imports: Buffer[String] = new ArrayBuffer[String];
+ val bindings: Buffer[BindingDeclaration] = new
ArrayBuffer[BindingDeclaration];

def findMethod(methodName: String): Method = {
methods.find(method => method.name == methodName) match {
=======================================
--- /core/src/test/scala/noop/grammar/BindingSpec.scala Mon Oct 19 22:50:22
2009
+++ /core/src/test/scala/noop/grammar/BindingSpec.scala Wed Nov 25 15:26:47
2009
@@ -15,7 +15,7 @@
*/
package noop.grammar

-import model.{StringLiteralExpression, IdentifierExpression};
+import noop.model.{StringLiteralExpression, IdentifierExpression};
import org.scalatest.matchers.ShouldMatchers;
import org.scalatest.Spec;

@@ -33,8 +33,13 @@
"Port -> 9876; " +
"Max -> firstThing;" +
"}";
- // TODO(alex): figure out a good syntax for this
- // parser.parseFile(source).toStringTree() should be("(BINDING
Something)");
+ parser.parseFile(source).toStringTree() should be(
+ "(BINDING Something (BIND BankService BankServiceImpl) (BIND Port
9876) (BIND Max firstThing))");
+ val file = parser.buildTreeParser(parser.parseFile(source)).file;
+ file.classDef.bindings should have length(3);
+ file.classDef.bindings.first.noopType should be("BankService");
+ file.classDef.bindings.first.binding.getClass() should
be(classOf[IdentifierExpression]);
+
file.classDef.bindings.first.binding.asInstanceOf[IdentifierExpression].identifier
should be ("BankServiceImpl");
}

it("can appear as an anonymous binding block") {
@@ -62,27 +67,20 @@
method.block.namedBinding should be(Some("MyBinding"));
}

- it("can appear in a method declaration with a name") {
+ it("can not appear in a method declaration with a name") {
val source = "class Foo() { Int thing() binding MyBinding {} }";
- parser.parseFile(source).toStringTree() should be(
+ intercept[ParseException] {
+ parser.parseFile(source).toStringTree() should be(
"(CLASS Foo (METHOD (RETURN_TYPE Int) thing (BINDING
MyBinding)))");
- val file = parser.buildTreeParser(parser.parseFile(source)).file;
- val method = file.classDef.methods.first;
- method.block.anonymousBindings should be('empty);
- method.block.namedBinding should be(Some("MyBinding"));
+ }
}

- it("can appear anonymously in a method declaration") {
+ it("can not appear anonymously in a method declaration") {
val source = "class Foo() { Int thing() binding(This -> that) {} }";
- parser.parseFile(source).toStringTree() should be(
+ intercept[ParseException] {
+ parser.parseFile(source).toStringTree() should be(
"(CLASS Foo (METHOD (RETURN_TYPE Int) thing (BINDING (BIND This
that))))");
- val file = parser.buildTreeParser(parser.parseFile(source)).file;
- val method = file.classDef.methods.first;
- method.block.anonymousBindings should have length(1);
- val firstBinding = method.block.anonymousBindings.first;
- firstBinding.noopType should be("This");
- firstBinding.binding.getClass() should
be(classOf[IdentifierExpression]);
- firstBinding.binding.asInstanceOf[IdentifierExpression].identifier
should be ("that");
+ }
}

it("can appear in a unittest declaration with a name") {
=======================================
--- /core/src/test/scala/noop/grammar/DocumentationSpec.scala Sat Nov 21
19:36:25 2009
+++ /core/src/test/scala/noop/grammar/DocumentationSpec.scala Wed Nov 25
15:26:47 2009
@@ -50,5 +50,9 @@
val file = parser.file(source);
file.classDef.documentation should equal
("\nMulti-line\ndocumentation\n");
}
+
+ it("shoud appear before a bindings definition") {
+
+ }
}
}

==============================================================================
Revision: fe40e5e10e
Author: Alex Eagle <alex...@google.com>
Date: Wed Nov 25 15:29:16 2009
Log: Add scala facets to modules that contain scala code
http://code.google.com/p/noop/source/detail?r=fe40e5e10e

Modified:
/compiler/noop-compiler.iml
/core/noop-core.iml
/interpreter/noop-interpreter.iml

=======================================
--- /compiler/noop-compiler.iml Wed Nov 25 12:28:55 2009
+++ /compiler/noop-compiler.iml Wed Nov 25 15:29:16 2009
@@ -1,5 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module relativePaths="false" type="JAVA_MODULE" version="4">
+ <component name="FacetManager">
+ <facet type="Scala" name="Scala">
+ <configuration />
+ </facet>
+ </component>
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
=======================================
--- /core/noop-core.iml Wed Nov 25 12:28:55 2009
+++ /core/noop-core.iml Wed Nov 25 15:29:16 2009
@@ -1,5 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module relativePaths="false" type="JAVA_MODULE" version="4">
+ <component name="FacetManager">
+ <facet type="Scala" name="Scala">
+ <configuration />
+ </facet>
+ </component>
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
=======================================
--- /interpreter/noop-interpreter.iml Wed Nov 25 12:28:55 2009
+++ /interpreter/noop-interpreter.iml Wed Nov 25 15:29:16 2009
@@ -1,5 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module relativePaths="false" type="JAVA_MODULE" version="4">
+ <component name="FacetManager">
+ <facet type="Scala" name="Scala">
+ <configuration />
+ </facet>
+ </component>
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />

==============================================================================
Revision: 85a30e921d
Author: Alex Eagle <alex...@google.com>
Date: Wed Nov 25 15:40:07 2009
Log: Finish the test that documentation can appear on bindings
http://code.google.com/p/noop/source/detail?r=85a30e921d

Modified:
/core/src/main/antlr3/noop/grammar/antlr/Noop.g
/core/src/main/antlr3/noop/grammar/antlr/NoopAST.g
/core/src/test/scala/noop/grammar/DocumentationSpec.scala

=======================================
--- /core/src/main/antlr3/noop/grammar/antlr/Noop.g Wed Nov 25 15:26:47 2009
+++ /core/src/main/antlr3/noop/grammar/antlr/Noop.g Wed Nov 25 15:40:07 2009
@@ -213,8 +213,8 @@
;

bindingDefinition
- : 'binding' qualifiedType '{' (binding ';')+ '}'
- -> ^(BINDING qualifiedType binding+)
+ : doc? 'binding' qualifiedType '{' (binding ';')* '}'
+ -> ^(BINDING qualifiedType doc? binding*)
;

bindingDeclaration
=======================================
--- /core/src/main/antlr3/noop/grammar/antlr/NoopAST.g Wed Nov 25 15:26:47
2009
+++ /core/src/main/antlr3/noop/grammar/antlr/NoopAST.g Wed Nov 25 15:40:07
2009
@@ -222,7 +222,7 @@
;

bindingsDefinition
- : ^(BINDING t=TypeIdentifier b=bindings d=doc?)
+ : ^(BINDING t=TypeIdentifier d=doc? b=bindings)
{
ClassDefinition classDef = new ClassDefinition($t.text,
$SourceFile::file.namespace(), $d.doc);
classDef.bindings().\$plus\$plus\$eq($b.bindings);
=======================================
--- /core/src/test/scala/noop/grammar/DocumentationSpec.scala Wed Nov 25
15:26:47 2009
+++ /core/src/test/scala/noop/grammar/DocumentationSpec.scala Wed Nov 25
15:40:07 2009
@@ -51,8 +51,12 @@
file.classDef.documentation should equal
("\nMulti-line\ndocumentation\n");
}

- it("shoud appear before a bindings definition") {
-
+ it("should appear before a bindings definition") {
+ val source = "\"Stuff you need bound\" binding Stuff {}";
+ parser.parseFile(source).toStringTree() should equal (
+ "(BINDING Stuff (DOC \"Stuff you need bound\"))");
+ val file = parser.file(source);
+ file.classDef.documentation should equal("Stuff you need bound");
}
}
}
Reply all
Reply to author
Forward
0 new messages