diff --git a/assets/AbstractCallOverload.hx b/assets/AbstractCallOverload.hx index 85bc4fb6..28357f5e 100644 --- a/assets/AbstractCallOverload.hx +++ b/assets/AbstractCallOverload.hx @@ -10,6 +10,6 @@ class Main { static public function main() { var s:MyAbstract = 42; trace(s()); // uses callNoArgs, outputs 42 - trace(s(1)); // uses callOneArg, ouputs 43 + trace(s(1)); // uses callOneArg, outputs 43 } } diff --git a/assets/MapExample.hx b/assets/MapExample.hx index 70a87cee..41d9939c 100644 --- a/assets/MapExample.hx +++ b/assets/MapExample.hx @@ -3,7 +3,7 @@ class Main { // Maps are initialized like arrays, but // use the map literal syntax with the // '=>' operator. Maps can have their - // key value types defined explicity + // key value types defined explicitly var map1:Map = [1 => "one", 2 => "two"]; // Or they can infer their key value types diff --git a/content/02-types.md b/content/02-types.md index 790981d6..8c6a18f0 100644 --- a/content/02-types.md +++ b/content/02-types.md @@ -315,7 +315,7 @@ Like classes, interfaces can be marked with the `final` keyword, preventing them Abstract classes (not to be confused with [Abstract](types-abstract)) are classes with partial implementation. As such, an abstract class cannot be instantiated but must first be extended, with the child class either providing implementation of all abstract methods or being declared abstract itself. -In constrast to abstract classes, a class that implements all its methods is known as a concrete class. Concrete classes inheriting from abstract classes must be declared without the `abstract` keyword, and all abstract methods in the parent classes must be implemented. +In contrast to abstract classes, a class that implements all its methods is known as a concrete class. Concrete classes inheriting from abstract classes must be declared without the `abstract` keyword, and all abstract methods in the parent classes must be implemented. Abstract classes support all language features that concrete classes support, thus any class can be declared abstract. Furthermore, abstract class methods behave similarly to interfaces; implementations of the methods do not use the `override` keyword. @@ -792,7 +792,7 @@ Although the return type of `Json.parse` is `Dynamic`, the type of local variabl var att : Dynamic = xml.attributes; // valid, value is a String att.name = "Nicolas"; -// dito (this documentation is quite old) +// ditto (this documentation is quite old) att.age = "26"; // error, value is not a String att.income = 0; diff --git a/content/06-lf.md b/content/06-lf.md index 6aabf05b..0ae78edd 100644 --- a/content/06-lf.md +++ b/content/06-lf.md @@ -392,7 +392,7 @@ Implementing `Dynamic` does not satisfy the requirements of other implemented in > ##### Trivia: Implementing `Dynamic` on non-externs > -> Starting with Haxe 4, implementing `Dynamic` is only allowed on extern classes. In previous versions any class could implement `Dynamic`, allowing arbitrary fields to be read or written. Additionally a special `resolve` method could be used to resolve read access to a non-existend field. A similar feature is now available as field access [operator overload](types-abstract-operator-overloading) on abstracts. +> Starting with Haxe 4, implementing `Dynamic` is only allowed on extern classes. In previous versions any class could implement `Dynamic`, allowing arbitrary fields to be read or written. Additionally a special `resolve` method could be used to resolve read access to a non-existent field. A similar feature is now available as field access [operator overload](types-abstract-operator-overloading) on abstracts. diff --git a/content/07-compiler-usage.md b/content/07-compiler-usage.md index d6ffb0ff..6975a24d 100644 --- a/content/07-compiler-usage.md +++ b/content/07-compiler-usage.md @@ -83,7 +83,7 @@ The second question usually comes down to providing an argument specifying the d In order to include single modules, their paths can be listed directly on command line or in hxml: `haxe ... ModuleName pack.ModuleName`. For more specific includes or excludes, use these [initialization macros](macro-initialization): * `--macro include(pack:String, recursive=true, ?ignore:Array, ?classPaths:Array, strict=false)` Includes all modules in package pack in the compilation. If `recursive` is true, the compiler recursively adds all sub-packages. -* `--macro exclude(pack:String, recursive=true` Exclude a specific class, enum, or all classes and enums in a package from being generated. Excluded types become `extern`. If `recursive` is true, the compiler recursively excludes all sub-packages. +* `--macro exclude(pack:String, recursive=true)` Exclude a specific class, enum, or all classes and enums in a package from being generated. Excluded types become `extern`. If `recursive` is true, the compiler recursively excludes all sub-packages. * `--macro excludeFile(fileName:String)` Exclude classes and enums listed from given external file (one per line) from being generated. * `--macro keep(?path:String, ?paths:Array, recursive=true)` Marks a package, module or sub-type dot path to be kept by DCE. This also extends to the sub-types of resolved modules. If `recursive` is true, the compiler recursively keeps all sub-packages for package paths. * `--macro includeFile(file:String, position)` Embed a JavaScript file at compile time. `position` can be either "top", "inline" or "closure". diff --git a/content/08-cr-features.md b/content/08-cr-features.md index 97ac249b..78c3766a 100644 --- a/content/08-cr-features.md +++ b/content/08-cr-features.md @@ -854,7 +854,7 @@ function main() { Compiling this no longer causes a warning. -Enabling warnings is analoguous, using `+` instead of `-`, e.g. `-w +WCustomWarning`. Note that as of Haxe 4.3.0, there are no compiler warnings which are disabled by default, so the option is currently not useful. +Enabling warnings is analogous, using `+` instead of `-`, e.g. `-w +WCustomWarning`. Note that as of Haxe 4.3.0, there are no compiler warnings which are disabled by default, so the option is currently not useful. Multiple warnings can be disabled and enabled within the same options string, so something like `-w -WDeprecated-WUnusedPattern` would disable both `WDeprecated` and `WUnusedPattern` warnings. diff --git a/content/10-std.md b/content/10-std.md index 9b5c6250..5c29a6d0 100644 --- a/content/10-std.md +++ b/content/10-std.md @@ -742,7 +742,7 @@ Each supported value is translated to a distinct prefix character, followed by t * positive infinity: `p` * finite floats: `d` followed by the float display (e.g. `d1.45e-8`) * `Bool`: `t` for `true`, `f` for `false` -* `String`: `y` followed by the url encoded string length, then `:` and the url encoded string (e.g. `y10:hi%20there for "hi there".` +* `String`: `y` followed by the url encoded string length, then `:` and the url encoded string (e.g. `y10:hi%20there for "hi there".`) * name-value pairs: a serialized string representing the name followed by the serialized value * structure: `o` followed by the list of name-value pairs and terminated by `g` (e.g. `oy1:xi2y1:kng` for `{x:2, k:null}`) * `List`: `l` followed by the list of serialized items, followed by `h` (e.g. `lnnh` for a list of two `null` values) @@ -753,7 +753,7 @@ Each supported value is translated to a distinct prefix character, followed by t * `haxe.ds.ObjectMap`: `M` followed by serialized value pairs representing the key and value, followed by `h` * `haxe.io.Bytes`: `s` followed by the length of the base64 encoded bytes, then `:` and the byte representation using the codes `A-Za-z0-9%` (e.g. `s3:AAA` for 2 bytes equal to `0`, and `s10:SGVsbG8gIQ` for `haxe.io.Bytes.ofString("Hello !")`) * exception: `x` followed by the exception value -* class instance: `c` followed by the serialized class name, followed by the name-value pairs of the fields, followed by `g` (e.g. `cy5:Pointy1:xzy1:yzg` for `new Point(0, 0)` (having two integer fields `x` and `y`) +* class instance: `c` followed by the serialized class name, followed by the name-value pairs of the fields, followed by `g` (e.g. `cy5:Pointy1:xzy1:yzg` for `new Point(0, 0)` (having two integer fields `x` and `y`)) * enum instance (by name): `w` followed by the serialized enum name, followed by the serialized constructor name, followed by `:`, followed by the number of arguments, followed by the argument values (e.g. `wy3:Fooy1:A:0` for `Foo.A` (with no arguments), `wy3:Fooy1:B:2i4n` for `Foo.B(4,null)`) * enum instance (by index): `j` followed by the serialized enum name, followed by `:`, followed by the constructor index (starting from 0), followed by `:`, followed by the number of arguments, followed by the argument values (e.g. `jy3:Foo:0:0` for `Foo.A` (with no arguments), `jy3:Foo:1:2i4n` for `Foo.B(4,null)`) * cache references: diff --git a/content/12-target-details.md b/content/12-target-details.md index 400fbe3a..8aa633ee 100644 --- a/content/12-target-details.md +++ b/content/12-target-details.md @@ -806,7 +806,7 @@ The compiler specification and target lists all use the same format. Most of the XML nodes support `if` and `unless` attributes. These will enable or disable the whole node according the existence or non-existence of a define. These can be combined with a space for "and" or two pipes for "or". -Substitution is supported via the dollars-brace syntax, and does basoc text substitution. In addition, there is some special syntax that can be used: +Substitution is supported via the dollars-brace syntax, and does basic text substitution. In addition, there is some special syntax that can be used: - `${VAR}` - normal replacement. - `${removeQuotes:VAR}` - strips surrounding quotes from `VAR`, if any. @@ -1853,7 +1853,7 @@ Top of stack can be tricky to get right when a GUI framework does not really hav 7976 int t0 SetTopOfStack(&t0,false) -> 7966 __hxcpp_main(); - setOnFrameCallack(haxeOnFrame) + setOnFrameCallback(haxeOnFrame) return; ``` @@ -2091,7 +2091,7 @@ Metadata | Usage | Description @:nativeGen | on classes | don't generate reflection, generate proper type parameters. This is useful for some sort of interop, but slows down reflection and structural typing @:nativeGen | on "flat" enums | generate C# enum, but note that C# enums are not-nullable unlike haxe enums, so using null will be generated as a default enum value (0-indexed constructor). @:property | on non-physical fields (those with get/set/never accessors) | generate native C# properties. useful for implementing extern interfaces or providing API for use from C# -@:event | on variables | generate an event delegate (this also requires pairing add_EventName, remove_EventName methods with relevant signatures +@:event | on variables | generate an event delegate (this also requires pairing add_EventName, remove_EventName methods with relevant signatures) @:protected | on a field | mark field as protected instead of public (could affect reflection, but useful for hiding fields when providing API for use from outside Haxe) @:struct | on classes | generate struct instead of class @@ -2230,7 +2230,7 @@ for native Lua libraries. #### Version flags -The Lua target enables the following define flags for the Haxe complier: +The Lua target enables the following define flags for the Haxe compiler: * `-D lua-ver` Enable special features for a specific Lua version. Currently, this flag will enable extern methods that are specific to certain versions (e.g. table.pack in Lua > 5.2). * `-D luajit` Enable special features for LuaJIT. Currently this flag will enable the `jit` and `ffi` module namespaces. diff --git a/content/generated/defines.md b/content/generated/defines.md index d1ca792a..4d3857fb 100644 --- a/content/generated/defines.md +++ b/content/generated/defines.md @@ -96,7 +96,7 @@ `php-lib` | <folder name> | Select the name for the php lib folder. | php `php-front` | <filename> | Select the name for the php front file. (default: `index.php`) | php `python-version` | <version> | The python version to target. (default: 3.3) | python -`real-position` | | Disables Haxe source mapping when targetting C#, removes position comments in Java and Php output. | cs, java, php +`real-position` | | Disables Haxe source mapping when targeting C#, removes position comments in Java and Php output. | cs, java, php `replace-files` | | GenCommon internal. | cs, java `retain-untyped-meta` | | Prevents arbitrary expression metadata from being discarded upon typing. | all `scriptable` | | GenCPP internal. | cpp