diff --git a/CMakeLists.txt b/CMakeLists.txt index f2e5b69df5..9921faedfd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -901,12 +901,14 @@ add_test( COMMAND python3 scripts/test_doc.py --neon $ --neonc $ ) -add_custom_target(docs ALL - COMMAND perl ${CMAKE_BINARY_DIR}/external/NaturalDocs/NaturalDocs -i ${CMAKE_SOURCE_DIR}/lib -o HTML gh-pages/html -p ${CMAKE_SOURCE_DIR}/lib/nd.proj -ro -xi lib/compress/bzip2-1.0.6 -xi lib/compress/zlib-1.2.8 -xi lib/crypto/include -xi lib/crypto/libressl-2.2.4 -xi lib/fltk/fltk-1.3.4-1 -xi lib/hash/include -xi lib/hash/libressl-2.2.4 -xi lib/http/curl-7.41.0 -xi lib/http/libressl-2.2.4 -xi lib/http/zlib-1.2.8 -xi lib/http/include -xi lib/regex/pcre2-10.10 -xi lib/sdl/SDL2-2.0.3 -) -add_custom_target(docs_samples ALL - COMMAND perl ${CMAKE_BINARY_DIR}/external/NaturalDocs/NaturalDocs -i ${CMAKE_SOURCE_DIR}/samples -o HTML gh-pages/samples -p ${CMAKE_SOURCE_DIR}/samples/nd.proj -ro -) +if (MONO) + add_custom_target(docs ALL + COMMAND ${MONO} "${CMAKE_BINARY_DIR}/external/Natural Docs/NaturalDocs.exe" -i ${CMAKE_SOURCE_DIR}/lib -o HTML gh-pages/html -p ${CMAKE_SOURCE_DIR}/lib/nd.proj -ro + ) + add_custom_target(docs_samples ALL + COMMAND ${MONO} "${CMAKE_BINARY_DIR}/external/Natural Docs/NaturalDocs.exe" -i ${CMAKE_SOURCE_DIR}/samples -o HTML gh-pages/samples -p ${CMAKE_SOURCE_DIR}/samples/nd.proj -ro + ) +endif (MONO) add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/bin/hello.neonx diff --git a/external/NaturalDocs-1.52.zip b/external/NaturalDocs-1.52.zip deleted file mode 100644 index fbf4a9c6a8..0000000000 Binary files a/external/NaturalDocs-1.52.zip and /dev/null differ diff --git a/external/Natural_Docs_2.3.zip b/external/Natural_Docs_2.3.zip new file mode 100644 index 0000000000..711eb70c94 Binary files /dev/null and b/external/Natural_Docs_2.3.zip differ diff --git a/external/naturaldocs.cmake b/external/naturaldocs.cmake index d3c3b9ebb8..6a91e82a66 100644 --- a/external/naturaldocs.cmake +++ b/external/naturaldocs.cmake @@ -1,6 +1,6 @@ -if (NOT EXISTS external/NaturalDocs/NaturalDocs) +if (NOT EXISTS "external/Natural Docs/NaturalDocs.exe") execute_process( - COMMAND python3 ${CMAKE_SOURCE_DIR}/scripts/extract.py ${CMAKE_CURRENT_SOURCE_DIR}/NaturalDocs-1.52.zip NaturalDocs + COMMAND python3 ${CMAKE_SOURCE_DIR}/scripts/extract.py ${CMAKE_CURRENT_SOURCE_DIR}/Natural_Docs_2.3.zip . WORKING_DIRECTORY external RESULT_VARIABLE retcode ) diff --git a/lib/nd.proj/Languages.txt b/lib/nd.proj/Languages.txt index a387460d00..0701cf2936 100644 --- a/lib/nd.proj/Languages.txt +++ b/lib/nd.proj/Languages.txt @@ -1,24 +1,39 @@ -Format: 1.52 +Format: 2.3 # This is the Natural Docs languages file for this project. If you change -# anything here, it will apply to THIS PROJECT ONLY. If you'd like to change -# something for all your projects, edit the Languages.txt in Natural Docs' -# Config directory instead. +# anything here, it will apply to THIS PROJECT ONLY. You can edit the version +# in Natural Docs' Config folder to make the changes apply to all projects, +# but it's recommended that you edit this version instead. -# You can prevent certain file extensions from being scanned like this: +# Ignored Extensions +# ------------------------------------------------------------------------ + +# If you'd like to prevent certain file extensions from being scanned by +# Natural Docs, you can do it like this: +# # Ignore Extensions: [extension] [extension] ... -#------------------------------------------------------------------------------- -# SYNTAX: -# -# Unlike other Natural Docs configuration files, in this file all comments -# MUST be alone on a line. Some languages deal with the # character, so you -# cannot put comments on the same line as content. -# -# Also, all lists are separated with spaces, not commas, again because some -# languages may need to use them. +# Languages +# ------------------------------------------------------------------------ +# The syntax reference is after the definitions. + +Language: Neon + + Extension: neon + Shebang String: neon + + Line Comment: -- + Block Comment: /* */ + + Function Prototype Ender: \n + + +# These settings define the languages Natural Docs knows how to parse. You +# can define your own here or override the settings of the existing ones. +# Note that all lists are space separated so that commas can be used as +# values. # # Language: [name] # Alter Language: [name] @@ -32,33 +47,32 @@ Format: 1.52 # always treated this way. # # The language Text File is also special. It's treated as one big comment -# so you can put Natural Docs content in them without special symbols. Also, -# if you don't specify a package separator, ignored prefixes, or enum value -# behavior, it will copy those settings from the language that is used most -# in the source tree. +# so you can put Natural Docs content in them without special symbols. # # Extensions: [extension] [extension] ... # [Add/Replace] Extensions: [extension] [extension] ... -# Defines the file extensions of the language's source files. You can -# redefine extensions found in the main languages file. You can use * to -# mean any undefined extension. +# Defines the file extensions of the language's source files. # # Shebang Strings: [string] [string] ... # [Add/Replace] Shebang Strings: [string] [string] ... # Defines a list of strings that can appear in the shebang (#!) line to -# designate that it's part of the language. You can redefine strings found -# in the main languages file. +# designate that it's part of the language. # -# Ignore Prefixes in Index: [prefix] [prefix] ... -# [Add/Replace] Ignored Prefixes in Index: [prefix] [prefix] ... +# Simple Identifier: [name] +# The name of the language using only the letters A to Z. No spaces, +# numbers, symbols, or Unicode allowed. Defaults to the language name +# minus any unacceptable characters. This is used to generate things like +# CSS class names. # -# Ignore [Topic Type] Prefixes in Index: [prefix] [prefix] ... -# [Add/Replace] Ignored [Topic Type] Prefixes in Index: [prefix] [prefix] ... -# Specifies prefixes that should be ignored when sorting symbols in an -# index. Can be specified in general or for a specific topic type. +# Aliases: [alias] [alias] ... +# [Add/Replace] Aliases: [alias] [alias] ... +# Defines alternative names for the language that can be used to start a +# code block. # -#------------------------------------------------------------------------------ -# For basic language support only: +# +# Properties for Basic Language Support Only +# ------------------------------------------------------------------------ +# If you're adding your own language to Natural Docs you must define these. # # Line Comments: [symbol] [symbol] ... # Defines a space-separated list of symbols that are used for line comments, @@ -68,13 +82,8 @@ Format: 1.52 # Defines a space-separated list of symbol pairs that are used for block # comments, if any. # -# Package Separator: [symbol] -# Defines the default package separator symbol. The default is a dot. -# -# [Topic Type] Prototype Enders: [symbol] [symbol] ... -# When defined, Natural Docs will attempt to get a prototype from the code -# immediately following the topic type. It stops when it reaches one of -# these symbols. Use \n for line breaks. +# Member Operator: [symbol] +# Defines the default member operator symbol. The default is a dot. # # Line Extender: [symbol] # Defines the symbol that allows a prototype to span multiple lines if @@ -84,39 +93,15 @@ Format: 1.52 # Defines how enum values are referenced. The default is global. # global - Values are always global, referenced as 'value'. # under type - Values are under the enum type, referenced as -# 'package.enum.value'. +# 'class.enum.value'. # under parent - Values are under the enum's parent, referenced as -# 'package.value'. -# -# Perl Package: [perl package] -# Specifies the Perl package used to fine-tune the language behavior in ways -# too complex to do in this file. +# 'class.value'. # -#------------------------------------------------------------------------------ -# For full language support only: +# Case Sensitive: [yes|no] +# Defines whether the language's identifiers are case sensitive. The +# default is yes. # -# Full Language Support: [perl package] -# Specifies the Perl package that has the parsing routines necessary for full -# language support. -# -#------------------------------------------------------------------------------- - -# The following languages are defined in the main file, if you'd like to alter -# them: -# -# Text File, Shebang Script, C/C++, C#, Java, JavaScript, Perl, Python, -# PHP, SQL, Visual Basic, Pascal, Assembly, Ada, Tcl, Ruby, Makefile, -# ActionScript, ColdFusion, R, Fortran - -# If you add a language that you think would be useful to other developers -# and should be included in Natural Docs by default, please e-mail it to -# languages [at] naturaldocs [dot] org. - - -Language: Neon - - Extension: neon - Shebang String: neon - Line Comment: -- - Block Comment: /* */ - Function Prototype Ender: \n +# [Comment Type] Prototype Enders: [symbol] [symbol] ... +# When defined, Natural Docs will attempt to get a prototype from the code +# immediately following the comment type. It stops when it reaches one of +# these symbols. Use \n for line breaks. diff --git a/samples/nd.proj/Languages.txt b/samples/nd.proj/Languages.txt index a387460d00..0701cf2936 100644 --- a/samples/nd.proj/Languages.txt +++ b/samples/nd.proj/Languages.txt @@ -1,24 +1,39 @@ -Format: 1.52 +Format: 2.3 # This is the Natural Docs languages file for this project. If you change -# anything here, it will apply to THIS PROJECT ONLY. If you'd like to change -# something for all your projects, edit the Languages.txt in Natural Docs' -# Config directory instead. +# anything here, it will apply to THIS PROJECT ONLY. You can edit the version +# in Natural Docs' Config folder to make the changes apply to all projects, +# but it's recommended that you edit this version instead. -# You can prevent certain file extensions from being scanned like this: +# Ignored Extensions +# ------------------------------------------------------------------------ + +# If you'd like to prevent certain file extensions from being scanned by +# Natural Docs, you can do it like this: +# # Ignore Extensions: [extension] [extension] ... -#------------------------------------------------------------------------------- -# SYNTAX: -# -# Unlike other Natural Docs configuration files, in this file all comments -# MUST be alone on a line. Some languages deal with the # character, so you -# cannot put comments on the same line as content. -# -# Also, all lists are separated with spaces, not commas, again because some -# languages may need to use them. +# Languages +# ------------------------------------------------------------------------ +# The syntax reference is after the definitions. + +Language: Neon + + Extension: neon + Shebang String: neon + + Line Comment: -- + Block Comment: /* */ + + Function Prototype Ender: \n + + +# These settings define the languages Natural Docs knows how to parse. You +# can define your own here or override the settings of the existing ones. +# Note that all lists are space separated so that commas can be used as +# values. # # Language: [name] # Alter Language: [name] @@ -32,33 +47,32 @@ Format: 1.52 # always treated this way. # # The language Text File is also special. It's treated as one big comment -# so you can put Natural Docs content in them without special symbols. Also, -# if you don't specify a package separator, ignored prefixes, or enum value -# behavior, it will copy those settings from the language that is used most -# in the source tree. +# so you can put Natural Docs content in them without special symbols. # # Extensions: [extension] [extension] ... # [Add/Replace] Extensions: [extension] [extension] ... -# Defines the file extensions of the language's source files. You can -# redefine extensions found in the main languages file. You can use * to -# mean any undefined extension. +# Defines the file extensions of the language's source files. # # Shebang Strings: [string] [string] ... # [Add/Replace] Shebang Strings: [string] [string] ... # Defines a list of strings that can appear in the shebang (#!) line to -# designate that it's part of the language. You can redefine strings found -# in the main languages file. +# designate that it's part of the language. # -# Ignore Prefixes in Index: [prefix] [prefix] ... -# [Add/Replace] Ignored Prefixes in Index: [prefix] [prefix] ... +# Simple Identifier: [name] +# The name of the language using only the letters A to Z. No spaces, +# numbers, symbols, or Unicode allowed. Defaults to the language name +# minus any unacceptable characters. This is used to generate things like +# CSS class names. # -# Ignore [Topic Type] Prefixes in Index: [prefix] [prefix] ... -# [Add/Replace] Ignored [Topic Type] Prefixes in Index: [prefix] [prefix] ... -# Specifies prefixes that should be ignored when sorting symbols in an -# index. Can be specified in general or for a specific topic type. +# Aliases: [alias] [alias] ... +# [Add/Replace] Aliases: [alias] [alias] ... +# Defines alternative names for the language that can be used to start a +# code block. # -#------------------------------------------------------------------------------ -# For basic language support only: +# +# Properties for Basic Language Support Only +# ------------------------------------------------------------------------ +# If you're adding your own language to Natural Docs you must define these. # # Line Comments: [symbol] [symbol] ... # Defines a space-separated list of symbols that are used for line comments, @@ -68,13 +82,8 @@ Format: 1.52 # Defines a space-separated list of symbol pairs that are used for block # comments, if any. # -# Package Separator: [symbol] -# Defines the default package separator symbol. The default is a dot. -# -# [Topic Type] Prototype Enders: [symbol] [symbol] ... -# When defined, Natural Docs will attempt to get a prototype from the code -# immediately following the topic type. It stops when it reaches one of -# these symbols. Use \n for line breaks. +# Member Operator: [symbol] +# Defines the default member operator symbol. The default is a dot. # # Line Extender: [symbol] # Defines the symbol that allows a prototype to span multiple lines if @@ -84,39 +93,15 @@ Format: 1.52 # Defines how enum values are referenced. The default is global. # global - Values are always global, referenced as 'value'. # under type - Values are under the enum type, referenced as -# 'package.enum.value'. +# 'class.enum.value'. # under parent - Values are under the enum's parent, referenced as -# 'package.value'. -# -# Perl Package: [perl package] -# Specifies the Perl package used to fine-tune the language behavior in ways -# too complex to do in this file. +# 'class.value'. # -#------------------------------------------------------------------------------ -# For full language support only: +# Case Sensitive: [yes|no] +# Defines whether the language's identifiers are case sensitive. The +# default is yes. # -# Full Language Support: [perl package] -# Specifies the Perl package that has the parsing routines necessary for full -# language support. -# -#------------------------------------------------------------------------------- - -# The following languages are defined in the main file, if you'd like to alter -# them: -# -# Text File, Shebang Script, C/C++, C#, Java, JavaScript, Perl, Python, -# PHP, SQL, Visual Basic, Pascal, Assembly, Ada, Tcl, Ruby, Makefile, -# ActionScript, ColdFusion, R, Fortran - -# If you add a language that you think would be useful to other developers -# and should be included in Natural Docs by default, please e-mail it to -# languages [at] naturaldocs [dot] org. - - -Language: Neon - - Extension: neon - Shebang String: neon - Line Comment: -- - Block Comment: /* */ - Function Prototype Ender: \n +# [Comment Type] Prototype Enders: [symbol] [symbol] ... +# When defined, Natural Docs will attempt to get a prototype from the code +# immediately following the comment type. It stops when it reaches one of +# these symbols. Use \n for line breaks.