Calvin Rose
8144f83b66
Merge pull request #516 from uvtc/patch-4
...
doc for identity
2020-12-04 17:40:31 -06:00
Calvin Rose
cd2a55e268
Merge pull request #513 from uvtc/patch-1
...
boot.janet, cond doc
2020-12-04 17:38:02 -06:00
Calvin Rose
f92b5d69c8
Merge pull request #515 from uvtc/patch-3
...
C-style (hyphenate)
2020-12-04 17:37:24 -06:00
Calvin Rose
a8c21459c3
Merge pull request #517 from uvtc/patch-5
...
boot.janet, compare*, light formatting
2020-12-04 17:37:06 -06:00
Calvin Rose
4789b4c9f3
Merge pull request #520 from uvtc/patch-6
...
corelib.c, describe, add hyphen
2020-12-04 17:31:15 -06:00
Calvin Rose
ee1cd6f151
Merge pull request #521 from sogaiu/parser-with-a-colon
...
Minor tweak in changelog
2020-12-04 17:30:59 -06:00
sogaiu
dfcda296a3
Minor tweak in changelog
2020-12-02 17:52:29 +09:00
John Gabriele
4d38fcb289
corelib.c, describe, add hyphen
2020-12-01 11:56:53 -05:00
Calvin Rose
cbdea8f331
Make os/execute cooperate with ev module.
...
os/execute, os/proc-wait do not block (currently posix only).
This uses the self-pipe trick to turn signals into a pollable entity.
2020-11-29 15:36:21 -06:00
John Gabriele
51d6a13510
Update src/boot/boot.janet
...
Co-authored-by: Michael Camilleri <mike@inqk.net>
2020-11-29 14:31:01 -05:00
John Gabriele
7b4eeecd9f
Update src/boot/boot.janet
...
Co-authored-by: Michael Camilleri <mike@inqk.net>
2020-11-29 14:30:48 -05:00
John Gabriele
82eff7e082
Update src/boot/boot.janet
...
Agreed. That's more clear.
Co-authored-by: Michael Camilleri <mike@inqk.net>
2020-11-29 14:30:26 -05:00
John Gabriele
b922e36071
Update src/boot/boot.janet
...
Co-authored-by: Michael Camilleri <mike@inqk.net>
2020-11-29 14:18:19 -05:00
John Gabriele
7c75aeaad2
Update src/boot/boot.janet
...
Co-authored-by: Michael Camilleri <mike@inqk.net>
2020-11-29 14:17:38 -05:00
John Gabriele
2db9323671
Update src/boot/boot.janet
...
Co-authored-by: Michael Camilleri <mike@inqk.net>
2020-11-29 14:17:23 -05:00
John Gabriele
31ae93de19
Update src/boot/boot.janet
...
Co-authored-by: Michael Camilleri <mike@inqk.net>
2020-11-29 14:17:12 -05:00
John Gabriele
a81e9f23f0
Update src/boot/boot.janet
...
Co-authored-by: Michael Camilleri <mike@inqk.net>
2020-11-29 14:16:55 -05:00
John Gabriele
59f09a4386
Update src/boot/boot.janet
...
omit needless word
Co-authored-by: Michael Camilleri <mike@inqk.net>
2020-11-29 14:15:55 -05:00
John Gabriele
53400ecac1
boot.janet, compare*, light formatting
...
Since those represent code, they should get backticks.
2020-11-28 14:41:42 -05:00
John Gabriele
1b8928a8ec
doc for identity
...
This function only takes one argument anyway, and errors if you try to pass more.
2020-11-28 14:35:17 -05:00
John Gabriele
e706494893
C-style
2020-11-28 14:29:13 -05:00
John Gabriele
894aea7ce7
boot.janet, fix possible typo
...
Possible typo?
2020-11-28 14:25:10 -05:00
John Gabriele
87167a21c9
boot.janet, cond doc
...
Arranged this way seems to make more sense.
2020-11-28 14:18:35 -05:00
Calvin Rose
7c8f5ef811
Merge branch 'master' of github.com:janet-lang/janet
2020-11-28 12:18:51 -06:00
Calvin Rose
7aa4241662
Add testing for the new reindent behavior.
...
This also provides a reference function to reimplement
the behavior in Janet.
2020-11-28 12:18:36 -06:00
Calvin Rose
56a915b5b1
Long strings now autoindent contents - doc-format is simpler.
...
No need to try and auto detect the base indentation - it is 0.
This will be taken care of by the parser.
2020-11-28 10:04:25 -06:00
Calvin Rose
90a0dfa35f
Merge pull request #512 from timgates42/bugfix_typo_source
...
docs: fix simple typo, soucre -> source
2020-11-27 16:54:34 -06:00
Tim Gates
128d72785f
docs: fix simple typo, soucre -> source
...
There is a small typo in src/core/features.h.
Should read `source` rather than `soucre`.
2020-11-28 09:45:46 +11:00
Calvin Rose
21a6017547
typo
2020-11-27 12:27:44 -06:00
Calvin Rose
a0964d44d5
Fix some valgrind errors.
...
A null pointer dereference and a memory leak with the line/col mapping.
2020-11-27 12:21:23 -06:00
Calvin Rose
fb0859dfe6
Merge remote-tracking branch 'pyrmont/feature.markdown-docstrings' into longstring-autoindent
2020-11-27 12:13:45 -06:00
Calvin Rose
dadd6037bb
Merge branch 'master' into longstring-autoindent
2020-11-27 10:40:10 -06:00
Michael Camilleri
6f3eff3258
Add example docstring
2020-11-27 18:29:41 +09:00
Michael Camilleri
02224d5aa9
Fix bugs in parsing logic
2020-11-27 18:28:58 +09:00
Calvin Rose
bfd2845077
Add merge-module to core.
...
This is a little utility used for manually importing modules.
It is responsible for taking the output of dofile, run-context, or
require and merging into another environment as if import was called.
2020-11-27 00:16:54 -06:00
Michael Camilleri
ba2e0489e6
Add initial implementation of docstring formatter
2020-11-27 15:07:38 +09:00
Calvin Rose
ca7c5b8b10
ev/call uses current env as prototype of environment.
2020-11-26 21:13:41 -06:00
Calvin Rose
6c43489fb2
Fix #508 - nil fiber environment.
...
run-context did not handle a nil environment well, so that was fixed
and ev/call inherits the environment when creating the fiber.
2020-11-26 19:04:45 -06:00
Calvin Rose
d76f671d37
Update changelog and make arg to peg's error optional.
2020-11-26 18:57:24 -06:00
Calvin Rose
776ce586bc
Add line and column combinators to peg.
...
These capture the line and column number of the current position
in the matched text. This is useful for error reporting as well
as indentation checking.
This works by lazily creating an index on first use that stores all
newline character indices in order. We can then do a binary search on
this to get both line number and column number in log(n) time.
This is good enough for most use cases and doesn't slow down the common case at all
- these will not be commonly used patterns in a hot loop so it is not worth to try and
optimize this at all. Constant time look up should be possible but at
the cost of complicating code and slowing down all matching to check for
new lines.
2020-11-26 18:32:56 -06:00
Calvin Rose
adc3066dc8
Update doc-format and boot.janet docstrings.
...
Make doc-format respect leading indents, increase the default format
width to better accommodate markdown formatted documentation. We still
need to support single line style doc strings, such as those used
for most c functions which can be a single line of much longer than
80 or 120 characters.
Consecutive whitespace internal to lines is not preserved, though.
2020-11-26 14:58:36 -06:00
Calvin Rose
7fd2da1096
Add code in parser to automatically indent long strings.
...
Leading spaces are stripped based on the column index of the first
backtick character in the first delimiter. If there are
characters that are not newline or space before that column in the
string, then the behavior is the same as the old behvaior - no
re-indentation is performed.
2020-11-26 13:20:58 -06:00
Calvin Rose
451340e4c0
Update docstrings in boot.janet ( #506 )
...
Elaborate on usage of reduce and accumulate.
2020-11-26 10:34:51 -06:00
Calvin Rose
a3e812b86d
Fix #505 - bat int64 parsing.
...
Fixes an off-by-1 error.
Also makes windows testing hopefully a bit less flaky.
2020-11-25 09:45:46 -06:00
Calvin Rose
a3f98091c4
Fix #509
...
janet_fiber returns NULL if there is a bad arity, check that before
continuing.
2020-11-23 15:28:28 -06:00
Calvin Rose
6720b34868
Don't use peg for patch tool.
2020-11-18 19:37:18 -06:00
Calvin Rose
781ed0dc67
Merge branch 'master' of github.com:janet-lang/janet
2020-11-18 19:36:12 -06:00
Calvin Rose
8f00848c7b
Fix build issues on windows by using a size_t instead of int.
2020-11-18 19:31:20 -06:00
Calvin Rose
53aa19a916
Several changes to move pipe creation back into ev.c
2020-11-18 10:53:36 -06:00
Calvin Rose
2dc04d2957
On install, merge janetconf.h into janet.h
...
This results in a cleaner amalgmated build
2020-11-17 09:53:12 -06:00