This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #================================================================== | |
| # VectorWrapper.rogue | |
| # | |
| # v2.1 | |
| # | |
| # March 1, 2016 by Abe Pralle | |
| # | |
| # Compile with RogueC v1.0.6+ from | |
| # https://github.com/AbePralle/Rogue | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SelectDemo.rogue | |
| # | |
| # March 3, 2016 by Abe Pralle | |
| println "Settings A" | |
| forEach (setting in [false,true]) | |
| println setting + " means " + select{ setting:"ON", "OFF" } | |
| endForEach | |
| println | |
| println "Settings B" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Statements outside of any class definition are run at launch. | |
| # You can write your program here or instantiate a class to handle | |
| # the rest: | |
| Greeting() # Create a Greeting object - Rogue does not use the "new" keyword | |
| # Creating a Greeting object prints out: | |
| # Entering main | |
| # 0 | |
| # [Greeting.init() Test.rogue:23] foo:0 | |
| # numbers:[0,1,1,2,3,5,8,13,21,34] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| routine filter( range: Range<<Int32>>, pred:Function(Int32)->(Logical) ) -> Int32[] | |
| local result = Int32[] | |
| forEach i in range | |
| if pred(i) | |
| result.add(i) | |
| endIf | |
| endForEach | |
| return result | |
| endRoutine |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Generated by Cython 0.25.2 */ | |
| #define PY_SSIZE_T_CLEAN | |
| #include "Python.h" | |
| #ifndef Py_PYTHON_H | |
| #error Python headers needed to compile C extensions, please install development version of Python. | |
| #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) | |
| #error Cython requires Python 2.6+ or Python 3.2+. | |
| #else | |
| #define CYTHON_ABI "0_25_2" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| namespace std {} | |
| using namespace std; | |
| #include "HelloRogue.h" | |
| //============================================================================= | |
| // NativeCPP.cpp | |
| // | |
| // Rogue runtime routines. | |
| //============================================================================= |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!python | |
| #cython: optimize.unpack_method_calls=False | |
| # Generated by the Rogue compiler | |
| import sys | |
| from cpython cimport PyObject, Py_XINCREF, Py_XDECREF | |
| from libcpp cimport bool | |
| from libc.stdlib cimport malloc, free | |
| from libc.stdint cimport intptr_t, uint32_t | |
| cdef object Int32 | |
| class Int32: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #$ ROGUEC_OPTIONS = --api | |
| module Build | |
| global method_prefix = "Build::on_" | |
| routine on_random( low:Int32, high:Int32 ) | |
| println Random.int32( low, high ) | |
| endRoutine | |
| routine on_random |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Tokenizer accepts '::' as part of identifers. | |
| https://github.com/AbePralle/Rogue/blob/495abaffc05785a9f661eb05e960ff13c03f1260/Source/RogueC/Tokenizer.rogue#L605 | |
| https://github.com/AbePralle/Rogue/blob/495abaffc05785a9f661eb05e960ff13c03f1260/Source/RogueC/Tokenizer.rogue#L432 | |
| When RogueC include_source()'s a new file, it creates a Parser object which tokenizes the content using a Preprocessor. | |
| https://github.com/AbePralle/Rogue/blob/495abaffc05785a9f661eb05e960ff13c03f1260/Source/RogueC/RogueC.rogue#L443 | |
| The Preprocessor looks for 'directive_module' and updates the 'cur_module' string. | |
| https://github.com/AbePralle/Rogue/blob/495abaffc05785a9f661eb05e960ff13c03f1260/Source/RogueC/Preprocessor.rogue#L159 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ==7115== Memcheck, a memory error detector | |
| ==7115== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. | |
| ==7115== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info | |
| ==7115== Command: Programs/RogueC/Rogo-Linux | |
| ==7115== | |
| ==7115== | |
| ==7115== Process terminating with default action of signal 7 (SIGBUS) | |
| ==7115== Non-existent physical address at address 0x33B008 | |
| ==7115== at 0x400D2F6: elf_machine_rela_relative (dl-machine.h:541) | |
| ==7115== by 0x400D2F6: elf_dynamic_do_Rela (do-rel.h:112) |
OlderNewer