Skip to content

Instantly share code, notes, and snippets.

View flaviut's full-sized avatar

Flaviu Tamas flaviut

View GitHub Profile
diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim
index 70eced0..7c11d3e 100644
--- a/compiler/ccgtypes.nim
+++ b/compiler/ccgtypes.nim
@@ -13,7 +13,7 @@
proc mangleField(name: string): string =
result = mangle(name)
- if name[0] in Letters:
+ if name[0] in 'a'..'z':
diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim
index 7c11d3e..70eced0 100644
--- a/compiler/ccgtypes.nim
+++ b/compiler/ccgtypes.nim
@@ -13,7 +13,7 @@
proc mangleField(name: string): string =
result = mangle(name)
- if name[0] in 'a'..'z':
+ if name[0] in Letters:
import macros
# StmtList
# Call
# Ident !"asda"
# Call
# Ident !"gfa"
# BlockStmt
# Ident !"a"
# StmtList
/* kate-script
* name: Nimrod
* author: Flaviu Tamas <tamas.flaviu@gmail.com>
* license: BSD
* revision: 1
* kate-version: 3.13
* indent-languages: nimrod
*/
require("cursor.js")
@flaviut
flaviut / cgen.c
Last active August 29, 2015 14:01
// before auto
// after auto
struct tslice475623 {
NIM_CHAR A;
NIM_CHAR B;
};
N_NIMCALL(NimStringDesc*, manglefield_475609)(NimStringDesc* name) {
import strutils
proc mangle*(name: string): string =
result = ""
case name[0]
of Letters:
result.add(name[0].toLower)
of Digits:
result.add("N" & name[0])
else:
import strutils
proc mangle*(name: string): string =
result = ""
case name[0]
of Letters:
result.add(name[0].toLower)
of Digits:
result.add("N" & name[0])
else:
import tables
type
ContextValue[T] = object
value: ref T
MyString = object of TObject
value: string
ExtendedObj = object of TObject
name: string
import tables
type
ContextValue[T] = object
value: ref T
MyString = object of TObject
value: string
ExtendedObj = object of TObject
name: string
/** kate-script
* name: Nimrod
* license: LGPL
* author: Paul Giannaros <paul@giannaros.org>, Gerald Senarclens de Grancy <oss@senarclens.eu>, Flaviu Tamas <tamas.flaviu@gmail.com>
* revision: 3
* kate-version: 3.13
*/
// required katepart js libraries