Commit Graph

205 Commits

Author SHA1 Message Date
Adam Strzelecki
acb6a36656 msgs: One msgWriteln with optional flags
Instead of msgWriteln, outWriteln and stdoutWriteln doing essentially the same.
2015-10-22 22:09:15 +02:00
Adam Strzelecki
78568859c5 compiler/vm: Use stdout too in VM time echo
Now VM time echo outputs to stdout too, same as compile time echo, rather using
same handle as compiler diagnostics (stderr default).
2015-10-16 20:55:17 +02:00
Adam Strzelecki
abb82554b7 compiler/msgs: Default to stderr for diagnostics
Previously we were defaulting to stdout for diagnostics, which could interfere
with scripts or `nim c -r' programs outputting their results to stdout,
possibly mixing their output with compiler messages.

This change makes now Nim to be inline with other compilers emitting
diagnostics to stderr. Also now --stdout option has proper meaning making all
diagnostics to be sent to stdout instead.

NOTE: Tester now calls compiler with --stdout.
2015-10-16 20:55:17 +02:00
Araq
48036fa3d9 fixes #635 2015-10-07 10:03:47 +02:00
Dominik Picheta
bb7604c06f Improved "Execution of an external program failed" message. 2015-09-27 14:18:03 +01:00
Araq
f79ec6cdf5 make the compiler less verbose 2015-09-14 15:13:08 +02:00
Matt Sullivan
caf0cd9e05 Replace incorrect warning string. 2015-09-05 22:16:35 -05:00
Araq
dc047931bb fixes #2590; methods now require a .base annotation 2015-09-06 02:31:28 +02:00
rku
24ad2cb392 Merge branch 'devel' into coroutines 2015-08-20 17:54:55 +03:00
Ryan Gonzalez
d66cc00750 Give a nice error when no command is given 2015-08-15 17:14:19 -05:00
rku
6a7a44bbf2 cValidAssemblers -> const set
Added assembler validity check
2015-08-10 12:02:49 +03:00
rku
df0e1a515b Added fasm (external assembler) support. 2015-07-31 16:00:13 +03:00
Araq
f79e58edce don't reset the terminal when --stdout is active 2015-07-16 15:26:04 +02:00
def
db5f8d6755 Reset terminal colors before running compiled program 2015-07-10 00:48:11 +02:00
Adam Strzelecki
3c20747394 Turn GC_getStatistics into hintGCStats 2015-07-03 14:05:00 +02:00
Adam Strzelecki
c009aadc74 Turn stack trace printing into hintStackTrace
So stack trace printing can be explicitly enabled by --hint[StackTrace]:on.
2015-07-03 14:05:00 +02:00
Adam Strzelecki
d568ac3357 Turn optPrintSurroundingSrc into hintSource
So surrounding source printing can be enabled for lower verbosity levels
explicitly.
2015-07-03 14:05:00 +02:00
Adam Strzelecki
00366cb8d4 Turn loadDynamicLib msg into hintDependency 2015-07-03 14:05:00 +02:00
Adam Strzelecki
18b3d04291 Turn execExternalProgram msgs into hintExecuting
Or hintLinking that is used on verbosity:1. This lets you treat this message as
regular hint, and control it via command line.
2015-07-03 14:05:00 +02:00
Adam Strzelecki
592f867aa5 List warnings & hints via --(hints|warnings):list
Hints and warnings can be now listed using --warnings:list and --hints:list
printing names and checkboxes indicating which of these are enabled.
2015-07-03 14:05:00 +02:00
Adam Strzelecki
14e6ff6780 Introduce NotesVerbosity defining verbosity levels
This solves two issues:

1. Some notes were enabled explicitly for some verbosity levels, so
   --hintName:on has no effect if verbosity level was too low.

2. Verbosity level for notes is not longer scattered across the source code,
   instead if now lives in msgs.nim NotesVerbosity array

3. Individual note settings have stronger effect than verbosity setting,
   so --hintName:off will disable hint regardless of high verbosity setting,
   and vice-versa --hintName:on will enable hint even on low verbosity setting.
2015-07-03 12:37:42 +02:00
Araq
959d418d1d fixes 'instantiation from here' highlighting 2015-07-01 15:02:13 +02:00
patrick dw
2a0f7b5de7 renamed writeln to writeLine in compiler 2015-06-19 01:45:12 -05:00
Adam Strzelecki
b4d3a27753 msgs: Append/color warning/hint kind in msgWriteln
Rather than embedding it into the message format text itself. This also makes
possible to color warning/hint kind.
2015-06-15 11:26:54 +02:00
Adam Strzelecki
2ba3642544 msgs: styledMsgWriteln compatible with styledEcho
1. Introduce styledMsgWriteln which can be used same way as styledEcho.

2. Make file names and positions use bright white like in other compilers, so
   only message types are colored.
2015-06-15 11:26:54 +02:00
Adam Strzelecki
806dfe976d colors: Use colors by default on terminals 2015-06-15 11:26:53 +02:00
Andreas Rumpf
258bfa886a Merge pull request #2852 from kirbyfan64/devel
Colors!
2015-06-10 11:08:22 +02:00
Dominik Picheta
1cf1610bdf Rename errUndeclaredProcedure to errUndeclaredRoutine. 2015-06-05 14:50:14 +01:00
Dominik Picheta
5d6f16cc1a Got rid of errUndeclaredProcedureField. 2015-06-04 16:39:38 +01:00
Dominik Picheta
22f6017ab8 Fixes #2584
Better compiler errors for accessing undeclared fields, calling undeclared
procedures and procedure fields.
2015-06-04 13:55:48 +01:00
Ryan Gonzalez
8beed96106 Colors! 2015-06-02 18:47:43 -05:00
Oscar Campbell
6a43b0e817 Clean up to compiler style. Refine error-msg for illegal octal 'O' 2015-05-31 02:55:06 +02:00
Araq
a5f321ea8f finishes #2566 2015-04-24 12:44:14 +02:00
Adam Strzelecki
69ed78b30f msg: Output column numbers starting from 1
Most of editors/IDEs expect column numbers to start from 1, so (1, 1) means
beginning of the file.

This change applies only to diagnostics output, however Nim will still
internally number columns starting from 0.
2015-04-21 11:32:12 +02:00
Zahary Karadjov
1ebf1aaa80 importing of C++ nested generics like std::vector<T>::iterator, using the apostrophe operator 2015-04-13 23:49:41 +03:00
def
39049e151f Get rid of deprecation warnings 2015-04-07 15:47:18 +02:00
Andreas Rumpf
99e0fb90e0 Merge pull request #2428 from arnetheduck/comp-lib-ropes
Comp lib ropes
2015-04-06 00:32:08 +02:00
Araq
a83286192f GC-safety error messages are useful now 2015-04-04 01:19:32 +02:00
Jacek Sieka
171996465f compiler_ropes: ropeEqualsFile -> equalsFile, no more max rope component length
read file data in bigger blocks, avoiding lots of file api calls

also removed crc step - seems easier to simply compare the bytes rather
than calculating two crc's
2015-04-01 22:32:15 +08:00
Jacek Sieka
c40249cd43 compiler_ropes: ropeToStr -> $ 2015-04-01 22:32:15 +08:00
Araq
3bcafb1c3a concept example from the manual now works again 2015-03-23 13:10:19 +01:00
Araq
aa175e9e57 fixes #1868 2015-03-12 12:17:08 +01:00
Andreas Rumpf
38b9093581 Merge pull request #2274 from reactormonk/warning-for-result
Warning for result
2015-03-08 14:49:49 +01:00
Simon Hafner
4d8e0d54c3 fixed array size 2015-03-07 16:06:46 -06:00
Simon Hafner
20283b81fa update WarningsToStr 2015-03-06 10:46:33 -06:00
Simon Hafner
70eaf92ff0 Merge branch 'devel' into warning-for-result 2015-03-05 14:44:54 -06:00
Hans Raaf
58186f6c1d Replaced deprecated repeatChar() with repeat() or spaces(). 2015-03-04 03:30:43 +01:00
Araq
3bfcfeb0cf don't use stdout for nimsuggest server mode 2015-02-27 16:44:55 +01:00
Andreas Rumpf
a5f8f538a2 Merge pull request #2140 from FedericoCeratto/devel
Fix some typos
2015-02-16 20:32:24 +01:00
def
9f5a61c3bc Tell user more exactly how to create stacktrace 2015-02-16 16:33:09 +01:00