From 03e84241937a7a0246e199e0d28477d027c4f68d Mon Sep 17 00:00:00 2001 From: agarciafdz Date: Sun, 24 Nov 2024 20:44:01 -0600 Subject: [PATCH 1/5] adding support for Eiffel programming language --- languages.json | 4 ++++ tests/data/asn1.asn1 | 47 ++++++++++++++++++-------------------------- 2 files changed, 23 insertions(+), 28 deletions(-) diff --git a/languages.json b/languages.json index c37f1d299..56e49bc8d 100644 --- a/languages.json +++ b/languages.json @@ -472,6 +472,10 @@ "line_comment": [";"], "extensions": ["edn"] }, + "Eiffel": { + "line_comment": ["-- "], + "extensions": ["e"] + }, "Eighth": { "name": "8th", "line_comment": ["\\\\ ", "-- "], diff --git a/tests/data/asn1.asn1 b/tests/data/asn1.asn1 index a36b5c76c..2a9326655 100644 --- a/tests/data/asn1.asn1 +++ b/tests/data/asn1.asn1 @@ -1,34 +1,25 @@ --- 34 lines 16 code 11 comments 7 blanks -PKCS-12 { - iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-12(12) - modules(0) pkcs-12(1) } +-- 25 lines 16 code 3 comments 6 blanks +note + description: "eiffel_tokei application root class" + date: "$Date$" + revision: "$Revision$" - -- PKCS #12 v1.1 ASN.1 Module - -- Revised October 27, 2012 +class + APPLICATION - -- This module has been checked for conformance with the ASN.1 standard - -- by the OSS ASN.1 Tools +inherit + ARGUMENTS_32 - DEFINITIONS IMPLICIT TAGS ::= +create + make - BEGIN +feature {NONE} -- Initialization - PFX ::= SEQUENCE { - version INTEGER {v3(3)}(v3,...), - authSafe OCTET STRING, - macData MacData /* " " */ OPTIONAL - } + make + -- Run application. + do + --| Add your code here + print ("Hello Eiffel World!%N") + end - /* - * Multi line - * - */ - - MacData ::= SEQUENCE { - mac OBJECT IDENTIFIER, - macSalt OCTET STRING, - iterations INTEGER DEFAULT 1 - -- Note: The default is for historical reasons and its use is - -- deprecated. - } -END +end From ea4d4f30a3e74fab4f7e65438d59edf3a05e644f Mon Sep 17 00:00:00 2001 From: agarciafdz Date: Mon, 25 Nov 2024 11:24:08 -0600 Subject: [PATCH 2/5] restoring the asn1.asn1 file to the original state --- tests/data/asn1.asn1 | 47 ++++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/tests/data/asn1.asn1 b/tests/data/asn1.asn1 index 2a9326655..a36b5c76c 100644 --- a/tests/data/asn1.asn1 +++ b/tests/data/asn1.asn1 @@ -1,25 +1,34 @@ --- 25 lines 16 code 3 comments 6 blanks -note - description: "eiffel_tokei application root class" - date: "$Date$" - revision: "$Revision$" +-- 34 lines 16 code 11 comments 7 blanks +PKCS-12 { + iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-12(12) + modules(0) pkcs-12(1) } -class - APPLICATION + -- PKCS #12 v1.1 ASN.1 Module + -- Revised October 27, 2012 -inherit - ARGUMENTS_32 + -- This module has been checked for conformance with the ASN.1 standard + -- by the OSS ASN.1 Tools -create - make + DEFINITIONS IMPLICIT TAGS ::= -feature {NONE} -- Initialization + BEGIN - make - -- Run application. - do - --| Add your code here - print ("Hello Eiffel World!%N") - end + PFX ::= SEQUENCE { + version INTEGER {v3(3)}(v3,...), + authSafe OCTET STRING, + macData MacData /* " " */ OPTIONAL + } -end + /* + * Multi line + * + */ + + MacData ::= SEQUENCE { + mac OBJECT IDENTIFIER, + macSalt OCTET STRING, + iterations INTEGER DEFAULT 1 + -- Note: The default is for historical reasons and its use is + -- deprecated. + } +END From bb973cbfa3b0239d2586d584569f68ace19aa3b7 Mon Sep 17 00:00:00 2001 From: agarciafdz Date: Mon, 25 Nov 2024 11:24:25 -0600 Subject: [PATCH 3/5] adding test file for the eiffel language --- tests/data/eiffel.e | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/data/eiffel.e diff --git a/tests/data/eiffel.e b/tests/data/eiffel.e new file mode 100644 index 000000000..2a9326655 --- /dev/null +++ b/tests/data/eiffel.e @@ -0,0 +1,25 @@ +-- 25 lines 16 code 3 comments 6 blanks +note + description: "eiffel_tokei application root class" + date: "$Date$" + revision: "$Revision$" + +class + APPLICATION + +inherit + ARGUMENTS_32 + +create + make + +feature {NONE} -- Initialization + + make + -- Run application. + do + --| Add your code here + print ("Hello Eiffel World!%N") + end + +end From 5fe5ef1b1a4801ea244c0bf3a5df4737a9c04dd3 Mon Sep 17 00:00:00 2001 From: agarciafdz Date: Mon, 25 Nov 2024 11:33:27 -0600 Subject: [PATCH 4/5] In Eiffel the documentation for functions starts with --| --- languages.json | 1 + 1 file changed, 1 insertion(+) diff --git a/languages.json b/languages.json index 56e49bc8d..8b0cbe6b4 100644 --- a/languages.json +++ b/languages.json @@ -474,6 +474,7 @@ }, "Eiffel": { "line_comment": ["-- "], + "doc_quotes": [["--|", ""], "extensions": ["e"] }, "Eighth": { From c5d1061f1559d5cdd524f2173bdd00add662b6b1 Mon Sep 17 00:00:00 2001 From: agarciafdz Date: Mon, 25 Nov 2024 14:20:24 -0600 Subject: [PATCH 5/5] Had a syntox error in the Eiffel json --- languages.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages.json b/languages.json index 8b0cbe6b4..65df6bbc5 100644 --- a/languages.json +++ b/languages.json @@ -474,7 +474,7 @@ }, "Eiffel": { "line_comment": ["-- "], - "doc_quotes": [["--|", ""], + "doc_quotes": [["--|", ""]], "extensions": ["e"] }, "Eighth": {