Unverified Commit df9a3ad8 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

Merge pull request #315986 from Sigmanificient/samarium

parents 3dbb08f1 1d974646
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
--- a/src/samarium/tokenizer.py	2024-06-07 13:07:38.731314161 +0200
+++ b/src/samarium/tokenizer.py	2024-06-07 13:08:11.674488226 +0200
@@ -26,12 +26,12 @@
     Token,
     ignore_whitespace=True,
     rules=[
-        Rule(r"==<.*>==", converter=False, flags=re.M | re.S),
-        Rule(r"==[^\n]*", converter=False, flags=re.M | re.S),
+        Rule(r"==<.*>==", flags=re.M | re.S, ignore=True),
+        Rule(r"==[^\n]*", flags=re.M | re.S, ignore=True),
         Rule(
             common.DOUBLE_QUOTED_STRING.pattern,
             lambda x: x.replace("\n", r"\n"),
-            re.S,
+            flags=re.S,
         ),
         Rule(rf"{SM_BIT}+`?{SM_BIT}*|`{SM_BIT}*", to_number),
         Rule(r"\w+"),
+36 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  poetry-core,
  crossandra,
  dahlia,
  pythonRelaxDepsHook
}:

buildPythonPackage rec {
  pname = "samarium";
  version = "0.5.3";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "samarium-lang";
    repo = "samarium";
    rev = "refs/tags/${version}";
    hash = "sha256-4WVkTLE6OboNJE/f+6zS3xT1jEHUwV4HSLjl/PBP0FU=";
  };

  build-system = [ poetry-core pythonRelaxDepsHook ];
  dependencies = [ crossandra dahlia ];

  patches = [ ./crossandra-2-fix.patch ];
  pythonRelaxDeps = [ "crossandra" ];

  meta = with lib; {
    changelog = "https://github.com/samarium-lang/samarium/blob/${src.rev}/CHANGELOG.md";
    description = "The Samarium Programming Language";
    license = licenses.mit;
    homepage = "https://samarium-lang.github.io/Samarium";
    maintainers = with maintainers; [ sigmanificient ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -13872,6 +13872,8 @@ self: super: with self; {
  saneyaml = callPackage ../development/python-modules/saneyaml { };
  samarium = callPackage ../development/python-modules/samarium { };
  sampledata = callPackage ../development/python-modules/sampledata { };
  samplerate = callPackage ../development/python-modules/samplerate {