1
0
Fork 0
Commit graph

77 commits

Author SHA1 Message Date
Erik Hofman
8e7c4550d7 Add a license exception to single owner (Melchoir Franz and myself) that clarifies that merely calling Nasal functions from third party aircraft does not invoce the derived-work clause of the GPL. Signed of by the authors 2020-08-12 14:39:32 +02:00
Henning Stahlke
b5f00cb50e replace typeof() by is<type>()
Signed-off-by: Stuart Buchanan <stuart_d_buchanan@yahoo.co.uk>
2020-06-03 22:55:51 +01:00
Henning Stahlke
148328d793 Nasal loadpriority; remove nasal-dir-initialized listeners;
add more dependencies to loadpriority.xml and remove _setlistener stuff
2020-06-03 21:57:14 +01:00
Henning Stahlke
11e36dd8a9 debug.nas subdir per probe class 2020-05-17 20:04:05 +01:00
Henning Stahlke
eeb1b5e3d5 debug.nas add helpers for adding probes at runtime; add subnode to _debug for hit counters
add dumpProbeStats() and Breakpoint.dumpTrace()
dumpTrace to XML file separate tracer class
2020-05-17 20:01:43 +01:00
Henning Stahlke
17e3ba6698 debug.nas add dumpProbeStats() and Breakpoint.dumpTrace() 2020-05-05 13:51:52 +01:00
Henning Stahlke
bef5de6e81 debug.nas add helpers for adding probes at runtime; add subnode to _debug for hit counters 2020-05-05 13:51:45 +01:00
Henning Stahlke
95d0aa032e bugfixes for debug.nas and props.nas 2020-04-24 16:00:09 +02:00
Henning Stahlke
6078cff6b1 extend debug.Probe and debug.Breakpoint classes with trace option 2020-04-21 09:06:09 +02:00
Henning Stahlke
1035ed4269 add skip parameter to debug.nas breakpoint class 2020-04-19 12:29:01 +01:00
Henning Stahlke
93c48818fd debug.nas: prevent stack overflow in dump; print function names in backtrace; 2020-04-16 16:25:20 +01:00
Henning Stahlke
d2d1fead76 modified output of debug.backtrace 2020-04-16 16:18:15 +01:00
Richard Harrison
f9eacd8be0 Nasal Debug.dump tweaks to make it readable as JSON 2020-04-09 23:56:43 +02:00
Henning Stahlke
801512bb8c add probe class to debug.nas 2019-01-31 22:41:35 +01:00
Henning Stahlke
9c9fb23f55 debug.nas add callback to breakpoint 2019-01-22 08:44:08 +01:00
Henning Stahlke
79596cc6ab debug.nas add Breakpoint class 2019-01-13 22:09:54 +01:00
Thomas Geymayer
9e905228ef Nasal: respect color argument for debug._dump_prop 2014-06-21 12:09:34 +02:00
Philosopher
ddcb543c10 debug.nas: use argument to disable/enable color
(on top of the normal color setting -- i.e. this overrides that)
2014-06-06 21:19:10 -05:00
Philosopher
6e17a1d2cb Initial Nasal REPL work (canvas-based)
Features:
- Various configurable styles.
- Working scroll bars, thanks to Tom
- Adequate REPL-ness.

See the wiki for more information!
http://wiki.flightgear.org/Interactive_Nasal_Console

N.B. This makes some (sane) changes to other Nasal files, including
expanding some of the Canvas API.
2014-04-18 16:49:11 -05:00
Philosopher
642ebfa696 Some changes/additions to debug.nas
Add benchmark_time, rank, and print_rank. Modify benchmark to return/
pass-through the values of the function, appending to a vector if there
are multiple executions.
2014-02-20 11:47:27 -06:00
ThorstenB
b8eecab9cf Introduce "PRESERVE" flag to protect properties on sim reset.
Protect values of some specific properties on sim-reset.
2011-06-12 20:40:11 +02:00
mfranz
35d506bce1 isnan: shorter & faster 2009-04-24 08:12:21 +00:00
mfranz
53e733d425 new isnan() that doesn't create a NaN itself 2009-03-21 18:17:59 +00:00
mfranz
824cff9192 comment out isnan()
It conflicts with Jester's debugging setup, and Andy says there should be
no NaN in the first place. This is a bug that needs to get fixed. Just
enable isnan() if you want to detect NaNs in the meantime. (The MP system
creates them ATM. The property getters shall turn them into nil.)
2009-02-12 16:59:03 +00:00
mfranz
a9afecf74b debug.error: rename to warn, reduce default caller skip, documentation 2009-02-09 14:29:43 +00:00
mfranz
747d9dcbde debug mode: fix slice 2009-02-09 00:24:23 +00:00
mfranz
6495f062d3 var++ 2009-02-08 21:58:31 +00:00
mfranz
4757d49c0c debug mode: add hint for why the write operation probably failed 2009-02-08 21:16:28 +00:00
mfranz
04511dbc8d --prop:debug=1 enables a debug mode where some functions generate warnings.
setprop(), props.Node.set{,Int,Bool,Double}Value() complain if they couldn't
write, e.g. because the target property is write protected, or doesn't have
a tied setter function.
2009-02-08 20:46:55 +00:00
mfranz
1d783e03bb remove debug.exit(); add debug.isnan()
- exit was only justified at times where fgcommand() needed an explicit
  node statement, which made using it a bit clumsy. Nowadays that's only
  fgcommand("exit"), which is as good as debug.exit() was.
