import pnacl
intrude import toolcontext
intrude import loader
-intrude import standard::file
+intrude import core::file
# We redefine exit to start a new thread before killing the one that called exit.
redef fun exit(exit_value: Int)
import model
import cfg
import flow_analysis
-intrude import standard::stream
+intrude import core::stream
import cpp
in "C++" `{
# A stack of integer implemented by a simple linked list.
# Note that this is only a toy class since a real linked list will gain to use
-# generics and extends interfaces, like Collection, from the standard library.
+# generics and extends interfaces, like `Collection`, from the `core` library.
class IntStack
# The head node of the list.
# Null means that the stack is empty.
# limitations under the License.
# Entire game logic for the Dino game
-# Depends only on Nit standard library
+# Depends only on Nit `core` library
module game_logic
interface Turnable
# http://developer.android.com/guide/topics/ui/notifiers/notifications.html
module notification
-import standard
+import core
private import native_notification
# An Android notification, shown at the top of the screen
module audio
import app_base
-import standard::error
+import core::error
# Platform variations
# TODO: move on the platform once qualified names are understand in the condition
# and reallocations when concatenating `String` objects.
module buffered_ropes
-intrude import standard::text::ropes
+intrude import core::text::ropes
# Hidden buffer, used to simulate a `FlatBuffer` on a short string.
#
# Utilities and performant structure for the FFI with C
module c
-import standard
-intrude import standard::collection::array
+import core
+intrude import core::collection::array
# A thin wrapper around a `NativeCArray` adding length information
abstract class CArray[E]
# Removes the numeric head of `self` if present
#
- # intrude import standard::fixed_ints
+ # intrude import core::fixed_ints
# assert "0xFFEF".strip_numhead == "FFEF"
# assert "0o7364".strip_numhead == "7364"
# assert "0b01001".strip_numhead == "01001"
# Gets the numeric head of `self` if present
# Returns "" otherwise
#
- # intrude import standard::fixed_ints
+ # intrude import core::fixed_ints
# assert "0xFEFF".get_numhead == "0x"
# assert "0b01001".get_numhead == "0b"
# assert "0o872".get_numhead == "0o"
# Removes the numeric extension if present
#
- # intrude import standard::fixed_ints
+ # intrude import core::fixed_ints
# assert "0xFEFFu8".strip_numext == "0xFEFF"
# assert "0b01001u8".strip_numext == "0b01001"
# assert "0o872u8".strip_numext == "0o872"
# Gets the numeric extension (i/u 8/16/32) in `self` is present
# Returns "" otherwise
#
- # intrude import standard::fixed_ints
+ # intrude import core::fixed_ints
# assert "0xFEFFu8".get_numext == "u8"
# assert "0b01001u8".get_numext == "u8"
# assert "0o872u8".get_numext == "u8"
# It is recommanded to use the higher level API offered by the class `Regex`,
# but it can still be used for advanced purpose or in optimized code.
#
-# To use this class and other `private` entities of this module, use `intrude import standard::re`
+# To use this class and other `private` entities of this module, use `intrude import core::re`
private extern class NativeRegex `{ regex_t* `}
# Allocate a new `NativeRegex`, it must then be compiled using `regcomp` before calling `regexec`
new malloc `{ return malloc(sizeof(regex_t)); `}
# Binding of C libCurl which allow us to interact with network.
module native_curl is pkgconfig "libcurl"
-intrude import standard::file
-import standard
+intrude import core::file
+import core
in "C header" `{
#include <curl/curl.h>
# at callers of `HashCollection::gt_collide` and `HashCollection::st_collide`.
module hash_debug
-intrude import standard::collection::hash_collection
-import standard
+intrude import core::collection::hash_collection
+import core
redef class Sys
# Number of calls of `HashCollection::node_at_idx`
# var p = new HTMLTag("p")
# p.text("Hello World!")
# assert p.write_to_string == "<p>Hello World!</p>"
- # Text is escaped see: `standard::String::html_escape`
+ # Text is escaped see: `core::String::html_escape`
fun text(txt: String): HTMLTag do
children.clear
# p.add(new HTMLTag("br"))
# p.append("World!")
# assert p.write_to_string == "<p>Hello<br/>World!</p>"
- # Text is escaped see: standard::String::html_escape
+ # Text is escaped see: core::String::html_escape
fun append(txt: String): HTMLTag do
add(new HTMLRaw("", txt.html_escape))
return self
end
import c
-intrude import standard::text::flat
+intrude import core::text::flat
import serialization
private import json::serialization
# Provides the `HttpRequest` class and services to create it
module http_request
-import standard
+import core
# A request received over HTTP, is build by `HttpRequestParser`
class HttpRequest
# 'nacl_sdk/pepper_your_pepper_version/getting_started/your_project_folder'.
module pnacl is platform
-import standard
-intrude import standard::stream
+import core
+intrude import core::stream
in "C Header" `{
#include "ppapi/c/pp_errors.h"
# Exposes methods for debugging ropes when needed.
module ropes_debug
-import standard
-intrude import standard::text::ropes
+import core
+intrude import core::text::ropes
redef class Text
# Writes self as a dot file on the hard drive
module saxophonit
import sax
-intrude import standard::file
+intrude import core::file
private import reader_model
private import lexer
module engine_tools
import serialization
-intrude import standard::collection::hash_collection
+intrude import core::collection::hash_collection
# Maps instances to a value, uses `is_same_serialized` and `serialization_hash`.
class StrictHashMap[K, V]
module socket
private import socket_c
-intrude import standard::stream
+intrude import core::stream
# A general Socket, either TCP or UDP
abstract class Socket
module sqlite3
private import native_sqlite3
-import standard
+import core
# A connection to a Sqlite3 database
class Sqlite3DB
import sha1
import base64
-intrude import standard::stream
-intrude import standard::bytes
+intrude import core::stream
+intrude import core::bytes
# Websocket compatible listener
#
redef fun make_results(nitx, results) do
var len = results.length
- # FIXME how to render the pager for one worded namespaces like "standard"?
+ # FIXME how to render the pager for one worded namespaces like "core"?
if len == 1 then
var page = results.first.as(PageMatch).page
var pager = new Pager
# underlying implementation and that the services are semantically correct.
module primitive_types
-intrude import standard::file
-intrude import standard::text::flat
+intrude import core::file
+intrude import core::text::flat
# Wrapper for `NativeFile`
class PrimitiveNativeFile
redef var to_s: String is noinit
# The full-name of the class, then the full-name of each type arguments within brackets.
- # Example: `"standard::Map[standard::String, standard::List[standard::Int]]"`
+ # Example: `"core::Map[core::String, core::List[core::Int]]"`
redef var full_name is lazy do
var args = new Array[String]
for t in arguments do