├── version.txt ├── bin ├── .gitignore ├── booc.exe ├── booi.exe ├── booish.exe ├── Boo.Lang.dll ├── Boo.NAnt.Tasks.dll ├── Boo.Lang.CodeDom.dll ├── Boo.Lang.Compiler.dll ├── Boo.Lang.Parser.dll ├── Boo.Lang.Useful.dll ├── Boo.Lang.Extensions.dll ├── Boo.Lang.Interpreter.dll └── Boo.Lang.PatternMatching.dll ├── Makefile.am ├── src ├── .gitattributes ├── .gitignore ├── Boo.Lang │ └── Resources │ │ └── .gitignore ├── boo.snk └── booc │ ├── App.ico │ └── app.config ├── tests ├── .gitignore ├── testcases │ ├── compilation │ │ ├── 1.boo │ │ ├── math.boo │ │ ├── redefine_builtin.boo │ │ ├── re0.boo │ │ ├── multifile3.boo │ │ ├── pow0.boo │ │ ├── match0.boo │ │ ├── mathwithns.boo │ │ ├── multifile2.boo │ │ ├── stringmultiply0.boo │ │ ├── null0.boo │ │ ├── UsingNestedType.boo │ │ ├── timespan0.boo │ │ ├── multifile0.boo │ │ ├── multifile1.boo │ │ ├── unpack_locals.boo │ │ ├── enumeratoritemtype2.boo │ │ ├── if0.boo │ │ ├── long0.boo │ │ ├── mult0.boo │ │ ├── double0.boo │ │ ├── parameter_as_lvalue.boo │ │ ├── caseinsensitivehash.boo │ │ ├── modifiers0.boo │ │ ├── inplace1.boo │ │ ├── formatting0.boo │ │ ├── enumeratoritemtype0.boo │ │ ├── match1.boo │ │ └── InternalArrayType.boo │ ├── parser │ │ ├── for_stmt_1.boo │ │ ├── wsa │ │ │ ├── null-1.boo │ │ │ ├── cast-1.boo │ │ │ ├── char-1.boo │ │ │ ├── closures-6.boo │ │ │ ├── expressions-5.boo │ │ │ ├── declarations-1.boo │ │ │ ├── long-literals-1.boo │ │ │ ├── at-operator.boo │ │ │ ├── goto-1.boo │ │ │ ├── comments-4.boo │ │ │ ├── fields-1.boo │ │ │ ├── generic-method-1.boo │ │ │ ├── arrays-4.boo │ │ │ ├── double-literals-1.boo │ │ │ ├── list-1.boo │ │ │ ├── closures-19.boo │ │ │ ├── generic-method-2.boo │ │ │ ├── generic-method-3.boo │ │ │ ├── splicing-enum-body.boo │ │ │ ├── arrays-5.boo │ │ │ ├── fields-3.boo │ │ │ ├── getset-1.boo │ │ │ ├── splicing-1.boo │ │ │ ├── splicing-class-body.boo │ │ │ ├── fields-2.boo │ │ │ ├── generators-1.boo │ │ │ ├── line-continuation-1.boo │ │ │ ├── regex-literals-2.boo │ │ │ ├── xor-1.boo │ │ │ ├── fields-4.boo │ │ │ ├── in-not-in-3.boo │ │ │ ├── while_or-1.boo │ │ │ ├── char-2.boo │ │ │ ├── class-3.boo │ │ │ ├── closures-21.boo │ │ │ ├── closures-7.boo │ │ │ ├── closures-8.boo │ │ │ ├── for_or-1.boo │ │ │ ├── ones-complement-1.boo │ │ │ ├── while_then-1.boo │ │ │ ├── arrays-6.boo │ │ │ ├── for_then-1.boo │ │ │ ├── closures-10.boo │ │ │ ├── closures-11.boo │ │ │ ├── comments-3.boo │ │ │ ├── import-2.boo │ │ │ ├── interpolation-3.boo │ │ │ ├── return-1.boo │ │ │ ├── and-or-1.boo │ │ │ ├── ast-literal-enum.boo │ │ │ ├── attributes-2.boo │ │ │ ├── closures-22.boo │ │ │ ├── declarations-3.boo │ │ │ ├── expressions-4.boo │ │ │ ├── macros-2.boo │ │ │ ├── ast-literal-varargs-method.boo │ │ │ ├── declarations-2.boo │ │ │ ├── internal-generic-callable-type-1.boo │ │ │ ├── timespan-literals-1.boo │ │ │ ├── closures-5.boo │ │ │ ├── closures-9.boo │ │ │ ├── return-2.boo │ │ │ ├── struct-1.boo │ │ │ ├── assignment-1.boo │ │ │ ├── bool-literals-1.boo │ │ │ ├── closures-14.boo │ │ │ ├── closures-20.boo │ │ │ ├── in-not-in-1.boo │ │ │ ├── in-not-in-2.boo │ │ │ ├── internal-generic-type-1.boo │ │ │ ├── internal-generic-type-2.boo │ │ │ └── internal-generic-type-5.boo │ │ ├── re_literal_2.boo │ │ ├── re_literal_3.boo │ │ ├── roundtrip │ │ │ ├── null-1.boo │ │ │ ├── cast-1.boo │ │ │ ├── char-1.boo │ │ │ ├── expressions-5.boo │ │ │ ├── closures-6.boo │ │ │ ├── fields-1.boo │ │ │ ├── declarations-1.boo │ │ │ ├── long-literals-1.boo │ │ │ ├── splicing-class-body.boo │ │ │ ├── splicing-enum-body.boo │ │ │ ├── at-operator.boo │ │ │ ├── fields-2.boo │ │ │ ├── fields-3.boo │ │ │ ├── generic-method-1.boo │ │ │ ├── closures-19.boo │ │ │ ├── double-literals-1.boo │ │ │ ├── goto-1.boo │ │ │ ├── char-2.boo │ │ │ ├── generic-method-2.boo │ │ │ ├── list-1.boo │ │ │ ├── comments-4.boo │ │ │ ├── fields-4.boo │ │ │ ├── closures-10.boo │ │ │ ├── generic-method-3.boo │ │ │ ├── getset-1.boo │ │ │ ├── splicing-1.boo │ │ │ ├── xor-1.boo │ │ │ ├── arrays-5.boo │ │ │ ├── generators-1.boo │ │ │ ├── in-not-in-3.boo │ │ │ ├── regex-literals-2.boo │ │ │ ├── closures-11.boo │ │ │ ├── ones-complement-1.boo │ │ │ ├── return-1.boo │ │ │ ├── while_or-1.boo │ │ │ ├── ast-literal-enum.boo │ │ │ ├── closures-7.boo │ │ │ ├── for_or-1.boo │ │ │ ├── while_then-1.boo │ │ │ ├── arrays-4.boo │ │ │ ├── class-3.boo │ │ │ ├── closures-8.boo │ │ │ ├── for_then-1.boo │ │ │ ├── and-or-1.boo │ │ │ ├── import-2.boo │ │ │ ├── return-2.boo │ │ │ ├── struct-1.boo │ │ │ ├── arrays-6.boo │ │ │ ├── ast-literal-varargs-method.boo │ │ │ ├── closures-18.boo │ │ │ ├── comments-3.boo │ │ │ ├── expressions-4.boo │ │ │ ├── line-continuation-1.boo │ │ │ ├── bool-literals-1.boo │ │ │ ├── macros-2.boo │ │ │ ├── method-declaration-in-macro-application.boo │ │ │ ├── closures-14.boo │ │ │ ├── closures-5.boo │ │ │ ├── declarations-3.boo │ │ │ ├── assignment-1.boo │ │ │ ├── closures-20.boo │ │ │ ├── closures-22.boo │ │ │ ├── closures-9.boo │ │ │ ├── expressions-3.boo │ │ │ ├── in-not-in-1.boo │ │ │ ├── timespan-literals-1.boo │ │ │ ├── attributes-2.boo │ │ │ ├── declarations-2.boo │ │ │ ├── in-not-in-2.boo │ │ │ ├── internal-generic-callable-type-1.boo │ │ │ └── internal-generic-type-1.boo │ │ ├── unpack_stmt_1.boo │ │ ├── re_literal_1.boo │ │ ├── simple.boo │ │ ├── yield_stmt_1.boo │ │ ├── simple_classes.boo │ │ ├── enum_1.boo │ │ ├── static_method.boo │ │ ├── stmt_modifiers_1.boo │ │ ├── stmt_modifiers_3.boo │ │ ├── stmt_modifiers_2.boo │ │ ├── simple_global_defs.boo │ │ └── if_else_1.boo │ ├── integration │ │ ├── modules │ │ │ ├── peek.a.boo │ │ │ ├── modules-2.boo │ │ │ ├── modules-6.boo │ │ │ ├── dotted.module.name.boo │ │ │ ├── import-1.boo │ │ │ ├── import-5.boo │ │ │ ├── modules-3.boo │ │ │ ├── import-2.boo │ │ │ ├── import-3.boo │ │ │ ├── import-4.boo │ │ │ └── import-6.boo │ │ ├── arrays │ │ │ ├── arrays-11.boo │ │ │ ├── arrays-2.boo │ │ │ ├── arrays-3.boo │ │ │ ├── arrays-9.boo │ │ │ ├── arrays-1.boo │ │ │ ├── arrays-4.boo │ │ │ ├── matrix-with-type-reference.boo │ │ │ ├── arrays-21.boo │ │ │ ├── arrays-7.boo │ │ │ ├── arrays-8.boo │ │ │ ├── arrays-14.boo │ │ │ ├── arrays-20.boo │ │ │ └── arrays-18.boo │ │ ├── statements │ │ │ ├── unpack-10.boo │ │ │ ├── unpack-1.boo │ │ │ ├── unpack-4.boo │ │ │ ├── unpack-5.boo │ │ │ ├── for-1.boo │ │ │ ├── unpack-2.boo │ │ │ ├── while-4.boo │ │ │ ├── while_then-4.boo │ │ │ ├── for-5.boo │ │ │ ├── while-1.boo │ │ │ ├── continue-1.boo │ │ │ ├── unpack-3.boo │ │ │ ├── while-7.boo │ │ │ ├── while-8.boo │ │ │ ├── for-2.boo │ │ │ ├── break-1.boo │ │ │ ├── break-2.boo │ │ │ ├── goto-1.boo │ │ │ ├── while-6.boo │ │ │ ├── declaration-2.boo │ │ │ ├── for_then-4.boo │ │ │ ├── while-5.boo │ │ │ ├── continue-2.boo │ │ │ ├── declaration-1.boo │ │ │ ├── for-3.boo │ │ │ ├── goto-2.boo │ │ │ └── goto-3.boo │ │ ├── callables │ │ │ ├── callables-37.boo │ │ │ ├── callables-42.boo │ │ │ ├── callables-41.boo │ │ │ ├── callables-12.boo │ │ │ ├── callables-7.boo │ │ │ ├── byref-13.boo │ │ │ ├── callables-45.boo │ │ │ ├── params-6.boo │ │ │ ├── callables-2.boo │ │ │ ├── callables-4.boo │ │ │ ├── method-as-macro-3.boo │ │ │ └── callables-43.boo │ │ ├── primitives │ │ │ ├── hex-2.boo │ │ │ ├── typeof-2.boo │ │ │ ├── uint-1.boo │ │ │ ├── ulong-bitshift.boo │ │ │ ├── list-3.boo │ │ │ ├── long-1.boo │ │ │ ├── int-shift-overflow-unchecked.boo │ │ │ ├── uint-argument.boo │ │ │ ├── uint-field-initializer.boo │ │ │ ├── char-3.boo │ │ │ ├── string-yields-chars.boo │ │ │ ├── typeof-1.boo │ │ │ ├── double-precision-is-used-for-literals.boo │ │ │ ├── list-1.boo │ │ │ ├── hash-1.boo │ │ │ ├── unsigned-2.boo │ │ │ └── char-5.boo │ │ ├── operators │ │ │ ├── shift-1.boo │ │ │ ├── cast-9.boo │ │ │ ├── slicing-13.boo │ │ │ ├── cast-1.boo │ │ │ ├── bitwise-and-1.boo │ │ │ ├── cast-7.boo │ │ │ ├── slicing-9.boo │ │ │ ├── unary-2.boo │ │ │ ├── post-incdec-3.boo │ │ │ ├── slicing-5.boo │ │ │ ├── post-incdec-1.boo │ │ │ ├── post-incdec-7.boo │ │ │ ├── slicing-1.boo │ │ │ ├── slicing-2.boo │ │ │ ├── slicing-8.boo │ │ │ ├── ones-complement-1.boo │ │ │ └── post-incdec-4.boo │ │ ├── closures │ │ │ ├── nested-functions-1.boo │ │ │ ├── closures-18.boo │ │ │ ├── closures-23.boo │ │ │ ├── closure-inference-1.boo │ │ │ ├── closure-inference-3.boo │ │ │ ├── closures-5.boo │ │ │ ├── closures-2.boo │ │ │ ├── explicit-closure-types-for-generic-method.boo │ │ │ └── closures-27.boo │ │ ├── generators │ │ │ ├── generators-3.boo │ │ │ ├── list-generators-4.boo │ │ │ ├── list-generators-5.boo │ │ │ ├── to-string.boo │ │ │ ├── generators-15.boo │ │ │ ├── generators-8.boo │ │ │ ├── generators-12.boo │ │ │ ├── generators-16.boo │ │ │ ├── yield-13.boo │ │ │ ├── list-generators-2.boo │ │ │ ├── generator-of-static-class-is-transient.boo │ │ │ ├── generators-13.boo │ │ │ ├── generator-of-transient-class-is-transient.boo │ │ │ └── list-generators-1.boo │ │ ├── attributes │ │ │ └── transient.boo │ │ ├── duck-typing │ │ │ ├── duck-7.boo │ │ │ ├── duck-17.boo │ │ │ ├── duck-3.boo │ │ │ └── duck-8.boo │ │ ├── linq │ │ │ ├── linq-aggregate.boo │ │ │ └── array-linq.boo │ │ ├── types │ │ │ ├── interfaces-3.boo │ │ │ ├── internal-field-initializer.boo │ │ │ ├── static-final-2.boo │ │ │ ├── innerclasses-9.boo │ │ │ ├── classes-1.boo │ │ │ ├── classes-8.boo │ │ │ ├── interfaces-19.boo │ │ │ ├── classes-9.boo │ │ │ ├── fields-7.boo │ │ │ ├── overloading-3.boo │ │ │ ├── enums-14.boo │ │ │ ├── innerclasses-1.boo │ │ │ ├── methods-1.boo │ │ │ └── negative-enum-value.boo │ │ ├── clr-extensions │ │ │ └── infer-closure-singature.boo │ │ └── meta-programming │ │ │ ├── interpolation-splicing-1.boo │ │ │ ├── interpolation-splicing-2.boo │ │ │ └── name-splicing-1.boo │ ├── regression │ │ ├── BOO-705-1.boo │ │ ├── BOO-935-1.boo │ │ ├── BOO-178-2.boo │ │ ├── BOO-1069-1.boo │ │ ├── BOO-935-2.boo │ │ ├── BOO-178-1.boo │ │ ├── BOO-308-1.boo │ │ ├── BOO-308-2.boo │ │ ├── BOO-860-1.boo │ │ ├── BOO-1047.boo │ │ ├── BOO-714-1.boo │ │ ├── BOO-799-1.boo │ │ ├── BOO-90-1.boo │ │ ├── BOO-1070-1.boo │ │ ├── BOO-226-2.boo │ │ ├── BOO-739-1.boo │ │ ├── BOO-986-1.boo │ │ ├── array_ldelem.boo │ │ ├── BOO-195-1.boo │ │ ├── BOO-398-1.boo │ │ ├── BOO-612-1.boo │ │ ├── BOO-129-1.boo │ │ ├── BOO-226-1.boo │ │ ├── BOO-1080-1.boo │ │ ├── BOO-1130-1.boo │ │ ├── BOO-301-1.boo │ │ ├── BOO-949-1.boo │ │ ├── BOO-975-1.boo │ │ ├── BOO-145-1.boo │ │ ├── BOO-366-1.boo │ │ ├── BOO-612-2.boo │ │ ├── BOO-779-4.boo │ │ ├── BOO-977-1.boo │ │ ├── BOO-979-2.boo │ │ ├── BOO-949-2.boo │ │ ├── BOO-958-1.boo │ │ ├── for-re-Split.boo │ │ ├── BOO-189-1.boo │ │ ├── BOO-248-1.boo │ │ ├── BOO-372-1.boo │ │ ├── BOO-725-1.boo │ │ ├── BOO-979-1.boo │ │ ├── BOO-338-1.boo │ │ ├── BOO-770-1.boo │ │ ├── BOO-1288.boo │ │ ├── BOO-913-1.boo │ │ ├── BOO-1127-1.boo │ │ ├── BOO-301-2.boo │ │ ├── BOO-441-2.boo │ │ ├── BOO-1177-1.boo │ │ ├── BOO-231-1.boo │ │ ├── BOO-313-5.boo │ │ └── BOO-719-2.boo │ ├── stdlib │ │ ├── list-equals-1.boo │ │ ├── list-indexof-1.boo │ │ ├── list-add-1.boo │ │ ├── len-1.boo │ │ ├── range-3.boo │ │ ├── list-indexof-2.boo │ │ ├── join-1.boo │ │ ├── list-sort-1.boo │ │ ├── reversed-1.boo │ │ ├── cat-1.boo │ │ └── list-indexof-3.boo │ ├── errors │ │ ├── BCE0095-1.boo │ │ ├── BCE0125-1.boo │ │ ├── BCE0022-1.boo │ │ ├── BCE0038-1.boo │ │ ├── BCE0124-1.boo │ │ ├── BCE0022-4.boo │ │ ├── BCE0063-1.boo │ │ ├── BCE0022-5.boo │ │ ├── BCE0063-2.boo │ │ ├── BCE0022-14.boo │ │ ├── BCE0153-2.boo │ │ ├── BCE0022-11.boo │ │ ├── BCE0067-1.boo │ │ ├── BCE0087-1.boo │ │ ├── BCE0095-2.boo │ │ ├── BCE0022-13.boo │ │ ├── BCE0061-1.boo │ │ ├── BCE0067-3.boo │ │ ├── BCE0102-1.boo │ │ ├── BCE0123-1.boo │ │ ├── BCE0022-12.boo │ │ ├── BCE0067-2.boo │ │ ├── BCE0093-2.boo │ │ ├── BCE0097-1.boo │ │ ├── BCE0166-1.boo │ │ ├── BCE0072-2.boo │ │ ├── BCE0086-1.boo │ │ ├── BCE0094-1.boo │ │ ├── BCE0100-1.boo │ │ ├── BCE0103-3.boo │ │ ├── selective-import.boo │ │ ├── BCE0103-1.boo │ │ ├── BCE0108-1.boo │ │ ├── BCE0134-2.boo │ │ ├── BCE0083-1.boo │ │ ├── BCE0085-1.boo │ │ ├── BCE0134-1.boo │ │ ├── selective-import-2.boo │ │ ├── BCE0005-2.boo │ │ ├── BCE0022-2.boo │ │ ├── BCE0060-1.boo │ │ ├── BCE0063-5.boo │ │ ├── BCE0093-1.boo │ │ ├── BCE0121-1.boo │ │ ├── BCE0018-1.boo │ │ ├── BCE0063-6.boo │ │ ├── BCE0063-7.boo │ │ ├── BCE0063-8.boo │ │ ├── BCE0084-1.boo │ │ ├── BCE0089-1.boo │ │ ├── BCE0089-3.boo │ │ ├── BCE0103-2.boo │ │ ├── BCE0126-1.boo │ │ ├── cannot-convert-enum-to-single.boo │ │ ├── BCE0018-4.boo │ │ ├── BCE0082-1.boo │ │ ├── BCE0085-3.boo │ │ ├── BCE0089-4.boo │ │ ├── BCE0089-7.boo │ │ ├── BCE0155-1.boo │ │ ├── BCE0005-1.boo │ │ ├── BCE0051-1.boo │ │ ├── BCE0063-3.boo │ │ ├── BCE0073-1.boo │ │ ├── BCE0089-5.boo │ │ ├── BCE0107-1.boo │ │ ├── BCE0126-4.boo │ │ ├── BCE0126-6.boo │ │ ├── BCE0128-1.boo │ │ ├── BCE0089-2.boo │ │ ├── BCE0112-1.boo │ │ ├── BCE0142.boo │ │ └── BCE0167-1.boo │ ├── warnings │ │ ├── BCW0006-2.boo │ │ ├── BCW0002-1.boo │ │ ├── BCW0015-5.boo │ │ ├── no-unreacheable-code-warning-for-compiler-generated-code.boo │ │ └── BCW0011-16.boo │ ├── net2 │ │ ├── generics │ │ │ ├── mixedbase.dll │ │ │ ├── type-reference-1.boo │ │ │ ├── generators-2.boo │ │ │ ├── inference-1.boo │ │ │ ├── type-reference-3.boo │ │ │ ├── collections-1.boo │ │ │ ├── inference-4.boo │ │ │ ├── generic-field-1.boo │ │ │ ├── generic-inheritance-1.boo │ │ │ ├── internal-generic-type-1.boo │ │ │ ├── generators-1.boo │ │ │ ├── generic-array-1.boo │ │ │ ├── array-enumerable-1.boo │ │ │ ├── internal-generic-type-3.boo │ │ │ ├── generic-matrix-1.boo │ │ │ └── internal-generic-type-2.boo │ │ └── errors │ │ │ └── BCE0138-1.boo │ ├── macros │ │ ├── print-2.boo │ │ ├── print-1.boo │ │ ├── yieldAll-1.boo │ │ └── then-can-be-used-as-macro-name.boo │ ├── ducky │ │ ├── null-initializer-1.boo │ │ ├── ducky-10.boo │ │ ├── method-dispatch-3.boo │ │ ├── ducky-3.boo │ │ ├── ducky-8.boo │ │ ├── method-dispatch-10.boo │ │ ├── ducky-9.boo │ │ ├── object-overloads-1.boo │ │ └── duck-slice-1.boo │ ├── attributes │ │ ├── default-1.boo │ │ └── required-1.boo │ └── semantics │ │ └── enum0.boo ├── test.snk ├── BooModules │ ├── Math.boo │ ├── SunShip.boo │ └── Generators.boo ├── Boo.Lang.Useful.Tests │ └── BooTemplate │ │ └── Globals.boo └── BooCompiler.Tests │ └── SupportingClasses │ ├── Vector3.cs │ ├── Point.cs │ ├── ByteEnum.cs │ └── SByteEnum.cs ├── extras ├── boo.mime ├── boox │ └── resources │ │ ├── boo.ico │ │ └── ClassBrowserIcons │ │ ├── class.png │ │ ├── enum.png │ │ ├── event.png │ │ ├── field.png │ │ ├── method.png │ │ ├── property.png │ │ ├── PrivateEnum.png │ │ ├── interface.png │ │ ├── namespace.png │ │ ├── InternalClass.png │ │ ├── InternalEnum.png │ │ ├── InternalField.png │ │ ├── PrivateClass.png │ │ ├── PrivateField.png │ │ ├── PrivateMethod.png │ │ ├── ProtectedEnum.png │ │ ├── InternalMethod.png │ │ ├── InternalProperty.png │ │ ├── PrivateInterface.png │ │ ├── PrivateProperty.png │ │ ├── ProtectedClass.png │ │ ├── ProtectedField.png │ │ ├── ProtectedMethod.png │ │ ├── InternalInterface.png │ │ ├── ProtectedInterface.png │ │ └── ProtectedProperty.png ├── SharpDevelop │ └── BooBinding │ │ └── icons │ │ ├── Boo.File.Form.png │ │ ├── Boo.FileIcon.png │ │ ├── Boo.Project.Form.png │ │ ├── Boo.ProjectIcon.png │ │ ├── Boo.File.EmptyFile.png │ │ └── Boo.Project.EmptyProject.png └── template.config.in ├── booc ├── booi ├── lib ├── antlr-2.7.5 │ ├── examples │ │ ├── cpp │ │ │ ├── calc │ │ │ │ └── test.in │ │ │ ├── exprAST │ │ │ │ ├── test2.in │ │ │ │ └── test.in │ │ │ ├── parseBinary │ │ │ │ └── data │ │ │ ├── heteroAST │ │ │ │ └── test.in │ │ │ ├── transform │ │ │ │ └── test.in │ │ │ ├── includeFile │ │ │ │ ├── subincl.h │ │ │ │ ├── test.c │ │ │ │ └── incl.h │ │ │ ├── lexRewrite │ │ │ │ └── test.in │ │ │ ├── multiParser │ │ │ │ └── test.in │ │ │ ├── imagNodeAST │ │ │ │ ├── simple.in │ │ │ │ └── test.in │ │ │ ├── treewalk │ │ │ │ ├── simple.in │ │ │ │ └── test.in │ │ │ ├── multiLexer │ │ │ │ ├── CommonTokenTypes.txt │ │ │ │ └── test.in │ │ │ ├── unicode │ │ │ │ └── test.in │ │ │ ├── filterWithRule │ │ │ │ └── t.html │ │ │ ├── preserveWhiteSpace │ │ │ │ └── readme.txt │ │ │ └── ASTsupport │ │ │ │ └── Main.cpp │ │ ├── csharp │ │ │ ├── calc │ │ │ │ ├── test.in │ │ │ │ └── shiplist │ │ │ ├── cpp │ │ │ │ ├── subincl.h │ │ │ │ ├── cpp.in │ │ │ │ └── incl.h │ │ │ ├── exprAST │ │ │ │ ├── test2.in │ │ │ │ ├── test.in │ │ │ │ └── shiplist │ │ │ ├── parseBinary │ │ │ │ ├── data │ │ │ │ ├── shiplist │ │ │ │ └── runtests.bat │ │ │ ├── heteroAST │ │ │ │ ├── test.in │ │ │ │ └── shiplist │ │ │ ├── unicode │ │ │ │ ├── shiplist │ │ │ │ └── test.in │ │ │ ├── IDL │ │ │ │ └── shiplist │ │ │ ├── includeFile │ │ │ │ ├── subincl.h │ │ │ │ ├── shiplist │ │ │ │ ├── test.c │ │ │ │ └── incl.h │ │ │ ├── tinyc │ │ │ │ └── shiplist │ │ │ ├── HTML │ │ │ │ └── shiplist │ │ │ ├── ASTsupport │ │ │ │ ├── shiplist │ │ │ │ ├── t.bat │ │ │ │ ├── MyAST.cs │ │ │ │ └── ASTType49.cs │ │ │ ├── columns │ │ │ │ ├── shiplist │ │ │ │ └── test.in │ │ │ ├── filter │ │ │ │ └── shiplist │ │ │ ├── imagNodeAST │ │ │ │ ├── simple.in │ │ │ │ ├── shiplist │ │ │ │ └── test.in │ │ │ ├── filterWithRule │ │ │ │ ├── shiplist │ │ │ │ └── t.html │ │ │ ├── preserveWhiteSpace │ │ │ │ ├── shiplist │ │ │ │ └── readme.txt │ │ │ ├── inherit.tinyc │ │ │ │ └── shiplist │ │ │ ├── java │ │ │ │ └── shiplist │ │ │ ├── multiLexer │ │ │ │ ├── shiplist │ │ │ │ └── test.in │ │ │ └── csccbug.cs │ │ ├── java │ │ │ ├── calc │ │ │ │ ├── test.in │ │ │ │ └── shiplist │ │ │ ├── parseBinary │ │ │ │ ├── data │ │ │ │ └── shiplist │ │ │ ├── cpp │ │ │ │ ├── subincl.h │ │ │ │ ├── cpp.in │ │ │ │ └── incl.h │ │ │ ├── exprAST │ │ │ │ ├── test2.in │ │ │ │ ├── test.in │ │ │ │ └── shiplist │ │ │ ├── heteroAST │ │ │ │ ├── test.in │ │ │ │ └── shiplist │ │ │ ├── transform │ │ │ │ ├── test.in │ │ │ │ └── shiplist │ │ │ ├── lexRewrite │ │ │ │ ├── test.in │ │ │ │ └── shiplist │ │ │ ├── ASTsupport │ │ │ │ ├── shiplist │ │ │ │ ├── t.bat │ │ │ │ ├── MyAST.java │ │ │ │ └── ASTType49.java │ │ │ ├── columns │ │ │ │ ├── shiplist │ │ │ │ └── test.in │ │ │ ├── includeFile │ │ │ │ ├── subincl.h │ │ │ │ ├── test.c │ │ │ │ ├── incl.h │ │ │ │ └── shiplist │ │ │ ├── unicode │ │ │ │ ├── shiplist │ │ │ │ └── test.in │ │ │ ├── HTML │ │ │ │ └── shiplist │ │ │ ├── IDL │ │ │ │ └── shiplist │ │ │ ├── filter │ │ │ │ ├── shiplist │ │ │ │ └── t.g │ │ │ ├── tinyc │ │ │ │ └── shiplist │ │ │ ├── filterWithRule │ │ │ │ ├── shiplist │ │ │ │ └── t.html │ │ │ ├── imagNodeAST │ │ │ │ ├── simple.in │ │ │ │ ├── shiplist │ │ │ │ └── test.in │ │ │ ├── treewalk │ │ │ │ ├── simple.in │ │ │ │ ├── shiplist │ │ │ │ └── test.in │ │ │ ├── java │ │ │ │ └── shiplist │ │ │ ├── preserveWhiteSpace │ │ │ │ ├── shiplist │ │ │ │ └── readme.txt │ │ │ ├── inherit.tinyc │ │ │ │ └── shiplist │ │ │ ├── linkChecker │ │ │ │ ├── shiplist │ │ │ │ └── LinkListener.java │ │ │ ├── xml │ │ │ │ └── test.xml │ │ │ ├── unicode.IDENTs │ │ │ │ ├── test.in │ │ │ │ └── shiplist │ │ │ ├── pascal │ │ │ │ ├── Function.java │ │ │ │ ├── RecordType.java │ │ │ │ ├── ScalarType.java │ │ │ │ ├── Unit.java │ │ │ │ └── Procedure.java │ │ │ ├── multiLexer │ │ │ │ ├── shiplist │ │ │ │ └── test.in │ │ │ └── tinybasic │ │ │ │ ├── GlobalScope.java │ │ │ │ └── FunctionScope.java │ │ └── python │ │ │ ├── cpp │ │ │ ├── subincl.h │ │ │ ├── cpp.in │ │ │ └── incl.h │ │ │ ├── exprAST │ │ │ ├── expr2.in │ │ │ └── expr.in │ │ │ ├── lexerTester │ │ │ └── test.in │ │ │ ├── heteroAST │ │ │ └── hetero.in │ │ │ ├── parseBinary │ │ │ └── binary.in │ │ │ ├── includeFile │ │ │ ├── subincl.h │ │ │ ├── incfile.in │ │ │ └── incl.h │ │ │ ├── lexRewrite │ │ │ └── rewrite.in │ │ │ ├── transform │ │ │ └── transform.in │ │ │ ├── multiParser │ │ │ └── multiparser.in │ │ │ ├── multiLexer │ │ │ ├── multilex.tok │ │ │ └── multilex.in │ │ │ ├── columns │ │ │ └── columns.in │ │ │ ├── xml │ │ │ └── xml.in │ │ │ ├── treewalk │ │ │ └── treewalk.in │ │ │ ├── imagNodeAST │ │ │ └── imagnode.in │ │ │ ├── unicode │ │ │ └── unicode.in │ │ │ ├── filterWithRule │ │ │ └── rulefilter.in │ │ │ └── unicode.IDENTs │ │ │ └── ident.in │ ├── lib │ │ ├── cpp │ │ │ ├── AUTHORS │ │ │ ├── contrib │ │ │ │ └── bcb4 │ │ │ │ │ └── README │ │ │ └── scripts │ │ │ │ └── cr_stripper.sh │ │ ├── antlr.runtime.dll │ │ ├── antlr.astframe.dll │ │ └── csharp │ │ │ └── ASTFrame │ │ │ └── antlr.astframe.dll │ ├── README.txt │ ├── doc │ │ ├── logo.gif │ │ ├── closure.gif │ │ ├── optional.gif │ │ ├── subrule.gif │ │ ├── j-guru-blue.jpg │ │ ├── jguru-logo.gif │ │ ├── posclosure.gif │ │ ├── hidden.stream.gif │ │ ├── ANTLRException.gif │ │ ├── stream.selector.gif │ │ ├── stream.splitter.gif │ │ ├── stream.perspectives.gif │ │ └── lexer.to.parser.tokens.gif │ ├── antlr-2.7.5.jar │ └── antlr │ │ └── debug │ │ └── NewLineListener.java └── moq-3.1.416.3 │ └── Moq.dll ├── examples ├── BuildingLanguages │ └── UsingCSharp │ │ └── .gitignore ├── asp.net │ └── Math.asmx ├── pipeline │ └── Extensibilidade.sxw └── gac │ └── GacLibrary │ └── GacLibrary.snk ├── il ├── docs └── BooManifesto.sxw ├── il.bat ├── gradle └── wrapper │ └── gradle-wrapper.jar └── .gitignore /version.txt: -------------------------------------------------------------------------------- 1 | 0.9.7 2 | -------------------------------------------------------------------------------- /bin/.gitignore: -------------------------------------------------------------------------------- 1 | *.mdb 2 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = bin extras 2 | -------------------------------------------------------------------------------- /src/.gitattributes: -------------------------------------------------------------------------------- 1 | -whitespace 2 | -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | bin 3 | obj 4 | -------------------------------------------------------------------------------- /extras/boo.mime: -------------------------------------------------------------------------------- 1 | text/x-boo 2 | ext: boo 3 | -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | obj 3 | *.userprefs 4 | -------------------------------------------------------------------------------- /booc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | env mono build/booc.exe "$@" 3 | -------------------------------------------------------------------------------- /booi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | env mono build/booi.exe "$@" 3 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/cpp/calc/test.in: -------------------------------------------------------------------------------- 1 | 3+4*5; 2 | -------------------------------------------------------------------------------- /src/Boo.Lang/Resources/.gitignore: -------------------------------------------------------------------------------- 1 | *.resources 2 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/cpp/exprAST/test2.in: -------------------------------------------------------------------------------- 1 | 3+4 2 | 3 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/cpp/parseBinary/data: -------------------------------------------------------------------------------- 1 | a test -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/calc/test.in: -------------------------------------------------------------------------------- 1 | 3+4*5; 2 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/calc/test.in: -------------------------------------------------------------------------------- 1 | 3+4*5; 2 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/parseBinary/data: -------------------------------------------------------------------------------- 1 | a test -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/cpp/heteroAST/test.in: -------------------------------------------------------------------------------- 1 | 3+4*5+21; 2 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/cpp/transform/test.in: -------------------------------------------------------------------------------- 1 | 0+3+0*5+0; 2 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/cpp/subincl.h: -------------------------------------------------------------------------------- 1 | int z; 2 | 3 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/exprAST/test2.in: -------------------------------------------------------------------------------- 1 | 3+4 2 | 3 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/parseBinary/data: -------------------------------------------------------------------------------- 1 | a test -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/cpp/subincl.h: -------------------------------------------------------------------------------- 1 | int z; 2 | 3 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/exprAST/test2.in: -------------------------------------------------------------------------------- 1 | 3+4 2 | 3 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/heteroAST/test.in: -------------------------------------------------------------------------------- 1 | 3+4*5+21; 2 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/transform/test.in: -------------------------------------------------------------------------------- 1 | 0+3+0*5+0; 2 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/python/cpp/subincl.h: -------------------------------------------------------------------------------- 1 | int z; 2 | 3 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/python/exprAST/expr2.in: -------------------------------------------------------------------------------- 1 | 3+*5 2 | 3 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/python/lexerTester/test.in: -------------------------------------------------------------------------------- 1 | AAA 2 | -------------------------------------------------------------------------------- /examples/BuildingLanguages/UsingCSharp/.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | obj 3 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/cpp/includeFile/subincl.h: -------------------------------------------------------------------------------- 1 | int z; 2 | 3 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/cpp/lexRewrite/test.in: -------------------------------------------------------------------------------- 1 | abc := ( 34 ) 2 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/cpp/multiParser/test.in: -------------------------------------------------------------------------------- 1 | A B C C B A 2 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/heteroAST/test.in: -------------------------------------------------------------------------------- 1 | 3+4*5+21; 2 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/lexRewrite/test.in: -------------------------------------------------------------------------------- 1 | abc := ( 34 ) 2 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/python/heteroAST/hetero.in: -------------------------------------------------------------------------------- 1 | 3+4*5+21; 2 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/python/parseBinary/binary.in: -------------------------------------------------------------------------------- 1 | a test -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/ASTsupport/shiplist: -------------------------------------------------------------------------------- 1 | t.bat 2 | test.g 3 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/columns/shiplist: -------------------------------------------------------------------------------- 1 | track.g 2 | test.in 3 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/includeFile/subincl.h: -------------------------------------------------------------------------------- 1 | int z; 2 | 3 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/unicode/shiplist: -------------------------------------------------------------------------------- 1 | unicode.g 2 | test.in 3 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/python/includeFile/subincl.h: -------------------------------------------------------------------------------- 1 | int z; 2 | 3 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/python/lexRewrite/rewrite.in: -------------------------------------------------------------------------------- 1 | abc := ( 34 ) 2 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/python/transform/transform.in: -------------------------------------------------------------------------------- 1 | 0+3+0*5+0; 2 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/cpp/exprAST/test.in: -------------------------------------------------------------------------------- 1 | 4 / (5+6) *f(x,y,z,1+2) 2 | 3 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/unicode/shiplist: -------------------------------------------------------------------------------- 1 | unicode.g 2 | test.in 3 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/python/multiParser/multiparser.in: -------------------------------------------------------------------------------- 1 | A B C C B A 2 | -------------------------------------------------------------------------------- /tests/testcases/compilation/1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | ok 3 | """ 4 | print "ok" 5 | -------------------------------------------------------------------------------- /tests/testcases/parser/for_stmt_1.boo: -------------------------------------------------------------------------------- 1 | for i in [1, 2, 3]: 2 | print(i) 3 | -------------------------------------------------------------------------------- /bin/booc.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/bin/booc.exe -------------------------------------------------------------------------------- /bin/booi.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/bin/booi.exe -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/cpp/imagNodeAST/simple.in: -------------------------------------------------------------------------------- 1 | { 2 | i = 3+4; 3 | } 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/cpp/treewalk/simple.in: -------------------------------------------------------------------------------- 1 | { 2 | i = 3+4; 3 | } 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/IDL/shiplist: -------------------------------------------------------------------------------- 1 | idl.g 2 | test.idl 3 | Main.java 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/exprAST/test.in: -------------------------------------------------------------------------------- 1 | 4 / (5+6) *f(x,y,z,1+2) 2 | 3 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/includeFile/subincl.h: -------------------------------------------------------------------------------- 1 | int z; 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/tinyc/shiplist: -------------------------------------------------------------------------------- 1 | input.c 2 | lexer.g 3 | tinyc.g 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/HTML/shiplist: -------------------------------------------------------------------------------- 1 | html.g 2 | Main.java 3 | test.html 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/IDL/shiplist: -------------------------------------------------------------------------------- 1 | idl.g 2 | test.idl 3 | Main.java 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/calc/shiplist: -------------------------------------------------------------------------------- 1 | calc.g 2 | Calc.java 3 | test.in 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/exprAST/test.in: -------------------------------------------------------------------------------- 1 | 4 / (5+6) *f(x,y,z,1+2) 2 | 3 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/filter/shiplist: -------------------------------------------------------------------------------- 1 | Test.java 2 | t.g 3 | test.html 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/tinyc/shiplist: -------------------------------------------------------------------------------- 1 | input.c 2 | lexer.g 3 | tinyc.g 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/python/exprAST/expr.in: -------------------------------------------------------------------------------- 1 | 4 / (5+6) *f(x,y,z,1+2) 2 | 3 | -------------------------------------------------------------------------------- /src/boo.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/src/boo.snk -------------------------------------------------------------------------------- /tests/testcases/compilation/math.boo: -------------------------------------------------------------------------------- 1 | def square(a as int): 2 | return a*a 3 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/null-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = null 3 | """ 4 | a = null 5 | -------------------------------------------------------------------------------- /bin/booish.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/bin/booish.exe -------------------------------------------------------------------------------- /il: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | mono build/booc.exe -out:build/il.exe "$@" && monodis build/il.exe 3 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/HTML/shiplist: -------------------------------------------------------------------------------- 1 | html.g 2 | Main.java 3 | test.html 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/cpp/cpp.in: -------------------------------------------------------------------------------- 1 | int a,b; 2 | #include "incl.h" 3 | int c; 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/filterWithRule/shiplist: -------------------------------------------------------------------------------- 1 | t.g 2 | t.html 3 | Test.java 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/imagNodeAST/simple.in: -------------------------------------------------------------------------------- 1 | { 2 | i = 3+4; 3 | } 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/transform/shiplist: -------------------------------------------------------------------------------- 1 | calc.g 2 | Calc.java 3 | test.in 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/treewalk/simple.in: -------------------------------------------------------------------------------- 1 | { 2 | i = 3+4; 3 | } 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/lib/cpp/AUTHORS: -------------------------------------------------------------------------------- 1 | Author: 2 | Peter Wells 3 | -------------------------------------------------------------------------------- /tests/test.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/tests/test.snk -------------------------------------------------------------------------------- /tests/testcases/parser/re_literal_2.boo: -------------------------------------------------------------------------------- 1 | s = "\"Bamboo\"\n" 2 | re = /foo\(bar\)/ 3 | -------------------------------------------------------------------------------- /tests/testcases/parser/re_literal_3.boo: -------------------------------------------------------------------------------- 1 | re = @/\x2f\u002f/ 2 | s = "${/\x2f\u002f/}" 3 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/null-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = null 3 | """ 4 | a = null 5 | -------------------------------------------------------------------------------- /bin/Boo.Lang.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/bin/Boo.Lang.dll -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/ASTsupport/shiplist: -------------------------------------------------------------------------------- 1 | ASTSupport.build 2 | t.bat 3 | test.g 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/columns/shiplist: -------------------------------------------------------------------------------- 1 | columns.build 2 | track.g 3 | test.in 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/cpp/cpp.in: -------------------------------------------------------------------------------- 1 | int a,b; 2 | #include "incl.h" 3 | int c; 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/lexRewrite/shiplist: -------------------------------------------------------------------------------- 1 | Main.java 2 | rewrite.g 3 | test.in 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/python/cpp/cpp.in: -------------------------------------------------------------------------------- 1 | int a,b; 2 | #include "incl.h" 3 | int c; 4 | -------------------------------------------------------------------------------- /src/booc/App.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/src/booc/App.ico -------------------------------------------------------------------------------- /tests/BooModules/Math.boo: -------------------------------------------------------------------------------- 1 | def sqrt(value as double): 2 | return System.Math.Sqrt(value) 3 | -------------------------------------------------------------------------------- /tests/testcases/integration/modules/peek.a.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BOO! 3 | """ 4 | print 'BOO!' 5 | -------------------------------------------------------------------------------- /tests/testcases/parser/unpack_stmt_1.boo: -------------------------------------------------------------------------------- 1 | arg0, arg1 = Environment.GetCommandLineArgs() 2 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/cast-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = (b cast c) 3 | """ 4 | a = b cast c 5 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/char-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | print char('a') 3 | """ 4 | print char('a') 5 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/cpp/includeFile/test.c: -------------------------------------------------------------------------------- 1 | int a,b; 2 | #include "incl.h" 3 | int c; 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/calc/shiplist: -------------------------------------------------------------------------------- 1 | calc.build 2 | calc.g 3 | Calc.cs 4 | test.in 5 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/cpp/incl.h: -------------------------------------------------------------------------------- 1 | 2 | int x; 3 | #include "subincl.h" 4 | int y; 5 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/filter/shiplist: -------------------------------------------------------------------------------- 1 | filter.build 2 | Test.cs 3 | t.g 4 | test.html 5 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/cpp/incl.h: -------------------------------------------------------------------------------- 1 | 2 | int x; 3 | #include "subincl.h" 4 | int y; 5 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/exprAST/shiplist: -------------------------------------------------------------------------------- 1 | expr.g 2 | Main.java 3 | test.in 4 | test2.in 5 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/includeFile/test.c: -------------------------------------------------------------------------------- 1 | int a,b; 2 | #include "incl.h" 3 | int c; 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/python/cpp/incl.h: -------------------------------------------------------------------------------- 1 | 2 | int x; 3 | #include "subincl.h" 4 | int y; 5 | -------------------------------------------------------------------------------- /tests/testcases/integration/arrays/arrays-11.boo: -------------------------------------------------------------------------------- 1 | a as (object) = null 2 | assert a is null 3 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/cast-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = (b cast c) 3 | """ 4 | a = b cast c 5 | -------------------------------------------------------------------------------- /bin/Boo.NAnt.Tasks.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/bin/Boo.NAnt.Tasks.dll -------------------------------------------------------------------------------- /docs/BooManifesto.sxw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/docs/BooManifesto.sxw -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/cpp/includeFile/incl.h: -------------------------------------------------------------------------------- 1 | 2 | int x; 3 | #include "subincl.h" 4 | int y; 5 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/imagNodeAST/simple.in: -------------------------------------------------------------------------------- 1 | { 2 | 3 | i = 3+4; 4 | 5 | } 6 | 7 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/parseBinary/shiplist: -------------------------------------------------------------------------------- 1 | data 2 | data.g 3 | Main.java 4 | MkData.java 5 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/parseBinary/shiplist: -------------------------------------------------------------------------------- 1 | data 2 | data.g 3 | Main.java 4 | MkData.java 5 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/treewalk/shiplist: -------------------------------------------------------------------------------- 1 | Main.java 2 | simple.in 3 | test.in 4 | treewalk.g 5 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/python/includeFile/incfile.in: -------------------------------------------------------------------------------- 1 | int a,b; 2 | #include "incl.h" 3 | int c; 4 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/unpack-10.boo: -------------------------------------------------------------------------------- 1 | a = 3, 2, 1 2 | b, = a 3 | assert 3 == b 4 | -------------------------------------------------------------------------------- /tests/testcases/parser/re_literal_1.boo: -------------------------------------------------------------------------------- 1 | s = prompt("> ") 2 | print("It's a match!") if s =~ /foo/ 3 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/char-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | print char('a') 3 | """ 4 | print char('a') 5 | -------------------------------------------------------------------------------- /tests/testcases/parser/simple.boo: -------------------------------------------------------------------------------- 1 | """ 2 | module doc string 3 | """ 4 | namespace Empty 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/yield_stmt_1.boo: -------------------------------------------------------------------------------- 1 | def odds(l): 2 | for i in l: 3 | yield i if 0 != i % 2 4 | -------------------------------------------------------------------------------- /bin/Boo.Lang.CodeDom.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/bin/Boo.Lang.CodeDom.dll -------------------------------------------------------------------------------- /bin/Boo.Lang.Compiler.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/bin/Boo.Lang.Compiler.dll -------------------------------------------------------------------------------- /bin/Boo.Lang.Parser.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/bin/Boo.Lang.Parser.dll -------------------------------------------------------------------------------- /bin/Boo.Lang.Useful.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/bin/Boo.Lang.Useful.dll -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/imagNodeAST/shiplist: -------------------------------------------------------------------------------- 1 | Main.cs 2 | simple.in 3 | test.in 4 | treewalk.g 5 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/includeFile/shiplist: -------------------------------------------------------------------------------- 1 | Main.cs 2 | P.g 3 | test.c 4 | incl.h 5 | subincl.h 6 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/imagNodeAST/shiplist: -------------------------------------------------------------------------------- 1 | Main.java 2 | simple.in 3 | test.in 4 | treewalk.g 5 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/includeFile/incl.h: -------------------------------------------------------------------------------- 1 | 2 | int x; 3 | #include "subincl.h" 4 | int y; 5 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/includeFile/shiplist: -------------------------------------------------------------------------------- 1 | Main.java 2 | P.g 3 | test.c 4 | incl.h 5 | subincl.h 6 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/python/includeFile/incl.h: -------------------------------------------------------------------------------- 1 | 2 | int x; 3 | #include "subincl.h" 4 | int y; 5 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/python/multiLexer/multilex.tok: -------------------------------------------------------------------------------- 1 | Common 2 | JAVADOC_OPEN=4 3 | JAVADOC_CLOSE=5 4 | -------------------------------------------------------------------------------- /lib/moq-3.1.416.3/Moq.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/moq-3.1.416.3/Moq.dll -------------------------------------------------------------------------------- /tests/testcases/compilation/redefine_builtin.boo: -------------------------------------------------------------------------------- 1 | """ 2 | zip 3 | """ 4 | zip = "zip" 5 | print(zip) 6 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-705-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 32 3 | """ 4 | v as uint = 1 5 | v = v << 5 6 | print v 7 | -------------------------------------------------------------------------------- /bin/Boo.Lang.Extensions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/bin/Boo.Lang.Extensions.dll -------------------------------------------------------------------------------- /lib/antlr-2.7.5/README.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/README.txt -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/cpp/multiLexer/CommonTokenTypes.txt: -------------------------------------------------------------------------------- 1 | Common 2 | JAVADOC_OPEN=4 3 | JAVADOC_CLOSE=5 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/columns/test.in: -------------------------------------------------------------------------------- 1 | 123456789012345678901234567890 2 | a one two three 3 | 34 z 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/filterWithRule/shiplist: -------------------------------------------------------------------------------- 1 | filterWithRule.build 2 | t.g 3 | t.html 4 | Test.cs 5 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/includeFile/test.c: -------------------------------------------------------------------------------- 1 | int a,b; 2 | 3 | #include "incl.h" 4 | 5 | int c; 6 | 7 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/parseBinary/runtests.bat: -------------------------------------------------------------------------------- 1 | nant 2 | @bin\MkData.exe 3 | bin\parseBinary.exe 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/columns/test.in: -------------------------------------------------------------------------------- 1 | 123456789012345678901234567890 2 | a one two three 3 | 34 z 4 | -------------------------------------------------------------------------------- /tests/BooModules/SunShip.boo: -------------------------------------------------------------------------------- 1 | namespace SunShip 2 | 3 | def Ascent(): 4 | return "10:10" 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/closures-6.boo: -------------------------------------------------------------------------------- 1 | """ 2 | c = { print('Hello!') } 3 | """ 4 | c = { print('Hello!') } 5 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-935-1.boo: -------------------------------------------------------------------------------- 1 | class Z[of T(A)](): 2 | pass 3 | class A: 4 | pass 5 | Z[of A]() 6 | -------------------------------------------------------------------------------- /tests/testcases/stdlib/list-equals-1.boo: -------------------------------------------------------------------------------- 1 | a = [(1, 2), (3, 4)] 2 | b = [(1, 2), (3, 4)] 3 | 4 | assert a == b 5 | -------------------------------------------------------------------------------- /bin/Boo.Lang.Interpreter.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/bin/Boo.Lang.Interpreter.dll -------------------------------------------------------------------------------- /extras/boox/resources/boo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/boo.ico -------------------------------------------------------------------------------- /il.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | build\booc.exe -out:build\il.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 3 | ildasm /text build\il.exe 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/doc/logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/doc/logo.gif -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/ASTsupport/t.bat: -------------------------------------------------------------------------------- 1 | java antlr.Tool test.g 2 | javac *.java 3 | java SupportTest 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/exprAST/shiplist: -------------------------------------------------------------------------------- 1 | exprAST.build 2 | expr.g 3 | Main.cs 4 | test.in 5 | test2.in 6 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/preserveWhiteSpace/shiplist: -------------------------------------------------------------------------------- 1 | InstrMain.java 2 | instr.g 3 | readme.txt 4 | test.in 5 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/ASTsupport/t.bat: -------------------------------------------------------------------------------- 1 | java antlr.Tool test.g 2 | javac *.java 3 | java SupportTest 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/java/shiplist: -------------------------------------------------------------------------------- 1 | java.g 2 | java.tree.g 3 | Main.java 4 | tests/E.java 5 | tests/T.java 6 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/preserveWhiteSpace/shiplist: -------------------------------------------------------------------------------- 1 | InstrMain.java 2 | instr.g 3 | readme.txt 4 | test.in 5 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/python/columns/columns.in: -------------------------------------------------------------------------------- 1 | 123456789012345678901234567890 2 | a one two three 3 | 34 z 4 | -------------------------------------------------------------------------------- /tests/testcases/integration/callables/callables-37.boo: -------------------------------------------------------------------------------- 1 | 2 | 3 | assert Boo.Lang.ICallable is typeof(callable) 4 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/expressions-5.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = (b = (c = (d = 0))) 3 | """ 4 | a = b = c = d = 0 5 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/expressions-5.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = (b = (c = (d = 0))) 3 | """ 4 | a = (b = (c = (d = 0))) 5 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-178-2.boo: -------------------------------------------------------------------------------- 1 | import System 2 | 3 | assert "Friday" == DayOfWeek.Friday.ToString() 4 | -------------------------------------------------------------------------------- /bin/Boo.Lang.PatternMatching.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/bin/Boo.Lang.PatternMatching.dll -------------------------------------------------------------------------------- /lib/antlr-2.7.5/antlr-2.7.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/antlr-2.7.5.jar -------------------------------------------------------------------------------- /lib/antlr-2.7.5/doc/closure.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/doc/closure.gif -------------------------------------------------------------------------------- /lib/antlr-2.7.5/doc/optional.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/doc/optional.gif -------------------------------------------------------------------------------- /lib/antlr-2.7.5/doc/subrule.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/doc/subrule.gif -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/includeFile/incl.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | int x; 4 | 5 | #include "subincl.h" 6 | 7 | int y; 8 | 9 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/inherit.tinyc/shiplist: -------------------------------------------------------------------------------- 1 | input.c 2 | Main.cs 3 | runtest.bat 4 | runtest.sh 5 | subc.g 6 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/inherit.tinyc/shiplist: -------------------------------------------------------------------------------- 1 | input.c 2 | Main.java 3 | runtest.bat 4 | runtest.sh 5 | subc.g 6 | -------------------------------------------------------------------------------- /tests/testcases/compilation/re0.boo: -------------------------------------------------------------------------------- 1 | """ 2 | System.Text.RegularExpressions.Regex 3 | """ 4 | print(/foo/.GetType()) 5 | -------------------------------------------------------------------------------- /tests/testcases/integration/primitives/hex-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0xABBA: 43962 3 | """ 4 | print("0xABBA: ${0xABBA}") 5 | 6 | -------------------------------------------------------------------------------- /tests/testcases/integration/primitives/typeof-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | System.Object[] 3 | """ 4 | print(typeof((object))) 5 | -------------------------------------------------------------------------------- /tests/testcases/integration/primitives/uint-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 2147483648 3 | """ 4 | ui as uint = 2147483648 5 | print ui 6 | -------------------------------------------------------------------------------- /tests/testcases/integration/primitives/ulong-bitshift.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 2 3 | """ 4 | x as ulong = 1 5 | x <<= 1 6 | print x 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/closures-6.boo: -------------------------------------------------------------------------------- 1 | """ 2 | c = { print('Hello!') } 3 | """ 4 | c = { print("Hello!") } 5 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/fields-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | class Foo: 3 | 4 | bar 5 | """ 6 | class Foo: 7 | 8 | bar 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/declarations-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | i as int = 3 3 | j as int 4 | """ 5 | i as int = 3 6 | j as int 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/long-literals-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | l = -9223372036854775808L 3 | """ 4 | l = -9223372036854775808L 5 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-1069-1.boo: -------------------------------------------------------------------------------- 1 | test = 5 2 | test %= 3 3 | assert test == 2 4 | test %= 2 5 | assert test == 0 -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-935-2.boo: -------------------------------------------------------------------------------- 1 | class A: 2 | pass 3 | class B[of T(constructor)]: 4 | pass 5 | x as B[of A] 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /lib/antlr-2.7.5/doc/j-guru-blue.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/doc/j-guru-blue.jpg -------------------------------------------------------------------------------- /lib/antlr-2.7.5/doc/jguru-logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/doc/jguru-logo.gif -------------------------------------------------------------------------------- /lib/antlr-2.7.5/doc/posclosure.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/doc/posclosure.gif -------------------------------------------------------------------------------- /tests/testcases/compilation/multifile3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 9 3 | """ 4 | namespace MultiFileTest 5 | 6 | print(square(3)) 7 | -------------------------------------------------------------------------------- /tests/testcases/compilation/pow0.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 8 3 | 256 4 | """ 5 | print(2**3) 6 | print(2**2**3) # 2**8 and not 4**3 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/modules/modules-2.boo: -------------------------------------------------------------------------------- 1 | import SunShip from BooModules 2 | 3 | 4 | assert "10:10" == Ascent() 5 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/declarations-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | i as int = 3 3 | j as int 4 | """ 5 | i as int = 3 6 | j as int 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/long-literals-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | l = -9223372036854775808L 3 | """ 4 | l = -9223372036854775808L 5 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/splicing-class-body.boo: -------------------------------------------------------------------------------- 1 | """ 2 | class E: 3 | 4 | \$(body) 5 | """ 6 | class E: 7 | $body 8 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/splicing-enum-body.boo: -------------------------------------------------------------------------------- 1 | """ 2 | enum E: 3 | 4 | \$(body) 5 | """ 6 | enum E: 7 | $body 8 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/at-operator.boo: -------------------------------------------------------------------------------- 1 | """ 2 | @() 3 | @(1) 4 | @(1, 2) 5 | """ 6 | @() 7 | @(1) 8 | @(1, 2) 9 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-178-1.boo: -------------------------------------------------------------------------------- 1 | enum Test: 2 | A 3 | B 4 | C 5 | 6 | a = Test.A 7 | assert "A" == a.ToString() 8 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-308-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 1 2 4 3 | """ 4 | a as duck = [1, 2, 3] 5 | a[-1] = 4 6 | print join(a) 7 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-308-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 1 2 4 3 | """ 4 | a as duck = (1, 2, 3) 5 | a[-1] = 4 6 | print join(a) 7 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-860-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Foo.Bar 3 | """ 4 | enum Foo: 5 | Bar 6 | 7 | print("Foo." + Foo.Bar) 8 | -------------------------------------------------------------------------------- /tests/testcases/stdlib/list-indexof-1.boo: -------------------------------------------------------------------------------- 1 | a = [5, 4, 3, 2, 1] 2 | for i in range(len(a)): 3 | assert i == a.IndexOf(5-i) 4 | -------------------------------------------------------------------------------- /examples/asp.net/Math.asmx: -------------------------------------------------------------------------------- 1 | <%@WebService Class="MathService" Language="C#" %> 2 | public class MathService : Math 3 | { 4 | } 5 | -------------------------------------------------------------------------------- /examples/pipeline/Extensibilidade.sxw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/examples/pipeline/Extensibilidade.sxw -------------------------------------------------------------------------------- /lib/antlr-2.7.5/doc/hidden.stream.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/doc/hidden.stream.gif -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/linkChecker/shiplist: -------------------------------------------------------------------------------- 1 | links.g 2 | Main.java 3 | test.html 4 | LinkChecker.java 5 | LinkListener.java 6 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/lib/antlr.runtime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/lib/antlr.runtime.dll -------------------------------------------------------------------------------- /tests/testcases/compilation/match0.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Matches 3 | 4 | """ 5 | print("Matches") if "Bamboo" =~ "^Bamboo$" 6 | 7 | -------------------------------------------------------------------------------- /tests/testcases/compilation/mathwithns.boo: -------------------------------------------------------------------------------- 1 | namespace MultiFileTest 2 | 3 | def square(value as int): 4 | return value*value 5 | -------------------------------------------------------------------------------- /tests/testcases/compilation/multifile2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 1 3 | 4 4 | 9 5 | """ 6 | for i in range(1, 4): 7 | print(square(i)) 8 | -------------------------------------------------------------------------------- /tests/testcases/compilation/stringmultiply0.boo: -------------------------------------------------------------------------------- 1 | """ 2 | foofoofoo 3 | barbar 4 | """ 5 | print(3*'foo') 6 | print('bar'*2) 7 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0095-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0095-1.boo(4,6): BCE0095: No such label 'label'. 3 | """ 4 | goto label 5 | 6 | -------------------------------------------------------------------------------- /tests/testcases/integration/operators/shift-1.boo: -------------------------------------------------------------------------------- 1 | a = 3 2 | a <<= 2 3 | assert 12 == a 4 | 5 | a >>= 1 6 | assert 6 == a 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/unpack-1.boo: -------------------------------------------------------------------------------- 1 | a, b = 1, 2 2 | assert 1 == a 3 | assert 2 == b 4 | assert 3 == (a + b) 5 | -------------------------------------------------------------------------------- /tests/testcases/parser/simple_classes.boo: -------------------------------------------------------------------------------- 1 | namespace Foo.Bar 2 | 3 | class Customer: 4 | pass 5 | 6 | class Person: 7 | pass 8 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/goto-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | goto start if (i < 3) 3 | goto end_ 4 | """ 5 | goto start if (i < 3) 6 | goto end_ 7 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-1047.boo: -------------------------------------------------------------------------------- 1 | import System.Threading.Interlocked 2 | 3 | x as int = 10 4 | CompareExchange(x, 5, 5) 5 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-714-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 1 3 | 3 4 | """ 5 | a = 1 6 | b = 5 7 | for i in range(a, b, 2): 8 | print i 9 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-799-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 1 2 3 | 0 1 2 4 | """ 5 | e = range(3) 6 | print join(e) 7 | print join(e) 8 | -------------------------------------------------------------------------------- /examples/gac/GacLibrary/GacLibrary.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/examples/gac/GacLibrary/GacLibrary.snk -------------------------------------------------------------------------------- /lib/antlr-2.7.5/doc/ANTLRException.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/doc/ANTLRException.gif -------------------------------------------------------------------------------- /lib/antlr-2.7.5/doc/stream.selector.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/doc/stream.selector.gif -------------------------------------------------------------------------------- /lib/antlr-2.7.5/doc/stream.splitter.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/doc/stream.splitter.gif -------------------------------------------------------------------------------- /lib/antlr-2.7.5/lib/antlr.astframe.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/lib/antlr.astframe.dll -------------------------------------------------------------------------------- /tests/BooModules/Generators.boo: -------------------------------------------------------------------------------- 1 | namespace Generators 2 | 3 | def oddNumbers(end as int): 4 | return i for i in range(end) if i % 2 5 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0125-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0125-1.boo(4,6): BCE0125: Invalid declaration type 'void'. 3 | """ 4 | i as void 5 | -------------------------------------------------------------------------------- /tests/testcases/integration/arrays/arrays-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 1, 2, 3 3 | 4 | """ 5 | a, b, c = 1, 2, 3 6 | print("${a}, ${b}, ${c}") 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/arrays/arrays-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 1, 2, 3 3 | 4 | """ 5 | print(string.Format("{0}, {1}, {2}", "1", 2, 3)) 6 | -------------------------------------------------------------------------------- /tests/testcases/integration/arrays/arrays-9.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 3 | """ 4 | def foo(): 5 | return (,) 6 | 7 | print(len(foo())) 8 | -------------------------------------------------------------------------------- /tests/testcases/integration/modules/modules-6.boo: -------------------------------------------------------------------------------- 1 | """ 2 | it works 3 | """ 4 | def Main(argv as (string)): 5 | print "it works" 6 | -------------------------------------------------------------------------------- /tests/testcases/integration/primitives/list-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 3 | """ 4 | def foo(): 5 | return [] 6 | 7 | print(len(foo())) 8 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/unpack-4.boo: -------------------------------------------------------------------------------- 1 | a = 1 2 | b = 2 3 | 4 | a, b = b, a 5 | assert 1 == b 6 | assert 2 == a 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/unpack-5.boo: -------------------------------------------------------------------------------- 1 | a, b = range(1, 4) 2 | assert 1 == a 3 | assert 2 == b 4 | assert 3 == (a + b) 5 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/at-operator.boo: -------------------------------------------------------------------------------- 1 | """ 2 | @() 3 | @(1) 4 | @(1, 2) 5 | """ 6 | @() 7 | @(1) 8 | @(1, 2) 9 | 10 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/comments-4.boo: -------------------------------------------------------------------------------- 1 | """ 2 | namespace CPlusPlusStyleComments 3 | """ 4 | namespace CPlusPlusStyleComments 5 | 6 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/fields-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | class Foo: 3 | 4 | bar 5 | """ 6 | class Foo: 7 | 8 | bar 9 | end 10 | 11 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/generic-method-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | def Method[of T](): 3 | pass 4 | """ 5 | def Method[of T](): 6 | end 7 | 8 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/ASTsupport/MyAST.java: -------------------------------------------------------------------------------- 1 | /** Test homogeneous class */ 2 | public class MyAST extends antlr.CommonAST { 3 | } 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/xml/test.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/examples/java/xml/test.xml -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/python/xml/xml.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/examples/python/xml/xml.in -------------------------------------------------------------------------------- /lib/antlr-2.7.5/lib/cpp/contrib/bcb4/README: -------------------------------------------------------------------------------- 1 | Project files for Borland C++Builder 4.0 to build antlr.lib 2 | 3 | Donated by Ross Bencina 4 | -------------------------------------------------------------------------------- /tests/testcases/compilation/null0.boo: -------------------------------------------------------------------------------- 1 | """ 2 | True 3 | """ 4 | class Foo: 5 | pass 6 | 7 | f as Foo = null 8 | print(f is null) 9 | -------------------------------------------------------------------------------- /tests/testcases/integration/arrays/arrays-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 1 3 | 2 4 | 3 5 | 6 | """ 7 | for i in (1, 2, 3): 8 | print(i.ToString()) 9 | -------------------------------------------------------------------------------- /tests/testcases/integration/operators/cast-9.boo: -------------------------------------------------------------------------------- 1 | // explicit conversion operators 2 | a = System.Decimal(8) 3 | assert 8 == cast(int, a) 4 | -------------------------------------------------------------------------------- /tests/testcases/integration/operators/slicing-13.boo: -------------------------------------------------------------------------------- 1 | 2 | a = "12345" 3 | 4 | assert "123" == a[-10:3] 5 | assert "345" == a[-3:10] 6 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/fields-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | class Foo: 3 | 4 | bar = (1, 2, 3) 5 | """ 6 | class Foo: 7 | 8 | bar = 1, 2, 3 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/fields-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | class Foo: 3 | 4 | bar as string 5 | """ 6 | class Foo: 7 | 8 | bar as string 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/generic-method-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | def Method[of T](): 3 | pass 4 | """ 5 | 6 | def Method[of T](): 7 | pass 8 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/arrays-4.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = (1, 2, 3) 3 | b = ((1, 2), (3, 4)) 4 | """ 5 | a = (1, 2, 3) 6 | b = ((1, 2), (3, 4)) 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/double-literals-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = 3.0 3 | b = 0.0 4 | c = 0.145 5 | """ 6 | a = 3.0 7 | b = 0.0 8 | c = 0.145 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/list-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | l = [1, 2, 3] 3 | l = [(1, 2), (3, 4)] 4 | """ 5 | l = [1, 2, 3] 6 | l = [(1, 2), (3, 4)] 7 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-90-1.boo: -------------------------------------------------------------------------------- 1 | 2 | 3 | class MyHash(Hash): 4 | pass 5 | 6 | h = MyHash() 7 | h[3] = 4 8 | assert 4 == h[3] 9 | -------------------------------------------------------------------------------- /tests/testcases/warnings/BCW0006-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | """ 3 | struct Foo: 4 | value as int 5 | 6 | foos = array(Foo, 3) 7 | foos[1].value += 2 8 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/doc/stream.perspectives.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/doc/stream.perspectives.gif -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/cpp/imagNodeAST/test.in: -------------------------------------------------------------------------------- 1 | { 2 | i = 3; 3 | if ( 6 ) j = 7; else j = 8; 4 | while ( 9 ) { 5 | k = j; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/cpp/treewalk/test.in: -------------------------------------------------------------------------------- 1 | { 2 | i = 3+4*5; 3 | if ( 6 ) j = 7; else j = 8; 4 | while ( 9 ) { 5 | k = 1; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/cpp/unicode/test.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/examples/cpp/unicode/test.in -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/java/shiplist: -------------------------------------------------------------------------------- 1 | java.build 2 | JavaParser.csproj 3 | java.g 4 | java.tree.g 5 | Main.cs 6 | Main.java 7 | T.java 8 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/unicode/test.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/examples/java/unicode/test.in -------------------------------------------------------------------------------- /tests/testcases/compilation/UsingNestedType.boo: -------------------------------------------------------------------------------- 1 | """ 2 | ApplicationData 3 | """ 4 | print(System.Environment.SpecialFolder.ApplicationData) 5 | -------------------------------------------------------------------------------- /tests/testcases/compilation/timespan0.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 02:00:00 3 | 00:01:06 4 | 00:54:00 5 | """ 6 | print(2h) 7 | print(66s) 8 | print(.9h) 9 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0022-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0022-1.boo(4,12): BCE0022: Cannot convert 'string' to 'int'. 3 | """ 4 | i as int = "foo" 5 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0038-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0038-1.boo(5,5): BCE0038: 'Foo' is not a valid macro. 3 | """ 4 | class Foo: 5 | Foo 6 | 7 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0124-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0124-1.boo(5,10): BCE0124: Invalid field type 'void'. 3 | """ 4 | class Foo: 5 | i as void 6 | -------------------------------------------------------------------------------- /tests/testcases/integration/closures/nested-functions-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 42 3 | """ 4 | a = 41 5 | def foo(): 6 | ++a 7 | foo() 8 | print a 9 | -------------------------------------------------------------------------------- /tests/testcases/integration/generators/generators-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 4 8 12 16 3 | """ 4 | print(join(i*2 for i in range(10) if 0 == i % 2)) 5 | -------------------------------------------------------------------------------- /tests/testcases/integration/generators/list-generators-4.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0, 1, 2 3 | """ 4 | print(join([("${i}" for i in range(3))], ", ")) 5 | -------------------------------------------------------------------------------- /tests/testcases/integration/modules/dotted.module.name.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Dotted_module_nameModule 3 | """ 4 | print typeof(Dotted_module_nameModule) 5 | -------------------------------------------------------------------------------- /tests/testcases/integration/modules/import-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Hello, world! 3 | """ 4 | import System 5 | 6 | Console.Write("Hello, world!") 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/modules/import-5.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Hello, S! 3 | """ 4 | import System as S 5 | 6 | S.Console.Write("Hello, S!") 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/primitives/long-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 9223372036854775807 3 | """ 4 | d as long 5 | d=9223372036854775807 6 | print d 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/for-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 1 3 | 2 4 | """ 5 | 6 | for item in List().Add("1").Add("2"): 7 | print(item) 8 | -------------------------------------------------------------------------------- /tests/testcases/net2/generics/mixedbase.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/tests/testcases/net2/generics/mixedbase.dll -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/closures-19.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a, b = (1, 1) 3 | c = { a, b = (b, a) } 4 | """ 5 | a, b = 1, 1 6 | c = { a, b = b, a } 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/double-literals-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = 3.0 3 | b = 0.0 4 | c = 0.145 5 | """ 6 | a = 3.0 7 | b = .0 8 | c = 0.145 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/goto-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | goto start if (i < 3) 3 | goto finish 4 | """ 5 | goto start if i < 3 6 | goto finish 7 | 8 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/closures-19.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a, b = (1, 1) 3 | c = { a, b = (b, a) } 4 | """ 5 | a, b = (1, 1) 6 | c = { a, b = (b, a) } 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/generic-method-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | def Method[of T1, T2](): 3 | pass 4 | """ 5 | def Method[of T1, T2](): 6 | end 7 | 8 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/generic-method-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | def Method[of T](t as T): 3 | pass 4 | """ 5 | def Method[of T](t as T): 6 | end 7 | 8 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-1070-1.boo: -------------------------------------------------------------------------------- 1 | test as duck 2 | test = 5 3 | assert test << 1 == 10 4 | assert test >> 1 == 2 5 | assert test ^ 2 == 7 -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-226-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Test 3 | """ 4 | struct Test: 5 | x as double 6 | 7 | v1 = Test(x: 1) 8 | print v1.ToString() 9 | -------------------------------------------------------------------------------- /tests/testcases/stdlib/list-add-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | [1, 2, 4] 3 | """ 4 | l1 = [1, 2, 3] 5 | l1.Pop() 6 | l2 = [4, 5] 7 | l2.Pop() 8 | print l1 + l2 9 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/doc/lexer.to.parser.tokens.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/doc/lexer.to.parser.tokens.gif -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/unicode/test.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/examples/csharp/unicode/test.in -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/imagNodeAST/test.in: -------------------------------------------------------------------------------- 1 | { 2 | i = 3; 3 | if ( 6 ) j = 7; else j = 8; 4 | while ( 9 ) { 5 | k = j; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/treewalk/test.in: -------------------------------------------------------------------------------- 1 | { 2 | i = 3+4*5; 3 | if ( 6 ) j = 7; else j = 8; 4 | while ( 9 ) { 5 | k = 1; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/python/treewalk/treewalk.in: -------------------------------------------------------------------------------- 1 | { 2 | i = 3+4*5; 3 | if ( 6 ) j = 7; else j = 8; 4 | while ( 9 ) { 5 | k = 1; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /tests/testcases/compilation/multifile0.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Homer 3 | """ 4 | import MultiFileTest 5 | 6 | c = Character("Homer") 7 | print(c.Name) 8 | -------------------------------------------------------------------------------- /tests/testcases/compilation/multifile1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Homer 3 | """ 4 | namespace MultiFileTest 5 | 6 | c = Character("Homer") 7 | print(c.Name) 8 | -------------------------------------------------------------------------------- /tests/testcases/compilation/unpack_locals.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = 2, b = 1 3 | """ 4 | a = 1 5 | b = 2 6 | a, b = b, a 7 | print("a = ${a}, b = ${b}") 8 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0022-4.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0022-4.boo(4,17): BCE0022: Cannot convert 'void' to 'int'. 3 | """ 4 | i as int = print("foo") 5 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0063-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0063-1.boo(4,1): BCE0063: No enclosing loop out of which to break or continue. 3 | """ 4 | break 5 | -------------------------------------------------------------------------------- /tests/testcases/integration/attributes/transient.boo: -------------------------------------------------------------------------------- 1 | """ 2 | """ 3 | [transient] class Foo: 4 | pass 5 | 6 | assert not typeof(Foo).IsSerializable 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/duck-typing/duck-7.boo: -------------------------------------------------------------------------------- 1 | l as duck = [1, 2, 3] 2 | assert l*2 == [1, 2, 3, 1, 2, 3] 3 | assert 2*l == [1, 2, 3, 1, 2, 3] 4 | -------------------------------------------------------------------------------- /tests/testcases/integration/generators/list-generators-5.boo: -------------------------------------------------------------------------------- 1 | i = 0 2 | l = [++i for j in range(3)] 3 | assert l == [1, 2, 3] 4 | assert 3 == i 5 | -------------------------------------------------------------------------------- /tests/testcases/integration/generators/to-string.boo: -------------------------------------------------------------------------------- 1 | """ 2 | generator(System.Int32) 3 | """ 4 | g = i for i in range(3) 5 | print g.ToString() 6 | -------------------------------------------------------------------------------- /tests/testcases/integration/linq/linq-aggregate.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 6 3 | """ 4 | import System.Linq 5 | a = (1, 2, 3) 6 | print a.Aggregate({i, j | i + j}) 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/modules/modules-3.boo: -------------------------------------------------------------------------------- 1 | import SunShip from BooModules 2 | 3 | 4 | assert 2.0 == sqrt(4) 5 | assert "10:10" == Ascent() 6 | -------------------------------------------------------------------------------- /tests/testcases/integration/primitives/int-shift-overflow-unchecked.boo: -------------------------------------------------------------------------------- 1 | """ 2 | -2147483648 3 | """ 4 | unchecked: 5 | i as int = 1<<31 6 | print i 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/primitives/uint-argument.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 2147483648 3 | """ 4 | def p(ui as uint): 5 | print ui 6 | 7 | p 2147483648 8 | 9 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/unpack-2.boo: -------------------------------------------------------------------------------- 1 | a = 1, 2, 3 2 | 3 | b, c = a 4 | assert 1 == b 5 | assert 2 == c 6 | assert 3 == (b + c) 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/char-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | match foo: 3 | case char(): 4 | print 5 | """ 6 | match foo: 7 | case char(): 8 | print 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/generic-method-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | def Method[of T1, T2](): 3 | pass 4 | """ 5 | 6 | def Method[of T1, T2](): 7 | pass 8 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/list-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | l = [1, 2, 3] 3 | l = [(1, 2), (3, 4)] 4 | """ 5 | l = [1, 2, 3,] 6 | l = [(1, 2), (3, 4,),] 7 | 8 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/splicing-enum-body.boo: -------------------------------------------------------------------------------- 1 | """ 2 | enum E: 3 | 4 | \$(body) 5 | """ 6 | enum E: 7 | $body 8 | end 9 | 10 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-739-1.boo: -------------------------------------------------------------------------------- 1 | class Foo: 2 | static a = 'hello' 3 | 4 | static def constructor(): 5 | assert a != null 6 | 7 | Foo() 8 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-986-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Good to go! 3 | """ 4 | 5 | def Foo([default('Good to go!')] obj): 6 | print obj 7 | 8 | Foo(null) -------------------------------------------------------------------------------- /tests/testcases/regression/array_ldelem.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 250 3 | """ 4 | i = 0 5 | bytes = array(byte, 1) 6 | bytes[0] = 250 7 | i = bytes[0] 8 | print i 9 | -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/class.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/class.png -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/enum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/enum.png -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/event.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/event.png -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/field.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/field.png -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/method.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/method.png -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/cpp/filterWithRule/t.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

