1
0
Fork 0
Commit Graph

75 Commits (016bb1362bd0be1e9a1e901186a3e2b8bd0ec72d)

Author SHA1 Message Date
Mike Gerwitz 5c3b7ab042
Modernize documentation examples
Despite working with ES3+, the perceived age of the project is probably a
deterrent, and we really should be showing users the modern way of doing
things.

`impl-details.texi' was _not_ modernized because those details are indeed
specific to ES3.

* doc/classes.texi:
* doc/integration.texi:
* doc/interop.texi:
* doc/mkeywords.texi: Update documentation.
2017-11-02 00:52:00 -04:00
Mike Gerwitz 6c6e41c415
Add Class.assert{InstanceOf,isA}
* lib/class.js (assertInstanceOf, assertIsA): New methods.
* test/Class/GeneralTest.js: Add respective tests.
* doc/classes.texi (Type Checks and Polymorphism): Add reference for
    methods.  Update and format text.  Add indexes for "polymorphism",
    "type checking", and "duck typing".
2017-10-27 23:46:16 -04:00
Mike Gerwitz 90fd1a8d08
`override' implies `virtual'
This behavior is consistent with other OO languages like C++ and C# that do
not have virtual methods by default.

This solution isn't ideal, but I don't have time for a larger refactoring
right now.  I sat on this change for a good few weeks before committing it
unchanged.

* lib/MemberBuilderValidator.js (validateMethod): Allow override of
  supertype overrides.