- isnan() is really only for debugging and, thus, not in the global
  namespace. Nasal code should never generate NaNs (though it's easy:
  var nan = 1/0; There! :-), and NaNs imported from the C++ side (tied
  properties!) should get fixed there. IOW: routine checks for nan in
  Nasal can only be temporary hacks/debugging measures.
2009-02-06 14:41:13 +00:00
mfranz
5c88cdf6f1 dump: no space after [ and before ] 2008-12-03 20:49:33 +00:00
mfranz
f7e246905b tree(): show which nodes are aliased to which nodes 2008-11-26 16:07:32 +00:00
mfranz
81e967a609 nasal now returns constant and readable ghosttypes, so we do no longer
need the symbol table and comparison with the ghosttype of props._globals()
2008-11-13 12:00:23 +00:00
mfranz
6384588444 I said "correctly". 2008-10-25 14:24:26 +00:00
mfranz
f7bd13fed3 debug.dump(): print empty strings as hash key correctly 2008-10-25 14:20:47 +00:00
mfranz
782368fefa documentation update and cosmetics 2008-10-09 17:20:27 +00:00
mfranz
e6e1f8ae20 - move color functions from debug.nas to string.nas
- multikey.nas: add exit/no-exit markers to help output
2008-10-03 15:20:12 +00:00
mfranz
772112df89 use color codes only when printing to the terminal 2008-10-01 14:04:47 +00:00
mfranz
e354f26a4d add braces to work with Nasal TNG 2008-09-24 19:38:56 +00:00
mfranz
c047efb41f debug.proptrace: increase the default frame number to get one complete frame 2008-08-17 07:35:27 +00:00
mfranz
917cace77c string.nas: remove forgotten debug message
props.nas: replace some "arg[*]" by named args
aircraft.nas: load aircraft data only if the file exists (to avoid warning)
debug.nas: no space before colon & fixed comment & cosmetics
2008-08-14 22:13:25 +00:00
mfranz
4ac84809e9 nasal: cleanup & minor fixes
- fuel.nas: use props.initNode()
- debug.nas: fix comment
- globals.nas: load_nasal(): check extension and set module arg
- io.nas: update log message (the rules are no longer for io.open() only)
2008-08-10 17:53:41 +00:00
mfranz
ad781922a7 here's a case where we want explicit namespace prefixes everywhere
(just renaming debug.string instead was plan B ;-)
2008-07-30 19:22:36 +00:00
mfranz
de1aa4c56e finally make printf() globally available 2008-07-23 15:43:45 +00:00
mfranz
951f31a56c change attribute names from read/write to readable/writable 2008-07-07 10:25:08 +00:00
mfranz
d86b1b9c74 string.nas: new functions string.join() and string.replace()
debug.nas: let benchmark() repeat tested function
io.nas: cosmetics
aircraft.nas: initialize time property only once
2008-06-21 07:10:32 +00:00
mfranz
56eef9c69f move load_nasal to io module 2008-06-14 14:32:37 +00:00
mfranz
2866043c3d - prop_key_handler: limitate history to history-max-size on loading
- string/debug: cosmetics
2008-06-08 11:14:57 +00:00
mfranz
0b4322736f - make debug.dump() accept more than one argument (one could already write
debug.dump([a, b]) for that, but debug.dump(a, b) is more obvious)
- change output colors: variable names are no longer bold, all property
  attributes are now blue, not just the property type)
- drop redundant braces & other cosmetics
2008-05-15 15:23:17 +00:00
mfranz
a53e636268 debug.nas: _dump_string(): escape some characters
prop-key-handler.nas: minor cleanup
2007-11-25 20:36:57 +00:00