4 | dsfkjdsfklj 5 |
6 | foo 7 | 8 | hi 9 | 10 | 11 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/ASTsupport/MyAST.cs: -------------------------------------------------------------------------------- 1 | /// Test homogeneous class. 2 | public class MyAST : antlr.CommonAST 3 | { 4 | } 5 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/python/imagNodeAST/imagnode.in: -------------------------------------------------------------------------------- 1 | { 2 | i = 3; 3 | if ( 6 ) j = 7; else j = 8; 4 | while ( 9 ) { 5 | k = j; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/python/unicode/unicode.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/examples/python/unicode/unicode.in -------------------------------------------------------------------------------- /tests/testcases/compilation/enumeratoritemtype2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 3 | 2 4 | 4 5 | """ 6 | for i in range(3): 7 | print(i*2) # i is declared as int 8 | -------------------------------------------------------------------------------- /tests/testcases/compilation/if0.boo: -------------------------------------------------------------------------------- 1 | """ 2 | true 3 | """ 4 | import System.Console 5 | 6 | Write("true") if true 7 | Write("false") if false 8 | 9 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0022-5.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0022-5.boo(5,5): BCE0022: Cannot convert 'int' to 'string'. 3 | """ 4 | i = 0 5 | s = cast(string, i) 6 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0063-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0063-2.boo(4,1): BCE0063: No enclosing loop out of which to break or continue. 3 | """ 4 | continue 5 | -------------------------------------------------------------------------------- /tests/testcases/integration/arrays/arrays-4.boo: -------------------------------------------------------------------------------- 1 | """ 2 | System.Int32[] 3 | """ 4 | array as (int) = [1, 2, 3].ToArray(int) 5 | print(array.GetType()) 6 | -------------------------------------------------------------------------------- /tests/testcases/integration/callables/callables-42.boo: -------------------------------------------------------------------------------- 1 | 2 | 3 | a = { return "foo" }, { return 3 } 4 | assert "foo" == a[0]() 5 | assert 3 == a[-1]() 6 | -------------------------------------------------------------------------------- /tests/testcases/integration/closures/closures-18.boo: -------------------------------------------------------------------------------- 1 | div = { a as int, b as int | return a/b } 2 | assert 3 == div(6, 2) 3 | assert 5 == div(15, 3) 4 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/while-4.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 1 3 | 0 4 | """ 5 | i = 1 6 | while not (i < 0): 7 | print(i) 8 | --i 9 | -------------------------------------------------------------------------------- /tests/testcases/integration/types/interfaces-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | True 3 | """ 4 | interface IFoo: 5 | pass 6 | 7 | print(typeof(IFoo).IsInterface) 8 | -------------------------------------------------------------------------------- /tests/testcases/macros/print-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | foo 3 | """ 4 | def foo(): 5 | return 42 6 | 7 | print "foo" if foo() >= 42 8 | print "bar" if foo() < 42 9 | -------------------------------------------------------------------------------- /tests/testcases/net2/generics/type-reference-1.boo: -------------------------------------------------------------------------------- 1 | import System.Collections.Generic 2 | 3 | assert List of int is typeof(List of *).MakeGenericType(int) 4 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/comments-4.boo: -------------------------------------------------------------------------------- 1 | """ 2 | namespace CPlusPlusStyleComments 3 | """ 4 | namespace CPlusPlusStyleComments // Um comentário C++ 5 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/fields-4.boo: -------------------------------------------------------------------------------- 1 | """ 2 | class Foo: 3 | 4 | bar as string = 'foo' 5 | """ 6 | class Foo: 7 | 8 | bar as string = "foo" 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/arrays-5.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a0 as (int) 3 | a1 as (int) 4 | a2 as (int, 2) 5 | """ 6 | a0 as (int) 7 | a1 as (int) 8 | a2 as (int, 2) 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/fields-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | class Foo: 3 | 4 | bar as string 5 | """ 6 | class Foo: 7 | 8 | bar as string 9 | end 10 | 11 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/getset-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | container.set('foo') 3 | bar = container.get() 4 | """ 5 | container.set('foo') 6 | bar = container.get() 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/splicing-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = [| \$(item) |] 3 | b = [| (x as \$(type)) |] 4 | """ 5 | a = [| $item |] 6 | b = [| x as $type |] 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/splicing-class-body.boo: -------------------------------------------------------------------------------- 1 | """ 2 | class E: 3 | 4 | \$(body) 5 | """ 6 | class E: 7 | $body 8 | end 9 | 10 | -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/property.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/property.png -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/cpp/multiLexer/test.in: -------------------------------------------------------------------------------- 1 | /** a javadoc comment 2 | * @param foo 3 | * @exception IOException 4 | * blah blah 5 | */ 6 | int abc; 7 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/filter/t.g: -------------------------------------------------------------------------------- 1 | class T extends Lexer; 2 | options { 3 | k=2; 4 | filter=true; 5 | } 6 | 7 | P : "

