Skip to content

Commit

Permalink
Update to NaturalDocs 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ghewgill committed Nov 2, 2023
1 parent 554c50d commit 918cbef
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 150 deletions.
14 changes: 8 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -901,12 +901,14 @@ add_test(
COMMAND python3 scripts/test_doc.py --neon $<TARGET_FILE:neon> --neonc $<TARGET_FILE: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
Expand Down
Binary file removed external/NaturalDocs-1.52.zip
Binary file not shown.
Binary file added external/Natural_Docs_2.3.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions external/naturaldocs.cmake
Original file line number Diff line number Diff line change
@@ -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
)
Expand Down
127 changes: 56 additions & 71 deletions lib/nd.proj/Languages.txt
Original file line number Diff line number Diff line change
@@ -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]
Expand All @@ -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,
Expand All @@ -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
Expand All @@ -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.
127 changes: 56 additions & 71 deletions samples/nd.proj/Languages.txt
Original file line number Diff line number Diff line change
@@ -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]
Expand All @@ -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,
Expand All @@ -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
Expand All @@ -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.

0 comments on commit 918cbef

Please sign in to comment.