* test/*: Stripped `virtual' keyword where appropriate.

* doc/classes.texi (Inheritance): Update to state that `override' implies
  `virtual'.
2017-06-30 02:01:40 -04:00
Mike Gerwitz ab4874e285
Add constructor reference caveat to manual
* doc/classes.texi: Add caveat for referencing the constructor when using
  ES6-style naming.
2017-01-02 23:38:48 -05:00
Mike Gerwitz 92c57c8ffe
Constructor virtual by default
* lib/ClassBuilder.js (_keywordParser): Make __construct virtual.
* test/Class/ConstructorTest.js: Add test.

* doc/classes.texi (Constructors): Update documentation.
2017-01-02 23:30:33 -05:00
Mike Gerwitz e39ff83b40
Rework constructor section in manual
My writing style has changed quite a bit since this was first written.

* doc/classes.text (Constructors):
  Reword section.
  Remove reference to static classes and singletons (we do not want to
    encourage such things).
  Add mention of good constructor practices.
2017-01-02 22:34:43 -05:00
Mike Gerwitz c662106e86
Copyright year update on classes.texi
* doc/classes.texi: Add 2016 to copyright
2016-07-15 23:43:21 -04:00
Mike Gerwitz ef5eade499
Add "Class Caveats" manual section
This will grow.

* doc/classes.texi (Class Caveats): Added with `this.__inst' documentation
2016-07-15 23:35:36 -04:00
Mike Gerwitz 30e7feefc9
Remove strong recommendation for `public' in manual
* doc/classes.texi (Defining Classes): Remove the recommendation for using
  the `public' keyword always (instead of omitting it), and the reference
  stating that it may be required in the future.  This is not the case.
2016-07-15 13:40:15 -04:00
Mike Gerwitz a7e1d2ad70
Error constructor integration into ClassBuilder
This introduces the transparent subtyping.

* doc/classes.texi (Error Subtyping): Section added

* lib/ClassBuilder.js (ClassBuilder): Accepts ErrorCtor instance
  (build): Transparent Error subtyping

* lib/class.js: Provide ErrorCtor instance to ClassBuilder

* test/ClassBuilder/ErrorExtendTest.js: Add test case for transparent error
  subtyping
2016-07-15 00:21:06 -04:00
Mike Gerwitz 02e8b796ee
Documentation compatibility with Texinfo 5.2
I upgraded Texinfo recently and found that ease.js' documentation would no
longer compile.  The errors make sense, but it's an unfortunate regression.
The previous version that I was using was 4.13, which is quite old.
2015-10-17 00:11:28 -04:00
Mike Gerwitz 0e26f9fd0f Strip `public` keyword from __construct in docs
It must be public, so by convention, I don't include it anymore.  But this
is personal preference.
2015-09-16 00:38:04 -04:00
Mike Gerwitz 90aa74d0cb ES6-style constructor added to documentation 2015-09-16 00:37:24 -04:00
Mike Gerwitz 98e76be94f
Implementation note on this.__super scope with private method calls 2015-05-27 23:23:26 -04:00
Mike Gerwitz 1484806456
Documentation for `super` method reference 2014-07-28 00:00:58 -04:00
Mike Gerwitz 82a02c0081 [copyright] Copyright assignment to the FSF
Thanks to Donald Robertson III for his help and guidance during this
process.
2014-04-09 19:05:07 -04:00
Mike Gerwitz 4b871dabc8 Corrected all line lengths in doc/
Now conforms to tools/linechk's 76-char limitation.
2014-01-17 22:30:15 -05:00
Mike Gerwitz b74698a8eb Added initial, basic documentation for method proxies
Implementation details will follow; this has gone undocumented long enough
and it does not feel right making another release without this.
2014-01-06 00:42:32 -05:00
Mike Gerwitz 5511ef78b5 Manual corrections for class examples; overrides must be virtual
Artifact from pre-virtual days.
2013-12-25 02:04:30 -05:00
Mike Gerwitz 018351e565 [copyright] Copyright update for texinfo documents and misc. scripts 2013-12-23 00:39:48 -05:00
Mike Gerwitz 8b83add95f ease.js is now GNU ease.js.
On Sun, Dec 22, 2013 at 03:31:08AM -0500, Richard Stallman wrote:
> I hereby dub ease.js a GNU package, and you its maintainer.
>
> Please don't forget to mention prominently in the README file and
> other suitable documentation places that it is a GNU program.
2013-12-23 00:27:18 -05:00
Brandon Invergo f9bb93c54d Applied autotool-related patch by Brandon Invergo
On Sat, Dec 21, 2013 at 12:29:23PM +0000, Brandon Invergo wrote:
> - configure.ac: add "foreign" to the AM_INIT statement so you don't have
>   to do it from the command line
>
> - configure.ac: add a test for midair -p, which is standard boilerplate
>   stuff
>
> - configure.ac: let the user dictate the locations of the java, node and
>   closure-compiler executables via the JAVA, NODE and CCJAR environment
>   variables
>
> - Makefile.am: use the MKDIR_P and CCJAR environment variables insntead
>   of hard-coded paths
>
> - doc/Makefile: rename to doc/Makefile.am
>
> - doc/Makefile.am: remove manual infodoc handling; Automake can automate
>   this stuff
>
> - doc/Makefile.am: support installing the documentation (install-plain,
>   install-pdf, install-html), which gets installed usually to
>   ${prefix}/share/doc/easejs (i.e. /usr/share/doc/easejs)
>
> - doc/classes.texi: fix some @ref macros
>
> - doc/manual.texi: fix the @include location
2013-12-21 23:31:45 -05:00
Mike Gerwitz d63c844144
Documentation correction regarding class dfn keywords 2012-05-08 18:01:29 -04:00
Mike Gerwitz 021b67bbff Whoops - abstract member param names may now contain underscores 2011-12-22 09:10:51 -05:00
Mike Gerwitz ac837107c5 Corrected terms in Abstract Members section of documentation
- "Parameters" instead of "arguments"
- "Declaration", not "definition"
2011-12-21 20:13:42 -05:00
Mike Gerwitz 50904390da Interface members may now only contain arg names that are valid var names
- This should apply to all abstract definitions. This will be resolved in the next commit. I am tired.
2011-12-20 23:56:46 -05:00
Mike Gerwitz 075e73e4d1 [#5] Added private naming conflict mention and inheritance information to Inheritance section of manual 2011-12-03 12:26:03 -05:00
Mike Gerwitz bdc32906e7 [#5] Added FinalClass to manual 2011-11-27 22:53:43 -05:00
Mike Gerwitz a701ee40a7 [#5] Typo correction in abstract class example 2011-11-20 18:08:52 -05:00
Mike Gerwitz 20b3abc008 [#5] Added abstract classes section to manual 2011-11-20 14:25:37 -05:00
Mike Gerwitz 8655a6a58f [#5] Added mention to Interfaces section in manual that Interface must be imported 2011-11-20 10:53:16 -05:00
Mike Gerwitz 199bba3c38 [#5] Added interface documentation to manual (abstract class pending) 2011-11-20 00:28:51 -05:00
Mike Gerwitz 058e5f5f7d [#5] Minor typo correction in inheritance section of manual 2011-11-19 22:30:10 -05:00
Mike Gerwitz 18c31cc9e5 [#5] Added additional information to Visibility Escallation section of manual 2011-11-15 23:40:38 -05:00
Mike Gerwitz 6c379968bc [#5] Reworked member keywords and member visibility section in manual 2011-11-15 22:14:32 -05:00
Mike Gerwitz fae30c877a [#5] Removed duplicate phrase for "virtual" keyword in manual 2011-11-10 23:48:45 -05:00
Mike Gerwitz 771d8d981d [#5] Added @ref's to member inheritence section of manual 2011-11-10 23:44:32 -05:00
Mike Gerwitz fea1960ab5 [#5] Added forgotten @code to override keyword 2011-11-10 23:20:59 -05:00
Mike Gerwitz ef12444a6c [#5] Added additional inheritance information 2011-11-10 23:02:26 -05:00
Mike Gerwitz 322c078c5a [#5] Minor subscript correction for "o" in inheritance section of manual 2011-11-09 00:32:14 -05:00
Mike Gerwitz a2926385b5 [#5] Began adding technical details of inheritance to manual 2011-11-09 00:10:52 -05:00
Mike Gerwitz 6452a239f3 [#5] Added 'virtual' and 'override' keywords to inheritance example in manual; will continue revisions in following commits
- This needs to be corrected as it's a very important detail. However, I need
  to get to bed. So the remaining changes will simply need to wait.
2011-11-07 00:03:39 -05:00
Mike Gerwitz ed7e988c00 [#5] Added 'Member Keywords' section to manual 2011-11-07 00:01:28 -05:00
Mike Gerwitz d3fda70e3f [#5] Began altering class section of manual, adding detailed syntax and specs 2011-11-06 23:55:18 -05:00
Mike Gerwitz 4fea62a8ed [#19] Removed 'final' keyword and all associated logic
- Kept FinalClass'
2011-06-08 01:26:04 -04:00
Mike Gerwitz 9492a181f3 Removed 'Late Static Binding' section from documentation
- May be re-introduced in the future, but the documentation will have to be updated with the new implementation
2011-05-31 22:31:58 -04:00
Mike Gerwitz 91260471c7 Added documentation for 'const' keyword 2011-05-30 11:17:10 -04:00
Mike Gerwitz ac8a2da200 Documentation menu correction 2011-05-30 11:17:10 -04:00
Mike Gerwitz d8a8fbc03c Added final keyword documentation 2011-05-28 09:35:50 -04:00
Mike Gerwitz f5712db5de Fixed makeinfo warning regarding @var 2011-05-28 08:48:22 -04:00