" ; 8 | BR: "
" ; 9 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/unicode.IDENTs/test.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/examples/java/unicode.IDENTs/test.in -------------------------------------------------------------------------------- /tests/testcases/compilation/long0.boo: -------------------------------------------------------------------------------- 1 | """ 2 | System.Int64 3 | System.Int64 4 | """ 5 | a = 0L 6 | b = 1l 7 | print(a.GetType()) 8 | print(b.GetType()) 9 | -------------------------------------------------------------------------------- /tests/testcases/compilation/mult0.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 2 3 | 2 4 | 9 5 | """ 6 | a = 5 7 | b = 2 8 | print(a/b) 9 | print(a*b/a) 10 | print(a+b*b) 11 | -------------------------------------------------------------------------------- /tests/testcases/ducky/null-initializer-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | FOO 3 | """ 4 | class Foo: 5 | public a = null 6 | 7 | f = Foo(a: "foo") 8 | print f.a.ToUpper() 9 | -------------------------------------------------------------------------------- /tests/testcases/integration/callables/callables-41.boo: -------------------------------------------------------------------------------- 1 | 2 | 3 | a = { return "foo" }, { return "bar" } 4 | assert "foo" == a[0]() 5 | assert "bar" == a[-1]() 6 | -------------------------------------------------------------------------------- /tests/testcases/integration/duck-typing/duck-17.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 3 | 1 4 | """ 5 | i as duck = 0 6 | while i < 2: 7 | print i 8 | i++ 9 | 10 | -------------------------------------------------------------------------------- /tests/testcases/integration/generators/generators-15.boo: -------------------------------------------------------------------------------- 1 | 2 | 3 | i = 0 4 | g = (++i)*j for j in range(3) 5 | 6 | assert "0 2 6" == join(g) 7 | assert 3 == i 8 | -------------------------------------------------------------------------------- /tests/testcases/integration/operators/cast-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | boo 3 | 4 | """ 5 | a as object = "kaboom!!" 6 | 7 | print((a as string).Substring(2, 3)) 8 | -------------------------------------------------------------------------------- /tests/testcases/integration/types/internal-field-initializer.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 42 3 | """ 4 | class Foo: 5 | internal Value = 0 6 | 7 | print Foo(Value: 42).Value 8 | -------------------------------------------------------------------------------- /tests/testcases/integration/types/static-final-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | """ 3 | class Globals: 4 | public static final None = null 5 | 6 | assert Globals.None is null 7 | -------------------------------------------------------------------------------- /tests/testcases/net2/generics/generators-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 2 3 | 4 4 | 6 5 | """ 6 | 7 | e = i * 2 for i in (1,2,3,4) if i <= 3 8 | for i in e: print i 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/enum_1.boo: -------------------------------------------------------------------------------- 1 | enum Priority: 2 | Low 3 | Normal 4 | High 5 | 6 | enum Difficulty: 7 | Easy = 0 8 | Normal = 5 9 | Hard 10 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/closures-10.boo: -------------------------------------------------------------------------------- 1 | """ 2 | class Foo: 3 | 4 | bar = { msg | print(msg) } 5 | """ 6 | class Foo: 7 | bar = { msg | print(msg) } 8 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/generic-method-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | def Method[of T](t as T): 3 | pass 4 | """ 5 | 6 | def Method[of T](t as T): 7 | pass 8 | 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/getset-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | container.set('foo') 3 | bar = container.get() 4 | """ 5 | container.set("foo") 6 | bar = container.get() 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/splicing-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = [| \$(item) |] 3 | b = [| (x as \$(type)) |] 4 | """ 5 | a = [| $item |] 6 | b = [| x as $type |] 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/xor-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = (true ^ false) 3 | b = (55 ^ 255) 4 | b ^= 42 5 | """ 6 | a = true ^ false 7 | b = 55 ^ 0xFF 8 | b ^= 42 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/fields-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | class Foo: 3 | 4 | bar = (1, 2, 3) 5 | """ 6 | class Foo: 7 | 8 | bar = (1, 2, 3) 9 | end 10 | 11 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/generators-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | print(join([("\$i" for i in range(3))], ', ')) 3 | """ 4 | print(join([("${i}" for i in range(3))], ', ')) 5 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/line-continuation-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a, b, c = (1, 2, 3) 3 | d, e, f = (4, 5, 6) 4 | """ 5 | a, b, c = (1, 2, 3) 6 | d, e, f = (4, 5, 6) 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/regex-literals-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | print(@/ foo bar /) 3 | print(@/tab space /) 4 | """ 5 | print(@/ foo bar /) 6 | print(@/tab space /) 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/xor-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = (true ^ false) 3 | b = (55 ^ 255) 4 | b ^= 42 5 | """ 6 | a = (true ^ false) 7 | b = (55 ^ 255) 8 | b ^= 42 9 | -------------------------------------------------------------------------------- /tests/testcases/warnings/BCW0002-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCW0002-1.boo(4,7): BCW0002: WARNING: Statement modifiers have no effect in labels. 3 | """ 4 | :home if true 5 | -------------------------------------------------------------------------------- /extras/SharpDevelop/BooBinding/icons/Boo.File.Form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/SharpDevelop/BooBinding/icons/Boo.File.Form.png -------------------------------------------------------------------------------- /extras/SharpDevelop/BooBinding/icons/Boo.FileIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/SharpDevelop/BooBinding/icons/Boo.FileIcon.png -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/PrivateEnum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/PrivateEnum.png -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/interface.png -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/namespace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/namespace.png -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/ASTsupport/ASTType49.java: -------------------------------------------------------------------------------- 1 | /** Test heterogeneous dynamic typing class */ 2 | public class ASTType49 extends antlr.CommonAST { 3 | } 4 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/pascal/Function.java: -------------------------------------------------------------------------------- 1 | public class Function extends Symbol { 2 | public Function(String name) { 3 | super(name); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/pascal/RecordType.java: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | 3 | public class RecordType extends TypeSpecifier implements Serializable { 4 | } 5 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/python/filterWithRule/rulefilter.in: -------------------------------------------------------------------------------- 1 | 2 | 3 |

4 | dsfkjdsfklj 5 |
6 | foo 7 | 8 | hi 9 |

10 | 11 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/python/unicode.IDENTs/ident.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/examples/python/unicode.IDENTs/ident.in -------------------------------------------------------------------------------- /lib/antlr-2.7.5/lib/csharp/ASTFrame/antlr.astframe.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/lib/antlr-2.7.5/lib/csharp/ASTFrame/antlr.astframe.dll -------------------------------------------------------------------------------- /tests/testcases/ducky/ducky-10.boo: -------------------------------------------------------------------------------- 1 | """ 2 | JSON 3 | """ 4 | 5 | json = {'A':"B",'C':[1,null,3,"ABC",{"D":56,"E":"JSON"}]} 6 | print json["C"][4]["E"] 7 | 8 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0022-14.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0022-14.boo(5,18): BCE0022: Cannot convert '(object)' to '(string)'. 3 | """ 4 | a = (,) 5 | ss as (string) = a 6 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0153-2.boo: -------------------------------------------------------------------------------- 1 | import BooCompiler.Tests.SupportingClasses 2 | 3 | def foo() [ThisReturnTypeIs("null")] as string: 4 | pass 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/closures/closures-23.boo: -------------------------------------------------------------------------------- 1 | div = def (a as int, b as int): 2 | return a/b 3 | 4 | assert 3 == div(6, 2) 5 | assert 5 == div(15, 3) 6 | -------------------------------------------------------------------------------- /tests/testcases/integration/generators/generators-8.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 6 12 18 24 3 | """ 4 | a = i*2 for i as int in (j*3 for j in range(5)) 5 | print(join(a)) 6 | -------------------------------------------------------------------------------- /tests/testcases/integration/modules/import-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Hello, System.Console! 3 | """ 4 | import System.Console 5 | 6 | Write("Hello, System.Console!") 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/primitives/uint-field-initializer.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 2147483648 3 | """ 4 | class Foo: 5 | public bar as uint = 2147483648 6 | print Foo().bar 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/while_then-4.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Exactly. 3 | """ 4 | 5 | while false: print 'Say what?' ; break 6 | then: print 'Exactly.' 7 | -------------------------------------------------------------------------------- /tests/testcases/net2/generics/inference-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Int32 3 | """ 4 | 5 | def Method[of T](arg as T): 6 | return typeof(T).Name 7 | 8 | print Method(42) -------------------------------------------------------------------------------- /tests/testcases/net2/generics/type-reference-3.boo: -------------------------------------------------------------------------------- 1 | import System.Collections.Generic 2 | 3 | assert typeof(List of int) is typeof(List of *).MakeGenericType(int) 4 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/arrays-5.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a0 as (int) 3 | a1 as (int) 4 | a2 as (int, 2) 5 | """ 6 | a0 as (int) 7 | a1 as (int, 1) 8 | a2 as (int, 2) 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/generators-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | print(join([("\$i" for i in range(3))], ', ')) 3 | """ 4 | print(join(["${i}" for i in range(3)], ", ")) 5 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/in-not-in-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | if (5 in [1, 2, 3]) and true: 3 | print 'good' 4 | """ 5 | if 5 in [1, 2, 3] and true: 6 | print 'good' 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/regex-literals-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | print(@/ foo bar /) 3 | print(@/tab space /) 4 | """ 5 | print(@/ foo bar /) 6 | print(@/tab space /) 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/static_method.boo: -------------------------------------------------------------------------------- 1 | namespace ITL 2 | 3 | class Math: 4 | static def square(x as int) as int: 5 | return x*x 6 | 7 | print(Math.square(3)) 8 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-195-1.boo: -------------------------------------------------------------------------------- 1 | struct Size: 2 | Width as int 3 | Height as int 4 | 5 | s = Size() 6 | assert 0 == s.Width 7 | assert 0 == s.Height 8 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-398-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Hello World 3 | """ 4 | closure = def(*var as (string)): 5 | print join(var) 6 | closure("Hello", "World") 7 | 8 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-612-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 4 3 | """ 4 | def foo(ref x as int): 5 | return x = 4 6 | 7 | x = 0 8 | print foo(x) 9 | assert 4 == x 10 | -------------------------------------------------------------------------------- /tests/testcases/stdlib/len-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | System.ArgumentException 3 | """ 4 | ltuae as duck = 42 5 | try: 6 | i = len(ltuae) 7 | except x: 8 | print x.GetType() 9 | -------------------------------------------------------------------------------- /extras/SharpDevelop/BooBinding/icons/Boo.Project.Form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/SharpDevelop/BooBinding/icons/Boo.Project.Form.png -------------------------------------------------------------------------------- /extras/SharpDevelop/BooBinding/icons/Boo.ProjectIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/SharpDevelop/BooBinding/icons/Boo.ProjectIcon.png -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/InternalClass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/InternalClass.png -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/InternalEnum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/InternalEnum.png -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/InternalField.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/InternalField.png -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/PrivateClass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/PrivateClass.png -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/PrivateField.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/PrivateField.png -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/PrivateMethod.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/PrivateMethod.png -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/ProtectedEnum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/ProtectedEnum.png -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/filterWithRule/t.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

4 | dsfkjdsfklj 5 |
6 | foo 7 | 8 | hi 9 |

10 | 11 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/multiLexer/shiplist: -------------------------------------------------------------------------------- 1 | Main.java 2 | javaparse.g 3 | javadocparse.g 4 | javalex.g 5 | javadoclex.g 6 | test.in 7 | CommonTokenTypes.txt 8 | 9 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/multiLexer/test.in: -------------------------------------------------------------------------------- 1 | /** a javadoc comment 2 | * @param foo 3 | * @exception IOException 4 | * blah blah 5 | */ 6 | int abc; 7 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/filterWithRule/t.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

4 | dsfkjdsfklj 5 |
6 | foo 7 | 8 | hi 9 |

10 | 11 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/multiLexer/shiplist: -------------------------------------------------------------------------------- 1 | Main.java 2 | javaparse.g 3 | javadocparse.g 4 | javalex.g 5 | javadoclex.g 6 | test.in 7 | CommonTokenTypes.txt 8 | 9 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/multiLexer/test.in: -------------------------------------------------------------------------------- 1 | /** a javadoc comment 2 | * @param foo 3 | * @exception IOException 4 | * blah blah 5 | */ 6 | int abc; 7 | -------------------------------------------------------------------------------- /tests/testcases/compilation/double0.boo: -------------------------------------------------------------------------------- 1 | """ 2 | System.Double 3 | System.Double 4 | """ 5 | a = .5 6 | b as double 7 | print(a.GetType()) 8 | print(b.GetType()) 9 | -------------------------------------------------------------------------------- /tests/testcases/compilation/parameter_as_lvalue.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 2 3 | """ 4 | def spam(eggs as int): 5 | eggs = eggs + 1 6 | return eggs 7 | 8 | print(spam(1)) 9 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0022-11.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0022-11.boo(5,21): BCE0022: Cannot convert 'null' to 'single'. 3 | """ 4 | class Foo: 5 | bar as single = null 6 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0067-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0067-1.boo(5,1): BCE0067: There is already a local variable with the name 'a'. 3 | """ 4 | a = 3 5 | a as int = 4 6 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0087-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0087-1.boo(7,5): BCE0087: Cannot create instance of enum 'Foo'. 3 | """ 4 | enum Foo: 5 | Bar 6 | 7 | f = Foo() 8 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0095-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0095-2.boo(7,6): BCE0095: No such label 'label'. 3 | """ 4 | a = def (): 5 | :label 6 | 7 | goto label 8 | 9 | -------------------------------------------------------------------------------- /tests/testcases/integration/callables/callables-12.boo: -------------------------------------------------------------------------------- 1 | 2 | 3 | def foo(): 4 | return "yes, it works!" 5 | 6 | assert "yes, it works!" == foo.Invoke() 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/testcases/macros/print-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | spam 3 | 1 2 3 4 | 5 | eggs 42 6 | """ 7 | print "spam" 8 | print 1, 2, 3 9 | print 10 | print "eggs", 42 11 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/closures-11.boo: -------------------------------------------------------------------------------- 1 | """ 2 | class Foo: 3 | 4 | bar = { msg | print(msg) } 5 | """ 6 | class Foo: 7 | bar = def (msg): 8 | print(msg) 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/ones-complement-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | i = (~2) 3 | j = (-(~i)) 4 | h = ((~i) + ((~j) * 2)) 5 | """ 6 | i = ~2 7 | j = -~i 8 | h = ~i + ~j * 2 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/return-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | def foo(a): 3 | return if (a is null) 4 | return 5 | """ 6 | def foo(a): 7 | return if a is null 8 | return 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/while_or-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | while false: 3 | pass 4 | or: 5 | return 1 6 | """ 7 | while false: 8 | pass 9 | or: 10 | return 1 11 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/fields-4.boo: -------------------------------------------------------------------------------- 1 | """ 2 | class Foo: 3 | 4 | bar as string = 'foo' 5 | """ 6 | class Foo: 7 | 8 | bar as string = 'foo' 9 | end 10 | 11 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/in-not-in-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | if (5 in [1, 2, 3]) and true: 3 | print 'good' 4 | """ 5 | if (5 in [1, 2, 3]) and true: 6 | print 'good' 7 | end 8 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/while_or-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | while false: 3 | pass 4 | or: 5 | return 1 6 | """ 7 | while false: 8 | pass 9 | or: 10 | return 1 11 | end -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-129-1.boo: -------------------------------------------------------------------------------- 1 | class A: 2 | enum snack: 3 | yummy 4 | 5 | def constructor(): 6 | super() 7 | 8 | assert cast(int, A.snack.yummy) == 0 9 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-226-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Test 3 | """ 4 | class Test(System.ValueType): 5 | public x as double 6 | 7 | v1 = Test(x: 1) 8 | print v1.ToString() 9 | -------------------------------------------------------------------------------- /extras/SharpDevelop/BooBinding/icons/Boo.File.EmptyFile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/SharpDevelop/BooBinding/icons/Boo.File.EmptyFile.png -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/InternalMethod.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/InternalMethod.png -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/InternalProperty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/InternalProperty.png -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/PrivateInterface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/PrivateInterface.png -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/PrivateProperty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/PrivateProperty.png -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/ProtectedClass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/ProtectedClass.png -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/ProtectedField.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/ProtectedField.png -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/ProtectedMethod.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/ProtectedMethod.png -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/python/multiLexer/multilex.in: -------------------------------------------------------------------------------- 1 | /** a javadoc comment 2 | * @param foo 3 | * @exception IOException 4 | * blah blah 5 | */ 6 | int abc; 7 | -------------------------------------------------------------------------------- /src/booc/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/testcases/compilation/caseinsensitivehash.boo: -------------------------------------------------------------------------------- 1 | """ 2 | bar 3 | True 4 | """ 5 | h = Hash(true) 6 | h["foo"] = "bar" 7 | print(h["fOO"]) 8 | print("FOO" in h) 9 | -------------------------------------------------------------------------------- /tests/testcases/compilation/modifiers0.boo: -------------------------------------------------------------------------------- 1 | a, b = 1, 2 if false 2 | c, d = 3, 4 if true 3 | 4 | assert 0 == a 5 | assert 0 == b 6 | assert 3 == c 7 | assert 4 == d 8 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0022-13.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0022-13.boo(5,5): BCE0022: Cannot convert 'int' to 'string'. 3 | """ 4 | i = "sok" 5 | for i in range(10): 6 | print i 7 | 8 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0061-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0061-1.boo(6,9): BCE0061: 'Foo.Bar()' is not an override. 3 | """ 4 | class Foo: 5 | def Bar(): 6 | super() 7 | 8 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0067-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0067-3.boo(5,5): BCE0067: There is already a local variable with the name 'a'. 3 | """ 4 | def foo(a): 5 | a as int = 3 6 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0102-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0102-1.boo(6,12): BCE0102: Generators cannot return values. 3 | """ 4 | def foo(): 5 | yield 1 6 | return 42 7 | 8 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0123-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0123-1.boo(5,18): BCE0123: Invalid parameter type 'void'. 3 | """ 4 | class Foo: 5 | def bar(i as void): 6 | pass 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/callables/callables-7.boo: -------------------------------------------------------------------------------- 1 | 2 | def foo(): 3 | pass 4 | 5 | f = foo 6 | assert f isa ICallable, "anonymous callable type implements ICallable" 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/closures/closure-inference-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 007 3 | """ 4 | 5 | closure as callable(int) as string = { i | i.ToString("000") } 6 | print closure(7) 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/duck-typing/duck-3.boo: -------------------------------------------------------------------------------- 1 | class Person: 2 | 3 | public Name as string 4 | 5 | p as duck = Person(Name: "John") 6 | assert "John" == p.Name 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/operators/bitwise-and-1.boo: -------------------------------------------------------------------------------- 1 | 2 | assert 0 == 1 & 2 3 | assert 1 == 1 & 3 4 | assert 0 == 2 & 4 5 | assert 2 == 2 & 6 6 | assert 3 == 3 & 7 7 | -------------------------------------------------------------------------------- /tests/testcases/net2/generics/collections-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 42 3 | """ 4 | import System.Collections.Generic 5 | 6 | l = List of int() 7 | l.Add(21) 8 | print l[0]*2 9 | -------------------------------------------------------------------------------- /tests/testcases/net2/generics/inference-4.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Int32 3 | """ 4 | 5 | def Method[of T](arg as (T)): 6 | return typeof(T).Name 7 | 8 | print Method((42, )) 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/ast-literal-enum.boo: -------------------------------------------------------------------------------- 1 | """ 2 | e = [| 3 | enum Foo: 4 | 5 | Bar 6 | |] 7 | """ 8 | e = [| 9 | enum Foo: 10 | Bar 11 | |] 12 | 13 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/closures-7.boo: -------------------------------------------------------------------------------- 1 | """ 2 | predicate = { item as int | return (0 == (item % 2)) } 3 | """ 4 | predicate = { item as int | return 0 == item % 2 } 5 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/for_or-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | for item in []: 3 | pass 4 | or: 5 | return 1 6 | """ 7 | for item in []: 8 | pass 9 | or: 10 | return 1 11 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/while_then-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | while true: 3 | pass 4 | then: 5 | return 1 6 | """ 7 | while true: 8 | pass 9 | then: 10 | return 1 11 | -------------------------------------------------------------------------------- /tests/testcases/parser/stmt_modifiers_1.boo: -------------------------------------------------------------------------------- 1 | def fatorial(n as int) as int: 2 | return 1 if n < 2 3 | return n * fatorial(n-1) 4 | 5 | print( fatorial(5) / fatorial(2) ) 6 | -------------------------------------------------------------------------------- /tests/testcases/parser/stmt_modifiers_3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a, b = (1, 2) if true 3 | c, d = (3, 4) unless false 4 | """ 5 | a, b = 1, 2 if true 6 | c, d = 3, 4 unless false 7 | 8 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/char-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | match foo: 3 | case char(): 4 | print 5 | """ 6 | match foo: 7 | case char(): 8 | print 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/class-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | class C1: 3 | pass 4 | 5 | class C2: 6 | pass 7 | """ 8 | class C1: 9 | end 10 | 11 | class C2: 12 | end 13 | 14 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/closures-21.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = { x | x > 0 } 3 | b = { x | (x > 0) and (x < 10) } 4 | """ 5 | a = { x | x > 0 } 6 | b = { x | (x > 0) and (x < 10) } 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/closures-7.boo: -------------------------------------------------------------------------------- 1 | """ 2 | predicate = { item as int | return (0 == (item % 2)) } 3 | """ 4 | predicate = { item as int | return (0 == (item % 2)) } 5 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/closures-8.boo: -------------------------------------------------------------------------------- 1 | """ 2 | predicate = { item as int | return (0 == (item % 2)) } 3 | """ 4 | predicate = { item as int | return (0 == (item % 2)) } 5 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/for_or-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | for item in []: 3 | pass 4 | or: 5 | return 1 6 | """ 7 | for item in []: 8 | pass 9 | or: 10 | return 1 11 | end -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/ones-complement-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | i = (~2) 3 | j = (-(~i)) 4 | h = ((~i) + ((~j) * 2)) 5 | """ 6 | i = (~2) 7 | j = (-(~i)) 8 | h = ((~i) + ((~j) * 2)) 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/while_then-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | while true: 3 | pass 4 | then: 5 | return 1 6 | """ 7 | while true: 8 | pass 9 | then: 10 | return 1 11 | end -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-1080-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Foo 3 | """ 4 | 5 | class A[of T]: 6 | internal def Foo(): 7 | print "Foo" 8 | 9 | A[of int]().Foo() 10 | 11 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-1130-1.boo: -------------------------------------------------------------------------------- 1 | enum W: 2 | Int = 0xff0000 3 | Long = 0xff0000000000 4 | 5 | assert W.Int == 0xff0000 6 | assert W.Long == 0xff0000000000 7 | 8 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-301-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 1 3 | """ 4 | i = 0 5 | while i < 2: 6 | ++i 7 | for j in range(2): 8 | pass 9 | break 10 | 11 | print i 12 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-949-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | ok 3 | """ 4 | def Method(x as string): 5 | pass 6 | def Method[of T](x as string): 7 | pass 8 | 9 | print "ok" 10 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-975-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | AClass`1[System.String] 3 | """ 4 | 5 | class AClass[of T]: 6 | pass 7 | 8 | c = AClass[of string]() 9 | 10 | print c -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/InternalInterface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/InternalInterface.png -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/ProtectedInterface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/ProtectedInterface.png -------------------------------------------------------------------------------- /extras/boox/resources/ClassBrowserIcons/ProtectedProperty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/boox/resources/ClassBrowserIcons/ProtectedProperty.png -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/cpp/preserveWhiteSpace/readme.txt: -------------------------------------------------------------------------------- 1 | See http://www.antlr.org/fieldguide/whitespace for a description of 2 | this translator. 3 | 4 | Peace, 5 | Terence 6 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/ASTsupport/ASTType49.cs: -------------------------------------------------------------------------------- 1 | /// Test heterogeneous dynamic typing class. 2 | public class ASTType49 : antlr.CommonAST 3 | { 4 | } 5 | -------------------------------------------------------------------------------- /tests/Boo.Lang.Useful.Tests/BooTemplate/Globals.boo: -------------------------------------------------------------------------------- 1 | namespace Boo.Lang.Useful.BooTemplate.Tests 2 | 3 | def normalize(s as string): 4 | return s.Trim().Replace("\r\n", "\n") 5 | -------------------------------------------------------------------------------- /tests/testcases/compilation/inplace1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 5 3 | """ 4 | class Person: 5 | public Age as int 6 | 7 | p = Person(Age: 3) 8 | p.Age += 2 9 | print(p.Age) 10 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0022-12.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0022-12.boo(5,6): BCE0022: Cannot convert 'string' to 'int'. 3 | """ 4 | class Foo: 5 | [getter(Bar as int)] 6 | _bar as string 7 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0067-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0067-2.boo(5,1): BCE0067: There is already a local variable with the name 'a'. 3 | """ 4 | a = 3 5 | a as int, b as int = 4, 5 6 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0093-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0093-2.boo(5,10): BCE0093: Cannot branch into ensure block. 3 | """ 4 | try: 5 | goto label 6 | ensure: 7 | :label 8 | 9 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0097-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0097-1.boo(4,6): BCE0097: Cannot branch into try block. 3 | """ 4 | goto start 5 | try: 6 | :start 7 | ensure: 8 | pass 9 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0166-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0166-1.boo(5,5): BCE0166: Unknown macro 'bar'. Did you mean to declare the field 'bar as object'? 3 | """ 4 | class Foo: 5 | bar 6 | -------------------------------------------------------------------------------- /tests/testcases/integration/callables/byref-13.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 42 3 | """ 4 | def foo(ref i as int): 5 | i = 42 6 | 7 | f = foo 8 | i = 0 9 | f(i) 10 | print i 11 | -------------------------------------------------------------------------------- /tests/testcases/integration/clr-extensions/infer-closure-singature.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 -1 3 | """ 4 | import System.Linq 5 | 6 | print join(("1", "2").Select({s|s.IndexOf("1")}).ToArray()) -------------------------------------------------------------------------------- /tests/testcases/integration/operators/cast-7.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Bar 3 | 3 4 | """ 5 | enum Foo: 6 | Bar = 3 7 | 8 | print(Foo.Bar) 9 | print(cast(int, Foo.Bar)) 10 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/for-5.boo: -------------------------------------------------------------------------------- 1 | 2 | values = [] 3 | for i in range(10): 4 | break if i > 4 5 | values.Add(i) 6 | 7 | assert values == [0, 1, 2, 3, 4] 8 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/while-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 3 3 | 2 4 | 1 5 | """ 6 | i = 3 7 | 8 | while i > 0: 9 | System.Console.WriteLine(i) 10 | --i 11 | -------------------------------------------------------------------------------- /tests/testcases/integration/types/innerclasses-9.boo: -------------------------------------------------------------------------------- 1 | class A: 2 | class B: 3 | pass 4 | 5 | class C(B): 6 | pass 7 | 8 | assert typeof(A.C).BaseType is A.B 9 | -------------------------------------------------------------------------------- /tests/testcases/macros/yieldAll-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 1 2 3 1 3 | """ 4 | def foo(): 5 | yieldAll range(1, 4) 6 | yield 1 7 | 8 | print join(foo()) 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/arrays-4.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = (1, 2, 3) 3 | b = ((1, 2), (3, 4)) 4 | """ 5 | a = (1, 2, 3,) 6 | b = ( 7 | (1, 2), 8 | (3, 4,), 9 | ) 10 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/class-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | class C1: 3 | pass 4 | 5 | class C2: 6 | pass 7 | """ 8 | class C1: 9 | pass 10 | 11 | class C2(): 12 | pass 13 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/closures-8.boo: -------------------------------------------------------------------------------- 1 | """ 2 | predicate = { item as int | return (0 == (item % 2)) } 3 | """ 4 | predicate = def (item as int): 5 | return 0 == item % 2 6 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/for_then-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | for item in []: 3 | pass 4 | then: 5 | return 1 6 | """ 7 | for item in []: 8 | pass 9 | then: 10 | return 1 11 | -------------------------------------------------------------------------------- /tests/testcases/parser/stmt_modifiers_2.boo: -------------------------------------------------------------------------------- 1 | def fatorial(n as int) as int: 2 | return 1 if n < 2 3 | return n*fatorial(n-1) 4 | 5 | f = fatorial(5)/fatorial(2) 6 | print(f) 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/arrays-6.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a1 = (of int: 1, 2, 3) 3 | a2 = (of string: 'foo', 'bar') 4 | """ 5 | a1 = (of int: 1, 2, 3) 6 | a2 = (of string: 'foo', 'bar') 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/for_then-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | for item in []: 3 | pass 4 | then: 5 | return 1 6 | """ 7 | for item in []: 8 | pass 9 | then: 10 | return 1 11 | end -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-145-1.boo: -------------------------------------------------------------------------------- 1 | import System.Drawing from BooCompiler.Tests 2 | 3 | p = Point(100, 100) 4 | assert 100 == p.X 5 | 6 | p.X = 300 7 | assert 300 == p.X 8 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-366-1.boo: -------------------------------------------------------------------------------- 1 | generator = { yield 1; yield 2 } 2 | e = generator().GetEnumerator() 3 | item, = e 4 | assert 1 == item 5 | item, = e 6 | assert 2 == item 7 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-612-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 4 3 | """ 4 | def foo(ref x as int): 5 | a = x = 4 6 | return a 7 | 8 | x = 0 9 | print foo(x) 10 | assert 4 == x 11 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-779-4.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 3 | 1 4 | 2 5 | 3 6 | """ 7 | 8 | def GetRange(): 9 | return range(4) 10 | 11 | for item in GetRange(): 12 | print item -------------------------------------------------------------------------------- /extras/SharpDevelop/BooBinding/icons/Boo.Project.EmptyProject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/boo/HEAD/extras/SharpDevelop/BooBinding/icons/Boo.Project.EmptyProject.png -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/preserveWhiteSpace/readme.txt: -------------------------------------------------------------------------------- 1 | See http://www.antlr.org/fieldguide/whitespace for a description of 2 | this translator. 3 | 4 | Peace, 5 | Terence 6 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/preserveWhiteSpace/readme.txt: -------------------------------------------------------------------------------- 1 | See http://www.antlr.org/fieldguide/whitespace for a description of 2 | this translator. 3 | 4 | Peace, 5 | Terence 6 | -------------------------------------------------------------------------------- /tests/BooCompiler.Tests/SupportingClasses/Vector3.cs: -------------------------------------------------------------------------------- 1 | namespace BooCompiler.Tests.SupportingClasses 2 | { 3 | public struct Vector3 4 | { 5 | public float x, y, z; 6 | } 7 | } -------------------------------------------------------------------------------- /tests/testcases/attributes/default-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | def foo(value as string): 3 | if value is null: 4 | value = 'test' 5 | """ 6 | def foo([default("test")] value as string): 7 | pass 8 | -------------------------------------------------------------------------------- /tests/testcases/attributes/required-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | def foo(name): 3 | raise System.ArgumentNullException('name') if (name is null) 4 | """ 5 | def foo([required] name): 6 | pass 7 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0072-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0072-2.boo(6,16): BCE0022: Cannot convert 'int' to 'string'. 3 | """ 4 | class Foo: 5 | override def ToString(): 6 | return 3 7 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0086-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0086-1.boo(7,5): BCE0086: Cannot create instance of interface 'IFoo'. 3 | """ 4 | interface IFoo: 5 | pass 6 | 7 | f = IFoo() 8 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0094-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0094-1.boo(5,10): BCE0094: Cannot branch into exception handler. 3 | """ 4 | try: 5 | goto label 6 | except: 7 | :label 8 | 9 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0100-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0100-1.boo(6,9): BCE0100: yield cannot be used inside constructors. 3 | """ 4 | class Foo: 5 | def constructor(): 6 | yield 0 7 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0103-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0103-3.boo(7,11): BCE0103: Cannot extend final type 'Foo'. 3 | """ 4 | enum Foo: 5 | None 6 | 7 | class Bar(Foo): 8 | pass 9 | -------------------------------------------------------------------------------- /tests/testcases/errors/selective-import.boo: -------------------------------------------------------------------------------- 1 | """ 2 | selective-import.boo(5,1): BCE0005: Unknown identifier: 'Console'. 3 | """ 4 | import System(Object) 5 | Console.WriteLine("hello") 6 | -------------------------------------------------------------------------------- /tests/testcases/integration/arrays/matrix-with-type-reference.boo: -------------------------------------------------------------------------------- 1 | """ 2 | System.String[,] 3 | """ 4 | type = string 5 | m as (string, 2) = matrix(type, 2, 2) 6 | print m.GetType() 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/callables/callables-45.boo: -------------------------------------------------------------------------------- 1 | """ 2 | foo 3 | """ 4 | class T: 5 | def constructor(start as callable(object)): 6 | start("foo") 7 | 8 | T(print) 9 | -------------------------------------------------------------------------------- /tests/testcases/integration/operators/slicing-9.boo: -------------------------------------------------------------------------------- 1 | """ 2 | f 3 | o 4 | o 5 | """ 6 | s = "foo" 7 | print(s.Chars[0]) 8 | print(s.Chars[1]) 9 | print(s.Chars[2]) 10 | -------------------------------------------------------------------------------- /tests/testcases/integration/primitives/char-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | System.Char 3 | a 4 | """ 5 | 6 | print char('a').GetType() 7 | 8 | a as char = char('a') 9 | print a 10 | -------------------------------------------------------------------------------- /tests/testcases/integration/primitives/string-yields-chars.boo: -------------------------------------------------------------------------------- 1 | """ 2 | F 3 | O 4 | O 5 | """ 6 | for ch in "foo": 7 | print char.ToUpper(ch) 8 | 9 | [assembly: StrictMode] 10 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/continue-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 3 | 2 4 | 4 5 | 6 6 | 8 7 | """ 8 | for i as int in range(10): 9 | continue if i % 2 10 | print(i) 11 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/unpack-3.boo: -------------------------------------------------------------------------------- 1 | a = "spam", 42, object() 2 | 3 | s as string, i as int, o = a 4 | assert "spam" == s 5 | assert 42 == i 6 | assert o is a[-1] 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/while-7.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 3 | 1 4 | 2 5 | """ 6 | a = 1 7 | i = 0 8 | while 0 != a: 9 | print i 10 | ++i 11 | a = 0 if i > 2 12 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/while-8.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 3 | 1 4 | 2 5 | """ 6 | a = 0 7 | i = 0 8 | while a == 0: 9 | print i 10 | ++i 11 | a = 1 if i > 2 12 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/closures-10.boo: -------------------------------------------------------------------------------- 1 | """ 2 | class Foo: 3 | 4 | bar = { msg | print(msg) } 5 | """ 6 | class Foo: 7 | 8 | bar = { msg | print(msg) } 9 | end 10 | 11 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/closures-11.boo: -------------------------------------------------------------------------------- 1 | """ 2 | class Foo: 3 | 4 | bar = { msg | print(msg) } 5 | """ 6 | class Foo: 7 | 8 | bar = { msg | print(msg) } 9 | end 10 | 11 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-977-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Foo`1[System.String] 3 | """ 4 | 5 | class Foo[of T]: 6 | pass 7 | 8 | foo = Foo[of string]() 9 | 10 | print foo.ToString() -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-979-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Param 3 | """ 4 | class Param: 5 | pass 6 | 7 | c = (Param(),) 8 | System.Array.Sort[of Param](c) 9 | 10 | print c[0].GetType() -------------------------------------------------------------------------------- /tests/testcases/stdlib/range-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | step 3 | """ 4 | try: 5 | for i in range(3, 0, 1): 6 | print i 7 | except x as System.ArgumentOutOfRangeException: 8 | print x.ParamName 9 | -------------------------------------------------------------------------------- /tests/testcases/warnings/BCW0015-5.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCW0015-5.boo(6,5): BCW0015: WARNING: Unreachable code detected. 3 | """ 4 | def WithUnreachableCode(i as int): 5 | return 0 6 | ++i 7 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/cpp/ASTsupport/Main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "SupportTest.hpp" 3 | 4 | int main() 5 | { 6 | SupportTest::main(); 7 | return 0; 8 | } 9 | 10 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/unicode.IDENTs/shiplist: -------------------------------------------------------------------------------- 1 | Unicode.readme 2 | Unicode.g 3 | test.in 4 | Main.java 5 | ShowString.java 6 | Debug.java 7 | StreamConverter.java 8 | font.properties 9 | -------------------------------------------------------------------------------- /tests/BooCompiler.Tests/SupportingClasses/Point.cs: -------------------------------------------------------------------------------- 1 | namespace BooCompiler.Tests.SupportingClasses 2 | { 3 | public struct Point 4 | { 5 | public int x; 6 | public int y; 7 | } 8 | } -------------------------------------------------------------------------------- /tests/testcases/compilation/formatting0.boo: -------------------------------------------------------------------------------- 1 | """ 2 | public class Foo 3 | { 4 | } 5 | """ 6 | item = "Foo" 7 | print( 8 | """public class ${item} 9 | { 10 | } 11 | """) 12 | -------------------------------------------------------------------------------- /tests/testcases/ducky/method-dispatch-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | int: 1 3 | """ 4 | class Foo: 5 | def bar(i as int): 6 | print "int:", i 7 | 8 | d as duck = Foo() 9 | d.bar(1.0) 10 | 11 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0103-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0103-1.boo(7,11): BCE0103: Cannot extend final type 'Foo'. 3 | """ 4 | final class Foo: 5 | pass 6 | 7 | class Bar(Foo): 8 | pass 9 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0108-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0108-1.boo(5,20): BCE0108: Value type fields cannot have initializers. 3 | """ 4 | class Foo(System.ValueType): 5 | public Value = 0 6 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0134-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0134-2.boo(5,9): BCE0134: 'Foo.destructor' cannot return values. 3 | """ 4 | class Foo: 5 | def destructor() as int: 6 | pass 7 | 8 | -------------------------------------------------------------------------------- /tests/testcases/integration/callables/params-6.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Hello World 3 | """ 4 | class Test: 5 | def constructor(*args): 6 | print join(args) 7 | 8 | Test("Hello", "World") 9 | -------------------------------------------------------------------------------- /tests/testcases/integration/closures/closure-inference-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 007 3 | """ 4 | 5 | closure as callable(int) as string 6 | closure = { i | i.ToString("000") } 7 | print closure(7) 8 | -------------------------------------------------------------------------------- /tests/testcases/integration/generators/generators-12.boo: -------------------------------------------------------------------------------- 1 | 2 | g = i*2 for i in range(5) 3 | 4 | current = 0 5 | for i in g: 6 | assert current == i/2, "integer division" 7 | ++current 8 | -------------------------------------------------------------------------------- /tests/testcases/integration/generators/generators-16.boo: -------------------------------------------------------------------------------- 1 | 2 | 3 | a = range(3) 4 | g = i*2 for i in a 5 | assert "0 2 4" == join(g) 6 | 7 | a = range(3, 6) 8 | assert "6 8 10" == join(g) 9 | -------------------------------------------------------------------------------- /tests/testcases/integration/generators/yield-13.boo: -------------------------------------------------------------------------------- 1 | def generator() as System.Collections.IEnumerable: 2 | yield 1 3 | yield "um" 4 | 5 | assert "1: um" == join(generator(), ": ") 6 | -------------------------------------------------------------------------------- /tests/testcases/integration/linq/array-linq.boo: -------------------------------------------------------------------------------- 1 | """ 2 | System.Collections.Generic.List`1[System.Int32] 3 | """ 4 | import System.Linq 5 | 6 | type = (1, 2).ToList().GetType() 7 | print type -------------------------------------------------------------------------------- /tests/testcases/integration/modules/import-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | System.Text.StringBuilder 3 | """ 4 | import System 5 | import System.Text 6 | 7 | Console.Write(StringBuilder().GetType()) 8 | -------------------------------------------------------------------------------- /tests/testcases/integration/primitives/typeof-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | System.String 3 | Boo.Lang.List 4 | 5 | """ 6 | print(typeof(string).ToString()) 7 | print(typeof(List).ToString()) 8 | 9 | -------------------------------------------------------------------------------- /tests/testcases/macros/then-can-be-used-as-macro-name.boo: -------------------------------------------------------------------------------- 1 | """ 2 | something happens 3 | """ 4 | macro then(what as string): 5 | yield [| print $what |] 6 | 7 | then "something happens" 8 | -------------------------------------------------------------------------------- /tests/testcases/net2/errors/BCE0138-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0138-1.boo(7,11): BCE0138: 'Foo' is not a generic definition. 3 | """ 4 | class Foo: 5 | pass 6 | 7 | foo = Foo of string() 8 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/and-or-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = ((false and true) or true) 3 | b = (false or (true and true)) 4 | """ 5 | a = false and true or true 6 | b = false or true and true 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/import-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | import Gtk from 'gtk-sharp' 3 | import FooBar from 'foo-bar' 4 | """ 5 | import Gtk from "gtk-sharp" 6 | import FooBar from 'foo-bar' 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/return-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | def foo(a): 3 | return true if (a is null) 4 | return false 5 | """ 6 | def foo(a): 7 | return true if a is null 8 | return false 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/struct-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | struct Size: 3 | 4 | Width as int 5 | 6 | Height as int 7 | """ 8 | struct Size: 9 | Width as int 10 | Height as int 11 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/comments-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | print(('foo' + 'bar')) 3 | """ 4 | /* 5 | a multiline 6 | comment 7 | */ 8 | print("foo" + /*other /*nested*/*/ "bar") 9 | 10 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/import-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | import Gtk from 'gtk-sharp' 3 | import FooBar from 'foo-bar' 4 | """ 5 | import Gtk from 'gtk-sharp' 6 | import FooBar from 'foo-bar' 7 | 8 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/interpolation-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | "2 + 2 is \$(2 + 2)" 3 | "\$((3 * 2) - 1) should be \$(5)" 4 | """ 5 | "2 + 2 is ${(2 + 2)}" 6 | "${((3 * 2) - 1)} should be ${5}" 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/return-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | def foo(a): 3 | return if (a is null) 4 | return 5 | """ 6 | def foo(a): 7 | return if (a is null) 8 | return 9 | end 10 | 11 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-949-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | ok 3 | """ 4 | def Method[of T](x as string): 5 | pass 6 | 7 | def Method[of T,U](y as string): 8 | pass 9 | 10 | print "ok" 11 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-958-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | compiled successfully 3 | """ 4 | 5 | interface IFoo[of T]: 6 | def Bar(ref i as T) 7 | 8 | print "compiled successfully" 9 | 10 | -------------------------------------------------------------------------------- /tests/testcases/regression/for-re-Split.boo: -------------------------------------------------------------------------------- 1 | """ 2 | foo bar 3 | """ 4 | def lines(s as string): 5 | for line in /\n/.Split(s): 6 | yield line 7 | 8 | print join(lines("foo\nbar")) 9 | -------------------------------------------------------------------------------- /tests/testcases/stdlib/list-indexof-2.boo: -------------------------------------------------------------------------------- 1 | a = [5, 4, 3, 2, 1] 2 | 3 | assert 0 == a.IndexOf({ item as int | return item > 3 }) 4 | assert 3 == a.IndexOf({ item as int | return item < 3 }) 5 | -------------------------------------------------------------------------------- /tests/testcases/warnings/no-unreacheable-code-warning-for-compiler-generated-code.boo: -------------------------------------------------------------------------------- 1 | """ 2 | """ 3 | def test(*i): 4 | for j in i: return true 5 | return false 6 | 7 | test 1, 2, 3 8 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/csccbug.cs: -------------------------------------------------------------------------------- 1 | // wh: bug(?) in DotGNU 0.6 - "using antlr" will workaround the problem. 2 | #if __CSCC__ 3 | using antlr; 4 | #else 5 | class Dummy {} 6 | #endif 7 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/imagNodeAST/test.in: -------------------------------------------------------------------------------- 1 | { 2 | 3 | i = 3; 4 | 5 | if ( 6 ) j = 7; else j = 8; 6 | 7 | while ( 9 ) { 8 | 9 | k = j; 10 | 11 | } 12 | 13 | } 14 | 15 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/tinybasic/GlobalScope.java: -------------------------------------------------------------------------------- 1 | package tinybasic; 2 | 3 | class GlobalScope extends Scope{ 4 | public GlobalScope(Scope prev){ 5 | super(prev); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /tests/testcases/compilation/enumeratoritemtype0.boo: -------------------------------------------------------------------------------- 1 | """ 2 | FOO 3 | BAR 4 | """ 5 | for s in System.IO.StringReader("foo\nbar"): 6 | print(s.ToUpper()) # s is declared as System.String 7 | -------------------------------------------------------------------------------- /tests/testcases/compilation/match1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Doesn't 3 | 4 | """ 5 | pattern = "^Bambo$" 6 | print("Bamboo") if "Bamboo" =~ pattern 7 | print("Doesn't") if "Bamboo" !~ pattern 8 | 9 | -------------------------------------------------------------------------------- /tests/testcases/ducky/ducky-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 56 3 | """ 4 | items = (42, "foo", 14) 5 | total = 0 6 | for item in items: 7 | total += item if item isa int 8 | print total 9 | 10 | -------------------------------------------------------------------------------- /tests/testcases/ducky/ducky-8.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 2 3 | 4 4 | 4 5 | 1 6 | """ 7 | 8 | d as duck = [1, 2, 3, 4] 9 | print d[1] 10 | print d[3] 11 | print d[-1] 12 | print d[-4] 13 | -------------------------------------------------------------------------------- /tests/testcases/ducky/method-dispatch-10.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 42 3 | """ 4 | class Foo: 5 | static def bar(): 6 | return 42 7 | 8 | 9 | f as duck = Foo() 10 | print f.bar() 11 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0083-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0083-1.boo(5,23): BCE0083: Static constructors must be private. 3 | """ 4 | class Foo: 5 | public static def constructor(): 6 | pass 7 | 8 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0085-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0085-1.boo(7,5): BCE0085: Cannot create instance of abstract class 'Foo'. 3 | """ 4 | abstract class Foo: 5 | pass 6 | 7 | f = Foo() 8 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0134-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0134-1.boo(5,9): BCE0134: 'Foo.constructor' cannot return values. 3 | """ 4 | class Foo: 5 | def constructor() as int: 6 | pass 7 | 8 | -------------------------------------------------------------------------------- /tests/testcases/errors/selective-import-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | selective-import-2.boo(4,15): BCE0019: 'NoWayThisNameIsThere' is not a member of 'System'. 3 | """ 4 | import System(NoWayThisNameIsThere) 5 | -------------------------------------------------------------------------------- /tests/testcases/integration/arrays/arrays-21.boo: -------------------------------------------------------------------------------- 1 | 2 | 3 | a = array(i*2 for i in range(3)) 4 | assert a.GetType() is typeof((int)) 5 | 6 | assert 2 == a[-1]-a[-2] 7 | assert -2 == a[-2]-a[-1] 8 | -------------------------------------------------------------------------------- /tests/testcases/integration/arrays/arrays-7.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Person[][] 3 | """ 4 | class Person: 5 | pass 6 | 7 | items = ((Person(), Person()), (Person(),)) 8 | print(items.GetType()) 9 | -------------------------------------------------------------------------------- /tests/testcases/integration/callables/callables-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | FOO 3 | """ 4 | def ToUpper(s as string): 5 | return s.ToUpper() 6 | 7 | a = ToUpper 8 | print(a("foo")) 9 | 10 | -------------------------------------------------------------------------------- /tests/testcases/integration/closures/closures-5.boo: -------------------------------------------------------------------------------- 1 | 2 | predicate = { item as int | return 0 == item % 2 } 3 | 4 | assert predicate(2) 5 | assert not predicate(3) 6 | assert predicate(4) 7 | 8 | -------------------------------------------------------------------------------- /tests/testcases/integration/generators/list-generators-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 3 | 4 4 | 8 5 | 12 6 | 16 7 | """ 8 | print(join([i*2 for i in range(10) if 0 == i % 2], "\n")) 9 | 10 | -------------------------------------------------------------------------------- /tests/testcases/integration/meta-programming/interpolation-splicing-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | print "\$(42)" 3 | """ 4 | foo = [| 42 |] 5 | code = [| print "${$foo}" |] 6 | print code.ToCodeString() 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/meta-programming/interpolation-splicing-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | print "\$(42)" 3 | """ 4 | foo = [| 42 |] 5 | code = [| print "${$(foo)}" |] 6 | print code.ToCodeString() 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/primitives/double-precision-is-used-for-literals.boo: -------------------------------------------------------------------------------- 1 | """ 2 | -4.42330604244772 3 | """ 4 | e as double = -4.42330604244772 5 | print System.Convert.ToString(e) 6 | 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/for-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Item 1 3 | Item 2 4 | 5 | """ 6 | 7 | for item as string in List().Add(" 1 ").Add(" 2 "): 8 | print("Item ${item.Trim()}") 9 | -------------------------------------------------------------------------------- /tests/testcases/net2/generics/generic-field-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 42 3 | """ 4 | class Container[of T]: 5 | public value as T 6 | 7 | c = Container[of int](value: 21) 8 | print c.value * 2 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/arrays-6.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a1 = (of int: 1, 2, 3) 3 | a2 = (of string: 'foo', 'bar') 4 | """ 5 | a1 = (of int: 1, 2, 3) 6 | a2 = (of string: "foo", "bar") 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/ast-literal-varargs-method.boo: -------------------------------------------------------------------------------- 1 | """ 2 | code = [| 3 | def foo(*args): 4 | pass 5 | |] 6 | """ 7 | code = [| 8 | def foo(*args): 9 | pass 10 | |] 11 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/closures-18.boo: -------------------------------------------------------------------------------- 1 | """ 2 | i = 3 3 | a = def (): 4 | raise 'uh, oh...' if (i < 2) 5 | print(i) 6 | """ 7 | i = 3 8 | a = { raise "uh, oh..." if i < 2; print(i) } 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/comments-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | print(('foo' + 'bar')) 3 | """ 4 | /* 5 | a multiline 6 | comment 7 | */ 8 | print("foo" + /*other /*nested*/*/ "bar") 9 | 10 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/expressions-4.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = ((1 | (2 & 3)) | 2) 3 | a = (Foo.Spam | (Foo.Eggs & Foo.All)) 4 | """ 5 | a = 1 | 2 & 3 | 2 6 | a = Foo.Spam | Foo.Eggs & Foo.All 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/line-continuation-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a, b, c = (1, 2, 3) 3 | d, e, f = (4, 5, 6) 4 | """ 5 | a, b, \ 6 | c = 1, 2, 3 7 | 8 | d, e, \ 9 | f = 4, 5, 6 10 | 11 | -------------------------------------------------------------------------------- /tests/testcases/parser/simple_global_defs.boo: -------------------------------------------------------------------------------- 1 | namespace Math 2 | 3 | class Rational: 4 | pass 5 | 6 | def pi() as single: 7 | pass 8 | 9 | def rationalPI() as Rational: 10 | pass 11 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/and-or-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = ((false and true) or true) 3 | b = (false or (true and true)) 4 | """ 5 | a = ((false and true) or true) 6 | b = (false or (true and true)) 7 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-189-1.boo: -------------------------------------------------------------------------------- 1 | import System.Drawing from System.Drawing 2 | 3 | s as Size 4 | s.Width = 100 5 | s.Height = 200 6 | assert 100 == s.Width 7 | assert 200 == s.Height 8 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-248-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 9.2 3 | """ 4 | x as decimal = 2.5 5 | d as duck = x 6 | print cast(decimal, 6.7 + d).ToString(System.Globalization.CultureInfo.InvariantCulture) 7 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-372-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Pointers.Foo(int&) 3 | """ 4 | import BooCompiler.Tests.SupportingClasses 5 | 6 | value = 3 7 | 8 | p = Pointers() 9 | p.Foo(value) 10 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-725-1.boo: -------------------------------------------------------------------------------- 1 | enum E: 2 | a 3 | b 4 | c 5 | 6 | def check(val as System.Enum): 7 | assert val != null 8 | assert E.a.Equals(val) 9 | 10 | check(E.a) 11 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-979-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Param 3 | """ 4 | class Param: 5 | pass 6 | 7 | c = (Param(),) 8 | d = System.Array.AsReadOnly[of Param](c) 9 | 10 | print d[0].GetType() -------------------------------------------------------------------------------- /tests/testcases/stdlib/join-1.boo: -------------------------------------------------------------------------------- 1 | assert "0 1 2" == join(range(3)) 2 | assert "0, 1, 2", join(range(3), ", ") 3 | assert "0:1:2", join(range(3), ":") 4 | assert "0:1:2", join(range(3), ":"[0]) 5 | -------------------------------------------------------------------------------- /tests/testcases/stdlib/list-sort-1.boo: -------------------------------------------------------------------------------- 1 | 2 | 3 | l = [2, 4, 3, 5, 1] 4 | assert l.Sort() == [1, 2, 3, 4, 5] 5 | assert l.Sort({ lhs as int, rhs as int | return rhs - lhs }) == [5, 4, 3, 2, 1] 6 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/antlr/debug/NewLineListener.java: -------------------------------------------------------------------------------- 1 | package antlr.debug; 2 | 3 | public interface NewLineListener extends ListenerBase { 4 | 5 | 6 | public void hitNewLine(NewLineEvent e); 7 | } 8 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/heteroAST/shiplist: -------------------------------------------------------------------------------- 1 | calc.g 2 | Main.java 3 | test.in 4 | BinaryOperatorAST.java 5 | CalcAST.java 6 | INTNode.java 7 | MULTNode.java 8 | PLUSNode.java 9 | 10 | 11 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/pascal/ScalarType.java: -------------------------------------------------------------------------------- 1 | /** Predefined scalar type */ 2 | import java.io.*; 3 | 4 | public class ScalarType extends TypeSpecifier implements Serializable { 5 | } 6 | -------------------------------------------------------------------------------- /tests/testcases/compilation/InternalArrayType.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Foo[] 3 | """ 4 | class Foo: 5 | Foos as (Foo): 6 | get: return array(Foo, 0) 7 | 8 | print Foo().Foos 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0005-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0005-2.boo(8,7): BCE0005: Unknown identifier: 'local'. 3 | """ 4 | block = do (): 5 | local = "foo" 6 | print(local) 7 | 8 | print(local) 9 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0022-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0022-2.boo(7,20): BCE0022: Cannot convert 'int' to 'string'. 3 | """ 4 | class Person: 5 | Name as string: 6 | get: 7 | return 3 8 | 9 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0060-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0060-1.boo(5,18): BCE0060: 'Foo.Bar()': no suitable method found to override. 3 | """ 4 | class Foo: 5 | override def Bar(): 6 | pass 7 | 8 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0063-5.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0063-5.boo(8,5): BCE0063: No enclosing loop out of which to break or continue. 3 | """ 4 | i = 0 5 | while i < 3: 6 | pass 7 | or: 8 | break 9 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0093-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0093-1.boo(4,6): BCE0093: Cannot branch into ensure block. 3 | """ 4 | goto label 5 | try: 6 | pass 7 | ensure: 8 | :label 9 | 10 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0121-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0121-1.boo(6,16): BCE0121: 'super' is not valid in this context. 3 | """ 4 | class Foo: 5 | override def ToString(): 6 | return super + "foo" 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/arrays/arrays-8.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 1, um 3 | 2, dois 4 | """ 5 | numbers = (1, 2) 6 | text = ("um", "dois") 7 | for n, t in zip(numbers, text): 8 | print("${n}, ${t}") 9 | -------------------------------------------------------------------------------- /tests/testcases/integration/operators/unary-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 1 3 3 3 | """ 4 | a = (1, 2, 3) 5 | index = 0 6 | assert 3 == ++a[++index] 7 | assert 1 == index 8 | print join(a) 9 | 10 | -------------------------------------------------------------------------------- /tests/testcases/integration/primitives/list-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 3 | 1 4 | 5 | """ 6 | import System.Console 7 | 8 | l = [] 9 | WriteLine(l.Count) 10 | WriteLine(l.Add("foo").Count) 11 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/break-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 3 | 1 4 | 2 5 | 3 6 | 4 7 | 5 8 | """ 9 | i = 0 10 | while i < 10: 11 | print(i) 12 | if ++i > 5: 13 | break 14 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/break-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | ensured 3 | """ 4 | while true: 5 | try: 6 | break 7 | raise "never got here" 8 | ensure: 9 | print("ensured") 10 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/goto-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | before 3 | after 4 | """ 5 | print('before') 6 | goto end 7 | print('skipped') 8 | :end 9 | print('after') 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/while-6.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 3 | 1 4 | 2 5 | """ 6 | a = null 7 | i = 0 8 | while a is null: 9 | print i 10 | ++i 11 | a = object() if i > 2 12 | -------------------------------------------------------------------------------- /tests/testcases/integration/types/classes-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | homer 3 | 4 | """ 5 | class Person: 6 | def constructor(fname as string): 7 | print(fname) 8 | 9 | Person("homer") 10 | -------------------------------------------------------------------------------- /tests/testcases/net2/generics/generic-inheritance-1.boo: -------------------------------------------------------------------------------- 1 | class xList[of T](List[of T]): 2 | pass 3 | 4 | l = xList[of int]() 5 | l.Add(42) 6 | 7 | assert 42 == l[0] 8 | assert 42 == l[-1] 9 | -------------------------------------------------------------------------------- /tests/testcases/net2/generics/internal-generic-type-1.boo: -------------------------------------------------------------------------------- 1 | public class GenericType[of T]: 2 | pass 3 | 4 | assert typeof(GenericType of *).MakeGenericType(int) == typeof(GenericType of int) 5 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/ast-literal-enum.boo: -------------------------------------------------------------------------------- 1 | """ 2 | e = [| 3 | enum Foo: 4 | 5 | Bar 6 | |] 7 | """ 8 | e = [| 9 | enum Foo: 10 | 11 | Bar 12 | end 13 | |] 14 | 15 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/attributes-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | [module: M] 3 | [assembly: Foo(true)] 4 | [assembly: Bar(Spam: 1)] 5 | """ 6 | [assembly: Foo(true)] 7 | [assembly: Bar(Spam: 1)] 8 | [module: M] 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/closures-22.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = { return } 3 | foo({ return }) 4 | bar({ return }) 5 | """ 6 | a = def (): 7 | end 8 | 9 | foo(): 10 | end 11 | 12 | bar({ return }) 13 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/declarations-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | i as long = [1, 2, 3].IndexOf({ item as int | return (item > 2) }) 3 | """ 4 | i as long = [1, 2, 3].IndexOf({ item as int | return (item > 2) }) 5 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/expressions-4.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = ((1 | (2 & 3)) | 2) 3 | a = (Foo.Spam | (Foo.Eggs & Foo.All)) 4 | """ 5 | a = ((1 | (2 & 3)) | 2) 6 | a = (Foo.Spam | (Foo.Eggs & Foo.All)) 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/macros-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | assert true 3 | assert "Como? \$(2 + 2) != \$(4)???", 4 == (2 + 2) 4 | 5 | """ 6 | assert true 7 | assert "Como? ${(2 + 2)} != ${4}???", 4 == (2 + 2) 8 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-338-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | ok 3 | """ 4 | def foo(): 5 | msg as string 6 | try: 7 | pass 8 | ensure: 9 | msg = "ok" 10 | return msg 11 | 12 | print foo() 13 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-770-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | -1 3 | """ 4 | class Bug: 5 | [property(Id)] _id = 0 6 | 7 | static def Load(): 8 | return Bug(Id: -1) 9 | 10 | print Bug.Load().Id 11 | -------------------------------------------------------------------------------- /tests/testcases/semantics/enum0.boo: -------------------------------------------------------------------------------- 1 | """ 2 | public enum SomeValues: 3 | 4 | Foo = 0 5 | 6 | Bar = 2 7 | 8 | Baz = 3 9 | """ 10 | enum SomeValues: 11 | Foo 12 | Bar = 2 13 | Baz 14 | -------------------------------------------------------------------------------- /extras/template.config.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | @SUPPORTEDVERSIONS@ 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/csharp/heteroAST/shiplist: -------------------------------------------------------------------------------- 1 | calc.g 2 | Main.java 3 | test.in 4 | BinaryOperatorAST.java 5 | CalcAST.java 6 | INTNode.java 7 | MULTNode.java 8 | PLUSNode.java 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/testcases/ducky/ducky-9.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 2 3 | 4 4 | 4 5 | 1 6 | """ 7 | 8 | d as duck = [1, 2, 3, 4] 9 | print d[1] 10 | print d.Item[3] 11 | print d[-1] 12 | print d.Item[-4] 13 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0018-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0018-1.boo(4,11): BCE0018: The name 'Bar' does not denote a valid type ('not found'). 3 | """ 4 | class Foo(Bar): 5 | def constructor(): 6 | pass 7 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0063-6.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0063-6.boo(8,5): BCE0063: No enclosing loop out of which to break or continue. 3 | """ 4 | i = 0 5 | while i < 3: 6 | pass 7 | or: 8 | continue 9 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0063-7.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0063-7.boo(8,5): BCE0063: No enclosing loop out of which to break or continue. 3 | """ 4 | i = 0 5 | while i < 3: 6 | pass 7 | then: 8 | break 9 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0063-8.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0063-8.boo(8,5): BCE0063: No enclosing loop out of which to break or continue. 3 | """ 4 | i = 0 5 | while i < 3: 6 | pass 7 | then: 8 | continue 9 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0084-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0084-1.boo(5,16): BCE0084: Static constructors cannot declare parameters. 3 | """ 4 | class Foo: 5 | static def constructor(param): 6 | pass 7 | 8 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0089-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0089-1.boo(7,9): BCE0089: Type 'Foo' already has a definition for 'bar'. 3 | """ 4 | class Foo: 5 | bar as object 6 | 7 | def bar(): 8 | pass 9 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0089-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0089-3.boo(7,11): BCE0089: Type 'Foo' already has a definition for 'bar'. 3 | """ 4 | class Foo: 5 | bar as object 6 | 7 | class bar: 8 | pass 9 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0103-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0103-2.boo(7,11): BCE0103: Cannot extend final type 'Foo'. 3 | """ 4 | class Foo(System.ValueType): 5 | pass 6 | 7 | class Bar(Foo): 8 | pass 9 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0126-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0126-1.boo(7,8): BCE0126: It is not possible to evaluate an expression of type 'void'. 3 | """ 4 | def foo() as void: 5 | pass 6 | 7 | i = foo() 8 | -------------------------------------------------------------------------------- /tests/testcases/errors/cannot-convert-enum-to-single.boo: -------------------------------------------------------------------------------- 1 | """ 2 | cannot-convert-enum-to-single.boo(7,17): BCE0022: Cannot convert 'E' to 'single'. 3 | """ 4 | enum E: 5 | E0 6 | 7 | s as single = E.E0 8 | -------------------------------------------------------------------------------- /tests/testcases/integration/arrays/arrays-14.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 4 3 | 7 4 | 8 5 | """ 6 | a = ((1, 2), (3, 4), (5, 6), (7, 8)) 7 | 8 | print(a[1][-1]) 9 | print(a[-1][0]) 10 | print(a[3][1]) 11 | -------------------------------------------------------------------------------- /tests/testcases/integration/arrays/arrays-20.boo: -------------------------------------------------------------------------------- 1 | 2 | 3 | a = array(range(3)) 4 | assert a.GetType() is System.Type.GetType("System.Int32[]") 5 | 6 | assert 1 == a[-1]-a[-2] 7 | assert -1 == a[-2]-a[-1] 8 | -------------------------------------------------------------------------------- /tests/testcases/integration/generators/generator-of-static-class-is-transient.boo: -------------------------------------------------------------------------------- 1 | """ 2 | """ 3 | static class Bar: 4 | def foo(): 5 | yield 42 6 | 7 | assert not Bar.foo().GetType().IsSerializable 8 | -------------------------------------------------------------------------------- /tests/testcases/integration/modules/import-4.boo: -------------------------------------------------------------------------------- 1 | """ 2 | System.Drawing.Point 3 | """ 4 | import System 5 | import System.Drawing from System.Drawing 6 | 7 | Console.Write(Point(0, 0).GetType()) 8 | -------------------------------------------------------------------------------- /tests/testcases/integration/operators/post-incdec-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 3 | 1 4 | 2 5 | 2 6 | 1 7 | """ 8 | i = 0 9 | print i++ 10 | print i++ 11 | print i 12 | print i-- 13 | print i 14 | -------------------------------------------------------------------------------- /tests/testcases/integration/operators/slicing-5.boo: -------------------------------------------------------------------------------- 1 | """ 2 | third 3 | second 4 | first 5 | """ 6 | l = ["first", "second", "third"] 7 | print(l[-1]) 8 | print(l[-2]) 9 | print(l[-3]) 10 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/declaration-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Hello 3 | """ 4 | for item in [" Hello "]: 5 | itemString as string = item 6 | System.Console.Write(itemString.Trim()) 7 | 8 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/for_then-4.boo: -------------------------------------------------------------------------------- 1 | """ 2 | I have no item 3 | """ 4 | 5 | list = [] 6 | 7 | for i in list: print 'I have an item!' ; break 8 | then: print 'I have no item' 9 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/while-5.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 3 | 1 4 | 2 5 | """ 6 | a = object() 7 | i = 0 8 | while a is not null: 9 | print i 10 | ++i 11 | a = null if i > 2 12 | -------------------------------------------------------------------------------- /tests/testcases/integration/types/classes-8.boo: -------------------------------------------------------------------------------- 1 | """ 2 | it worked! 3 | """ 4 | class ClassWithoutConstructor: 5 | def run(): 6 | print("it worked!") 7 | 8 | ClassWithoutConstructor().run() 9 | -------------------------------------------------------------------------------- /tests/testcases/net2/generics/generators-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 2 3 | 4 4 | 6 5 | """ 6 | e = i * 2 for i in (1,2,3) 7 | for i in e: print i 8 | assert e isa System.Collections.Generic.IEnumerable of int 9 | -------------------------------------------------------------------------------- /tests/testcases/net2/generics/generic-array-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 3 | """ 4 | import System.Collections.Generic 5 | 6 | arr = array(List[of int], 3) 7 | arr[0] = List[of int]() 8 | print arr[0].Count 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/if_else_1.boo: -------------------------------------------------------------------------------- 1 | if gets() =~ /foo/: 2 | print("wow!") 3 | for i in ["w", "o", "w"]: 4 | print(i) 5 | if gets() =~ /bar/: 6 | print("foobar, eh?") 7 | else: 8 | print("nah?") 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/bool-literals-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | def odd(n): 3 | return false if (n % 2) 4 | return true 5 | 6 | """ 7 | def odd(n): 8 | return false if n % 2 9 | return true 10 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/macros-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | assert true 3 | assert "Como? \$(2 + 2) != \$(4)???", 4 == (2 + 2) 4 | 5 | """ 6 | assert true 7 | assert "Como? ${2 + 2} != ${4}???", 4 == 2 + 2 8 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/method-declaration-in-macro-application.boo: -------------------------------------------------------------------------------- 1 | """ 2 | myclass Foo: 3 | override def ToString(): 4 | pass 5 | """ 6 | myclass Foo: 7 | override def ToString(): 8 | pass 9 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/ast-literal-varargs-method.boo: -------------------------------------------------------------------------------- 1 | """ 2 | code = [| 3 | def foo(*args): 4 | pass 5 | |] 6 | """ 7 | code = [| 8 | def foo(*args): 9 | end 10 | |] 11 | 12 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/declarations-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | i as callable = { print 'foo' } 3 | j as callable = { print 'bar' } 4 | """ 5 | i as callable = { print 'foo' } 6 | j as callable = { print 'bar' } 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/internal-generic-callable-type-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | public callable GenericCallable[of TIn, TOut](TIn) as TOut 3 | """ 4 | public callable GenericCallable[of TIn, TOut](TIn) as TOut 5 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/timespan-literals-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | ms = 10ms 3 | s = 10s 4 | m = 10m 5 | h = 1h 6 | d = 2d 7 | 8 | """ 9 | ms = 10ms 10 | s = 10s 11 | m = 10m 12 | h = 1h 13 | d = 2d 14 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-1288.boo: -------------------------------------------------------------------------------- 1 | """ 2 | done 3 | """ 4 | import System 5 | 6 | def fun(): 7 | print "done" 8 | return 9 | x = 2 10 | Array.Find((1,2,3),{q|q==x}) 11 | 12 | fun() 13 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-913-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | True 3 | """ 4 | import Builtins 5 | 6 | class Builtins: 7 | static def DoIt(): 8 | return true 9 | 10 | a = DoIt() 11 | print(a) 12 | 13 | -------------------------------------------------------------------------------- /tests/testcases/stdlib/reversed-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 9 7 5 3 1 3 | r a b o o f 4 | """ 5 | 6 | odd = i for i in range(10) if i % 2 7 | print join(reversed(odd)) 8 | 9 | print join(reversed("foobar")) 10 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/pascal/Unit.java: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | 3 | public class Unit extends Symbol implements Serializable { 4 | public Unit(String name) { 5 | super(name); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/lib/cpp/scripts/cr_stripper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | for f in antlr/*.hpp src/*.cpp; do 3 | cat "$f" | tr -d "\r" > $$ 4 | cmp -s $$ "$f" || (p4 edit "$f" && mv $$ "$f" && echo "$f Fixed") 5 | done 6 | -------------------------------------------------------------------------------- /tests/BooCompiler.Tests/SupportingClasses/ByteEnum.cs: -------------------------------------------------------------------------------- 1 | namespace BooCompiler.Tests.SupportingClasses 2 | { 3 | public enum ByteEnum : byte 4 | { 5 | Foo = 1, 6 | Bar = 2, 7 | Baz = 4 8 | } 9 | } -------------------------------------------------------------------------------- /tests/testcases/ducky/object-overloads-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 05/21/2007 22:40:05 3 | 05/21/2007 4 | """ 5 | o as duck = date(2007, 5, 21, 22, 40, 5) 6 | print o.ToString() 7 | print o.ToString("MM/dd/yyyy") 8 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0018-4.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0018-4.boo(4,11): BCE0018: The name 'Bar' does not denote a valid type ('not found'). 3 | """ 4 | class Foo(Bar of int): 5 | def constructor(): 6 | pass 7 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0082-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0082-1.boo(6,20): BCE0082: 'string' is not a callable type. Event type must be a callable type. 3 | """ 4 | class Button: 5 | 6 | event Click as string 7 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0085-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0085-3.boo(8,5): BCE0085: Cannot create instance of abstract class 'Foo'. 3 | """ 4 | class Foo: 5 | abstract def Bar(): 6 | pass 7 | 8 | f = Foo() 9 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0089-4.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0089-4.boo(7,15): BCE0089: Type 'Foo' already has a definition for 'bar'. 3 | """ 4 | class Foo: 5 | bar as object 6 | 7 | interface bar: 8 | pass 9 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0089-7.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0089-7.boo(10,5): BCE0089: Type 'Foo' already has a definition for 'bar'. 3 | """ 4 | enum Foo: 5 | 6 | bar 7 | 8 | foo 9 | 10 | bar 11 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0155-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0155-1.boo(7,14): BCE0155: Instantiating generic parameters is not yet supported. 3 | """ 4 | 5 | class Foo[of T]: 6 | def Bar(ref i as T): 7 | i = T() 8 | 9 | -------------------------------------------------------------------------------- /tests/testcases/integration/callables/callables-4.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 2 4 6 8 3 | """ 4 | def even(value): 5 | return 0 == cast(int, value) % 2 6 | 7 | l = List(range(10)) 8 | print(join(l.Collect(even))) 9 | -------------------------------------------------------------------------------- /tests/testcases/integration/callables/method-as-macro-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | not null 3 | """ 4 | def foo(block as callable()): 5 | if block is null: return 6 | print "not null" 7 | 8 | foo: 9 | pass 10 | -------------------------------------------------------------------------------- /tests/testcases/integration/closures/closures-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | before 3 | closure 4 | after 5 | """ 6 | a = def: 7 | print("closure") 8 | 9 | print("before") 10 | a() 11 | print("after") 12 | -------------------------------------------------------------------------------- /tests/testcases/integration/closures/explicit-closure-types-for-generic-method.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 1 12 42 64 3 | """ 4 | a = (42, 12, 1, 64) 5 | System.Array.Sort(a, { l as int, r as int | l - r }) 6 | print join(a) 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/duck-typing/duck-8.boo: -------------------------------------------------------------------------------- 1 | i1 as duck = 4 2 | i2 as duck = 2 3 | 4 | assert 8 == i1*i2 5 | assert 2 == i1/i2 6 | assert 2 == i1-i2 7 | assert -2 == i2-i1 8 | assert 6 == i1+i2 9 | -------------------------------------------------------------------------------- /tests/testcases/integration/generators/generators-13.boo: -------------------------------------------------------------------------------- 1 | 2 | def foo(): 3 | return i*2 for i in range(5) 4 | 5 | current = 0 6 | for i in foo(): 7 | assert current == i/2, "integer division" 8 | ++current 9 | -------------------------------------------------------------------------------- /tests/testcases/integration/modules/import-6.boo: -------------------------------------------------------------------------------- 1 | """ 2 | MyPoint(0, 0) 3 | """ 4 | import System 5 | import System.Drawing from BooCompiler.Tests 6 | 7 | System.Console.Write(Point(0, 0).ToString()) 8 | -------------------------------------------------------------------------------- /tests/testcases/integration/primitives/hash-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 1 3 | bar 4 | Boo.Lang.Hash 5 | """ 6 | d = {} 7 | d["foo"] = "bar" 8 | print(d.Count) 9 | print(d["foo"]) 10 | print(d.GetType()) 11 | -------------------------------------------------------------------------------- /tests/testcases/integration/primitives/unsigned-2.boo: -------------------------------------------------------------------------------- 1 | 2 | import BooCompiler.Tests.SupportingClasses from BooCompiler.Tests 3 | 4 | assert 28 == Person(Age: 28).Age 5 | assert 30 == Person(Age: 30L).Age 6 | -------------------------------------------------------------------------------- /tests/testcases/integration/types/interfaces-19.boo: -------------------------------------------------------------------------------- 1 | import System 2 | 3 | convertible as IConvertible = 3 4 | 5 | assert 3.0 == convertible.ToDouble(null) 6 | assert 3L == convertible.ToInt64(null) 7 | -------------------------------------------------------------------------------- /tests/testcases/net2/generics/array-enumerable-1.boo: -------------------------------------------------------------------------------- 1 | import System.Collections.Generic 2 | 3 | a as IEnumerable of int 4 | a = (1,2,3,4) 5 | 6 | assert a isa IEnumerable of int 7 | assert a isa (int) 8 | -------------------------------------------------------------------------------- /tests/testcases/net2/generics/internal-generic-type-3.boo: -------------------------------------------------------------------------------- 1 | public struct GenericStruct[of T]: 2 | Field as T 3 | 4 | assert typeof(GenericStruct of *).MakeGenericType(int) == typeof(GenericStruct of int) 5 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/closures-14.boo: -------------------------------------------------------------------------------- 1 | """ 2 | def foo(): 3 | return { print('foo') } 4 | 5 | print(foo()()) 6 | """ 7 | def foo(): 8 | return { print('foo') } 9 | 10 | print(foo()()) 11 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/closures-5.boo: -------------------------------------------------------------------------------- 1 | """ 2 | c1 = { item | print(item) } 3 | c2 = { item as int | print((item * 2)) } 4 | """ 5 | c1 = { item | print(item) } 6 | c2 = { item as int | print(item*2) } 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/declarations-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | i as long = [1, 2, 3].IndexOf({ item as int | return (item > 2) }) 3 | """ 4 | i as long = [1, 2, 3].IndexOf() do (item as int): 5 | return item > 2 6 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/closures-5.boo: -------------------------------------------------------------------------------- 1 | """ 2 | c1 = { item | print(item) } 3 | c2 = { item as int | print((item * 2)) } 4 | """ 5 | c1 = { item | print(item) } 6 | c2 = { item as int | print((item * 2)) } 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/closures-9.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = null 3 | b = iif((a is null), { return '' }, { return a.ToString() }) 4 | """ 5 | a = null 6 | b = iif((a is null), { return '' }, { return a.ToString() }) 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/return-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | def foo(a): 3 | return true if (a is null) 4 | return false 5 | """ 6 | def foo(a): 7 | return true if (a is null) 8 | return false 9 | end 10 | 11 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/struct-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | struct Size: 3 | 4 | Width as int 5 | 6 | Height as int 7 | """ 8 | struct Size: 9 | 10 | Width as int 11 | 12 | Height as int 13 | end 14 | 15 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-1127-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 2 3 | """ 4 | 5 | class Test: 6 | public static final X as int = 1 7 | 8 | static def constructor(): 9 | X = 2 10 | 11 | print Test.X 12 | 13 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-301-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 1 3 | 2 4 | """ 5 | i = 0 6 | while i < 2: 7 | ++i 8 | j = 1 9 | while j < 3: 10 | ++j 11 | break 12 | break 13 | 14 | print i 15 | print j 16 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-441-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | only once 3 | 0 0 1 0 4 | """ 5 | def foo(): 6 | print "only once" 7 | return 2 8 | 9 | a = array(int, 4) 10 | a[foo()] += 1 11 | print join(a) 12 | -------------------------------------------------------------------------------- /tests/testcases/stdlib/cat-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 1 2 3 4 5 6 3 | 1 2 3 4 5 6 7 8 9 4 | """ 5 | 6 | a = 1, 2, 3 7 | b = 4, 5, 6 8 | c = 7, 8, 9 9 | 10 | print join(cat(a, b)) 11 | print join(cat(a, b, c)) 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /build.properties 2 | build 3 | ide-build 4 | test-results 5 | *.pidb 6 | *.suo 7 | *.user 8 | _ReSharper* 9 | *.iml 10 | *.ipr 11 | *.iws 12 | .gradle 13 | .DS_Store 14 | gradle.properties 15 | -------------------------------------------------------------------------------- /tests/BooCompiler.Tests/SupportingClasses/SByteEnum.cs: -------------------------------------------------------------------------------- 1 | namespace BooCompiler.Tests.SupportingClasses 2 | { 3 | public enum SByteEnum : sbyte 4 | { 5 | Foo = -1, 6 | Bar = -2, 7 | Baz = -4 8 | } 9 | } -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0005-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0005-1.boo(9,11): BCE0005: Unknown identifier: 'local'. 3 | """ 4 | def foo(): 5 | local = "foo" 6 | bar() 7 | 8 | def bar(): 9 | print(local) 10 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0051-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0051-1.boo(4,11): BCE0051: Operator '^' cannot be used with a left hand side of type 'double' and a right hand side of type 'double'. 3 | """ 4 | print 3.0 ^ 1.1 5 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0063-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0063-3.boo(7,9): BCE0063: No enclosing loop out of which to break or continue. 3 | """ 4 | i = 0 5 | while i < 3: 6 | f = def (): 7 | continue 8 | ++i 9 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0073-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0073-1.boo(5,18): BCE0073: Abstract method 'Foo.Bar()' cannot have a body. 3 | """ 4 | class Foo: 5 | abstract def Bar(): 6 | print("shouldn't be here!") 7 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0089-5.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0089-5.boo(7,11): BCE0089: Type 'Foo' already has a definition for 'bar'. 3 | """ 4 | class Foo: 5 | bar as object 6 | 7 | event bar as System.EventHandler 8 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0107-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0107-1.boo(5,9): BCE0107: Value types cannot declare parameter-less constructors. 3 | """ 4 | class Foo(System.ValueType): 5 | def constructor(): 6 | pass 7 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0126-4.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0126-4.boo(7,13): BCE0126: It is not possible to evaluate an expression of type 'void'. 3 | """ 4 | def foo() as void: 5 | pass 6 | 7 | print "${foo()}" 8 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0126-6.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0126-6.boo(7,10): BCE0126: It is not possible to evaluate an expression of type 'void'. 3 | """ 4 | def foo() as void: 5 | pass 6 | 7 | print foo() == true 8 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0128-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0128-1.boo(4,1): BCE0128: 'try' block must be followed by at least one 'except' block or either a 'failure' or 'ensure' block. 3 | """ 4 | try: 5 | print '!' 6 | -------------------------------------------------------------------------------- /tests/testcases/integration/callables/callables-43.boo: -------------------------------------------------------------------------------- 1 | 2 | 3 | a = { item | return item.ToString() }, { item as string | return item.ToUpper() } 4 | 5 | assert "3" == a[0](3) 6 | assert "FOO" == a[-1]("foo") 7 | -------------------------------------------------------------------------------- /tests/testcases/integration/closures/closures-27.boo: -------------------------------------------------------------------------------- 1 | a = 0 2 | f1 = def (): 3 | a = 5 4 | return { return a } 5 | 6 | f = f1() 7 | assert f is not null 8 | assert 5 == f() 9 | assert 5 == a 10 | -------------------------------------------------------------------------------- /tests/testcases/integration/operators/post-incdec-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 1 3 | 2 4 | 1 5 | 0 6 | """ 7 | i = 0 8 | i++ 9 | print i 10 | i++ 11 | print i 12 | i-- 13 | print i 14 | i-- 15 | print i 16 | -------------------------------------------------------------------------------- /tests/testcases/integration/operators/post-incdec-7.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 3 | 1 4 | 2 5 | 2 6 | 1 7 | """ 8 | i = decimal.Zero 9 | print i++ 10 | print i++ 11 | print i 12 | print i-- 13 | print i 14 | -------------------------------------------------------------------------------- /tests/testcases/integration/operators/slicing-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 3 3 | 2 4 | 1 5 | """ 6 | import System.Console 7 | 8 | a = (1, 2, 3) 9 | WriteLine(a[2]) 10 | WriteLine(a[1]) 11 | WriteLine(a[0]) 12 | -------------------------------------------------------------------------------- /tests/testcases/integration/operators/slicing-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 3 3 | 2 4 | 1 5 | """ 6 | import System.Console 7 | 8 | a = [1, 2, 3] 9 | WriteLine(a[2]) 10 | WriteLine(a[1]) 11 | WriteLine(a[0]) 12 | -------------------------------------------------------------------------------- /tests/testcases/integration/operators/slicing-8.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Matz 3 | Guido 4 | """ 5 | a = ("ruby", "python") 6 | a[0] = "Matz" 7 | a[-1] = "Guido" 8 | print(a[0]) 9 | print(a[1]) 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/continue-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 3 | 2 4 | 4 5 | 6 6 | 8 7 | 10 8 | """ 9 | i = -1 10 | while i < 10: 11 | ++i 12 | continue if i % 2 13 | print(i) 14 | 15 | -------------------------------------------------------------------------------- /tests/testcases/integration/types/classes-9.boo: -------------------------------------------------------------------------------- 1 | """ 2 | True 3 | """ 4 | class C2(C1): 5 | pass 6 | 7 | class C1: 8 | pass 9 | 10 | System.Console.Write(typeof(C2).BaseType is typeof(C1)) 11 | -------------------------------------------------------------------------------- /tests/testcases/integration/types/fields-7.boo: -------------------------------------------------------------------------------- 1 | 2 | class Foo: 3 | 4 | public spam = "spam" 5 | 6 | public eggs = 2 7 | 8 | f = Foo() 9 | assert "spam" == f.spam 10 | assert 2 == f.eggs 11 | -------------------------------------------------------------------------------- /tests/testcases/integration/types/overloading-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | ClassWithNewMethod.Method2 3 | """ 4 | import BooCompiler.Tests.SupportingClasses from BooCompiler.Tests 5 | 6 | ClassWithNewMethod().Method2() 7 | -------------------------------------------------------------------------------- /tests/testcases/net2/generics/generic-matrix-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | System.String[,] 3 | 1 4 | 2 5 | """ 6 | m = matrix[of string](1, 2) 7 | print m.GetType() 8 | for i in range(m.Rank): 9 | print m.GetLength(i) 10 | -------------------------------------------------------------------------------- /tests/testcases/net2/generics/internal-generic-type-2.boo: -------------------------------------------------------------------------------- 1 | public interface GenericInterface[of T]: 2 | pass 3 | 4 | assert typeof(GenericInterface of *).MakeGenericType(int) == typeof(GenericInterface of int) 5 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/assignment-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = (3 + 2) 3 | a += (5 * 2) 4 | a /= (-1) 5 | a *= 2 6 | a -= 3 7 | 8 | """ 9 | a = 3 + 2 10 | a += 5*2 11 | a /= -1 12 | a *= 2 13 | a -= 3 14 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/closures-20.boo: -------------------------------------------------------------------------------- 1 | """ 2 | c1 = { print 'foo' } 3 | c2 = { item | print item if (item is not null) } 4 | """ 5 | c1 = { print "foo" } 6 | c2 = { item | print item if item is not null } 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/closures-22.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = { return } 3 | foo({ return }) 4 | bar({ return }) 5 | """ 6 | a = def (): 7 | pass 8 | 9 | foo(): 10 | pass 11 | 12 | bar({ return }) 13 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/closures-9.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = null 3 | b = iif((a is null), { return '' }, { return a.ToString() }) 4 | """ 5 | a = null 6 | b = iif(a is null, { return "" }, { return a.ToString() }) 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/expressions-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | i = 0 3 | a = (3 * (++i)) 4 | b = ((--i) * 2) 5 | c = ((1 + (++i)) - 2) 6 | 7 | """ 8 | i = 0 9 | a = 3*++i 10 | b = --i*2 11 | c = 1 + ++i - 2 12 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/in-not-in-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | print(('foo' in ('foo', 'bar'))) 3 | print(('foo' not in ('foo', 'bar'))) 4 | """ 5 | print('foo' in ('foo', 'bar')) 6 | print('foo' not in ('foo', 'bar')) 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/timespan-literals-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | ms = 10ms 3 | s = 10s 4 | m = 10m 5 | h = 1h 6 | d = 2d 7 | 8 | """ 9 | ms = 10ms 10 | s = 10s 11 | m = 10m 12 | h = 1h 13 | d = 2d 14 | 15 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/assignment-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | a = (3 + 2) 3 | a += (5 * 2) 4 | a /= (-1) 5 | a *= 2 6 | a -= 3 7 | 8 | """ 9 | a = (3 + 2) 10 | a += (5 * 2) 11 | a /= (-1) 12 | a *= 2 13 | a -= 3 14 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/bool-literals-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | def odd(n): 3 | return false if (n % 2) 4 | return true 5 | 6 | """ 7 | def odd(n): 8 | return false if (n % 2) 9 | return true 10 | end 11 | 12 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/closures-14.boo: -------------------------------------------------------------------------------- 1 | """ 2 | def foo(): 3 | return { print('foo') } 4 | 5 | print(foo()()) 6 | """ 7 | def foo(): 8 | return { print('foo') } 9 | end 10 | 11 | print(foo()()) 12 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/closures-20.boo: -------------------------------------------------------------------------------- 1 | """ 2 | c1 = { print 'foo' } 3 | c2 = { item | print item if (item is not null) } 4 | """ 5 | c1 = { print 'foo' } 6 | c2 = { item | print item if (item is not null) } 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/in-not-in-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | print(('foo' in ('foo', 'bar'))) 3 | print(('foo' not in ('foo', 'bar'))) 4 | """ 5 | print(('foo' in ('foo', 'bar'))) 6 | print(('foo' not in ('foo', 'bar'))) 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/in-not-in-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | assert 1 in { 1: 2 } 3 | assert 1 in { 1: 2 }, 'should pass but does not' 4 | """ 5 | assert 1 in { 1: 2 } 6 | assert 1 in { 1: 2 }, 'should pass but does not' 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/internal-generic-type-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | public class GenericType[of T](BaseType, SomeInterface): 3 | pass 4 | """ 5 | public class GenericType[of T](BaseType, SomeInterface): 6 | end 7 | 8 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/internal-generic-type-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | public class GenericType[of T](BaseType, SomeInterface): 3 | pass 4 | """ 5 | public class GenericType[of T](BaseType, SomeInterface): 6 | end 7 | 8 | -------------------------------------------------------------------------------- /tests/testcases/parser/wsa/internal-generic-type-5.boo: -------------------------------------------------------------------------------- 1 | """ 2 | public struct GenericType[of T](BaseType, SomeInterface): 3 | pass 4 | """ 5 | public struct GenericType[of T](BaseType, SomeInterface): 6 | end 7 | 8 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-1177-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | OK 3 | """ 4 | 5 | [System.Runtime.CompilerServices.CompilerGlobalScope] 6 | class Test: 7 | def constructor(): 8 | print "OK" 9 | 10 | Test() 11 | 12 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-231-1.boo: -------------------------------------------------------------------------------- 1 | a as object = 0.0 2 | b as object = 1.0 3 | 4 | assert true == (not a) 5 | assert false == (not b) 6 | assert false == ((not b) == (not a)) 7 | assert true == (not a) 8 | 9 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-313-5.boo: -------------------------------------------------------------------------------- 1 | import System.Globalization 2 | 3 | class Foo: 4 | 5 | public static IC = CultureInfo.InvariantCulture 6 | 7 | assert Foo.IC.Name == CultureInfo.InvariantCulture.Name 8 | -------------------------------------------------------------------------------- /tests/testcases/regression/BOO-719-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | bar 3 | """ 4 | class Bar(Foo): 5 | def X(): 6 | return "bar" 7 | 8 | class Foo: 9 | virtual def X(): 10 | return "foo" 11 | 12 | print Bar().X() 13 | -------------------------------------------------------------------------------- /tests/testcases/stdlib/list-indexof-3.boo: -------------------------------------------------------------------------------- 1 | a = [(1, 2), (3, 4), (5, 6)] 2 | 3 | assert 0 == a.IndexOf((1, 2)) 4 | assert 1 == a.IndexOf((3, 4)) 5 | assert -1 == a.IndexOf((2, 1)) 6 | assert 2 == a.IndexOf((5, 6)) 7 | -------------------------------------------------------------------------------- /tests/testcases/warnings/BCW0011-16.boo: -------------------------------------------------------------------------------- 1 | """ 2 | """ 3 | import BooCompiler.Tests.SupportingClasses from BooCompiler.Tests 4 | 5 | class Consumer(BaseInterface, BaseAbstractClassWithImplementation): 6 | pass 7 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/linkChecker/LinkListener.java: -------------------------------------------------------------------------------- 1 | interface LinkListener { 2 | public void hrefReference(String target, int line) ; 3 | public void imageReference(String imageFileName, int line); 4 | } 5 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/pascal/Procedure.java: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | 3 | public class Procedure extends Symbol implements Serializable { 4 | public Procedure(String name) { 5 | super(name); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/antlr-2.7.5/examples/java/tinybasic/FunctionScope.java: -------------------------------------------------------------------------------- 1 | package tinybasic; 2 | 3 | class FunctionScope extends Scope{ 4 | public FunctionScope(Scope prev){ 5 | super(prev); 6 | } 7 | 8 | 9 | } 10 | -------------------------------------------------------------------------------- /tests/testcases/ducky/duck-slice-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 42 3 | """ 4 | class Foo: 5 | 6 | [getter(Values)] 7 | _values = (1, 2, 3) 8 | 9 | 10 | d as duck = Foo() 11 | d.Values[0] = 42 12 | print d.Values[0] 13 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0089-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0089-2.boo(7,5): BCE0089: Type 'Foo' already has a definition for 'bar'. 3 | """ 4 | class Foo: 5 | bar as object 6 | 7 | bar = null # still a field declaration 8 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0112-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0112-1.boo(5,9): BCE0112: Destructors cannot be passed parameters 3 | """ 4 | class Burninator: 5 | def destructor (burnText as string): 6 | print "${burnText}!" 7 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0142.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0142.boo(4,5): BCE0142: Cannot bind [default] attribute to value type parameter 'x' in 'method'. 3 | """ 4 | def method([default(0)] x as int): 5 | print x 6 | method(2) 7 | -------------------------------------------------------------------------------- /tests/testcases/errors/BCE0167-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | BCE0167-1.boo(5,8): BCE0167: Namespace 'Bad.Namespace' not found in assembly 'Boo.Lang' 3 | """ 4 | 5 | import Bad.Namespace from Boo.Lang 6 | 7 | print "ok" 8 | 9 | -------------------------------------------------------------------------------- /tests/testcases/integration/arrays/arrays-18.boo: -------------------------------------------------------------------------------- 1 | import System 2 | 3 | a = (cast(byte, 0), cast(byte, 1)) 4 | 5 | assert Type.GetType("System.Byte[]") is a.GetType() 6 | assert 0 == a[0] 7 | assert 1 == a[1] 8 | -------------------------------------------------------------------------------- /tests/testcases/integration/generators/generator-of-transient-class-is-transient.boo: -------------------------------------------------------------------------------- 1 | """ 2 | """ 3 | [transient] 4 | class Bar: 5 | def foo(): 6 | yield 42 7 | 8 | assert not Bar().foo().GetType().IsSerializable 9 | -------------------------------------------------------------------------------- /tests/testcases/integration/generators/list-generators-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 3 | 2 4 | 4 5 | 6 6 | 8 7 | """ 8 | def foo(): 9 | return [i*2 for i in range(5)] 10 | 11 | print(join(foo(), "\n")) 12 | 13 | -------------------------------------------------------------------------------- /tests/testcases/integration/meta-programming/name-splicing-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | answer.value = 42 3 | """ 4 | memberName = "value" 5 | code = [| answer.$memberName = 42 |] 6 | print code.ToCodeString() 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/testcases/integration/operators/ones-complement-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | -3 3 | 4294967291 4 | -9 5 | """ 6 | i as int = 2 7 | j as uint = 4 8 | l as long = 8 9 | print ~i 10 | print ~j 11 | print ~l 12 | -------------------------------------------------------------------------------- /tests/testcases/integration/operators/post-incdec-4.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 3 | 1 4 | 2 5 | 2 6 | 1 7 | """ 8 | i = (0,) 9 | print i[0]++ 10 | print i[0]++ 11 | print i[0] 12 | print i[0]-- 13 | print i[0] 14 | -------------------------------------------------------------------------------- /tests/testcases/integration/primitives/char-5.boo: -------------------------------------------------------------------------------- 1 | """ 2 | System.Char 3 | * 4 | B 5 | """ 6 | 7 | print char(42).GetType() 8 | 9 | a as char = char(42) 10 | print a a = char(0x42) 11 | print a 12 | 13 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/declaration-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Hello 3 | """ 4 | for item in [" Hello "]: 5 | itemString as string 6 | itemString = item 7 | System.Console.Write(itemString.Trim()) 8 | 9 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/for-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 1, 2 3 | 3, 4 4 | 5 | """ 6 | 7 | for first, second in List().Add(List().Add(1).Add(2)).Add(List().Add(3).Add(4)): 8 | print("${first}, ${second}") 9 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/goto-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 1, 1 3 | home 4 | """ 5 | for i in 1, 2, 3: 6 | for j in 1, 2, 3: 7 | print("${i}, ${j}") 8 | goto home 9 | :home 10 | print("home") 11 | -------------------------------------------------------------------------------- /tests/testcases/integration/statements/goto-3.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 0 3 | 1 4 | 2 5 | """ 6 | i = 0 7 | 8 | goto test 9 | :start 10 | 11 | print(i) 12 | ++i 13 | 14 | :test 15 | goto start if i < 3 16 | -------------------------------------------------------------------------------- /tests/testcases/integration/types/enums-14.boo: -------------------------------------------------------------------------------- 1 | """ 2 | 4 3 | Bar 4 | """ 5 | import BooCompiler.Tests.SupportingClasses from BooCompiler.Tests 6 | 7 | print cast(int, ByteEnum.Baz) 8 | print cast(ByteEnum, 2) 9 | -------------------------------------------------------------------------------- /tests/testcases/integration/types/innerclasses-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Outer+Inner.Foo 3 | """ 4 | class Outer: 5 | class Inner: 6 | static def Foo(): 7 | print("${Inner}.Foo") 8 | 9 | Outer.Inner.Foo() 10 | -------------------------------------------------------------------------------- /tests/testcases/integration/types/methods-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | Hello! 3 | 4 | """ 5 | def main(): 6 | say("Hello!") 7 | 8 | def say(message): 9 | System.Console.WriteLine(message) 10 | 11 | main() 12 | -------------------------------------------------------------------------------- /tests/testcases/integration/types/negative-enum-value.boo: -------------------------------------------------------------------------------- 1 | """ 2 | True 3 | """ 4 | import BooCompiler.Tests.SupportingClasses 5 | 6 | o as object = TestEnum.Gazong 7 | e as TestEnum = o 8 | print e == TestEnum.Gazong -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/attributes-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | [module: M] 3 | [assembly: Foo(true)] 4 | [assembly: Bar(Spam: 1)] 5 | """ 6 | [assembly: Foo(true)] 7 | [assembly: Bar(Spam: 1)] 8 | [module: M] 9 | 10 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/declarations-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | i as callable = { print 'foo' } 3 | j as callable = { print 'bar' } 4 | """ 5 | i as callable = { print 'foo' } 6 | j as callable = def(): 7 | print 'bar' 8 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/in-not-in-2.boo: -------------------------------------------------------------------------------- 1 | """ 2 | assert 1 in { 1: 2 } 3 | assert 1 in { 1: 2 }, 'should pass but does not' 4 | """ 5 | assert 1 in { 1: 2 } 6 | assert 1 in { 1: 2 }, "should pass but does not" 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/internal-generic-callable-type-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | public callable GenericCallable[of TIn, TOut](TIn) as TOut 3 | """ 4 | 5 | public callable GenericCallable[of TIn, TOut](TIn) as TOut 6 | 7 | -------------------------------------------------------------------------------- /tests/testcases/parser/roundtrip/internal-generic-type-1.boo: -------------------------------------------------------------------------------- 1 | """ 2 | public class GenericType[of T](BaseType, SomeInterface): 3 | pass 4 | """ 5 | 6 | public class GenericType[of T](BaseType, SomeInterface): 7 | pass 8 | --------------------------------------------------------------------------------